Files
nudelrechner.de/dev/mett.min.js
T
Florian Otto 04f8ac9bb6
Deploy Website / deploy (push) Successful in 3s
feat: Refactor project structure and add new files
- Removed old style.css and added boilerplate.css for better cross-browser compatibility.
- Introduced browserconfig.xml for Microsoft tile support.
- Created impressum.php and index.php for main application pages.
- Added info.php for PHP info display.
- Implemented mett.js and mett.min.js for Mett calculation functionality.
- Included respond.min.js for media query support in older browsers.
- Recreated style.css with responsive design features.
- Added index.html as a landing page with a placeholder message.
2026-04-28 20:23:19 +02:00

2 lines
913 B
JavaScript

!!function(){var t={wenig:30,normal:40,viel:50,"sehr viel":60},e=40,n=1,a=$("#halfRolls"),r=$("#hunger"),o=["G","KG","T"],c=function(t){for(var e=String(Math.round(t)),n=/(\d+)(\d{3})/;n.test(e);)e=e.replace(n,"$1.$2");return e},i=function(t){for(var e=String(parseFloat(t).toFixed(2)).split("."),n=/(\d+)(\d{3})/;n.test(e[0]);)e[0]=e[0].replace(n,"$1.$2");return e.join(",")},l=function(){var t=n*e,a="",r=!1;for(var l in o){if(a=o[l],1e3>t)break;t/=1e3,r=!0}document.location.hash="r"+n+"-m"+e,$("#out").text("Bestell "+(r?i(t):c(t))+" "+a+" Mett beim Metzger, bro.")},u=document.location.hash.match(/r(\d+)-m(\d+)/);u&&(n=parseInt(u[1]),e=parseInt(u[2]),l()),a.val(n).on("change",function(){n=parseInt(a.val())}),$.each(t,function(t,n){r.append($("<option>").attr("value",n).prop("selected",n==e).text(t))}),r.on("change",function(){e=r.val()}),$("#calc").on("click",l)}();
//# sourceMappingURL=mett.min.js.map