尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Free practical calculators for estimating how much material, space, or quantity you need.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Free practical calculators for estimating how much material, space, or quantity you need.
Each calculator asks for a few measurements and shows three things: the exact calculated quantity, a sensible amount to buy (with an adjustable allowance for waste, rounded up to real product sizes), and the working behind both.檢視完整 README ↗Free practical calculators for estimating how much material, space, or quantity you need.
Live site: https://how-much-do-i-need.freewebtoolss.workers.dev
Each calculator asks for a few measurements and shows three things: the exact calculated quantity, a sensible amount to buy (with an adjustable allowance for waste, rounded up to real product sizes), and the working behind both.
| Calculator | URL |
|---|---|
| Paint Calculator | /paint-calculator/ |
| Wallpaper Calculator | /wallpaper-calculator/ |
| Flooring Calculator | /flooring-calculator/ |
| Tile Calculator | /tile-calculator/ |
| Drywall Calculator | /drywall-calculator/ |
| Insulation Calculator | /insulation-calculator/ |
| Mulch Calculator | /mulch-calculator/ |
| Soil Calculator | /soil-calculator/ |
| Gravel Calculator | /gravel-calculator/ |
| Grass Seed and Sod Calculator | /grass-seed-sod-calculator/ |
| Fence Calculator | /fence-calculator/ |
| Deck Board Calculator | /deck-calculator/ |
| Paver Calculator | /paver-calculator/ |
| Retaining Wall Block Calculator | /retaining-wall-calculator/ |
| Pool and Water Tank Volume Calculator | /pool-volume-calculator/ |
| Concrete Calculator | /concrete-calculator/ |
| Brick Calculator | /brick-calculator/ |
| Roofing Shingle Calculator | /roofing-calculator/ |
| Moving Box Calculator | /moving-boxes-calculator/ |
| Moving Truck Size Calculator | /moving-truck-size-calculator/ |
| Party Food and Drink Calculator | /party-food-calculator/ |
| Storage Calculator | /storage-calculator/ |
| Internet Speed and Data Calculator | /internet-speed-data-calculator/ |
npx only to deploy.src/
calculators/ one file per calculator + index.mjs registry
_shared.mjs field factories and display helpers
lib/
units.mjs exact unit definitions, rounding, number formatting
validate.mjs input validation (pure), run() helper
render.mjs form and result HTML (build + browser)
engine.mjs browser runtime: live results, US/Metric switch, reset
search.mjs calculator search/filter on the home and list pages
pages/templates.mjs page layouts (home, all calculators, calculator, about, privacy, 404)
static/ CSS, icons, social image, _headers (security headers)
site.config.mjs site URL, name, ad slot settings
scripts/
build.mjs generates dist/ (pages, sitemap.xml, robots.txt, browser JS)
serve.mjs local server that mimics Cloudflare's URL handling
make-images.mjs re-renders the PNG icons and og-image.png with headless Chrome
test/
*.test.mjs unit + build tests (node --test)
e2e/run.mjs browser tests in headless Chrome over the DevTools protocol
Requires Node 20 or newer (Node 22+ for the browser tests).
npm run build # generate dist/
npm test # formula, validation and build tests
npm run test:e2e # build, then test every page in headless Chrome
npm run serve # build, then serve dist/ at http://localhost:8788
npx wrangler deploy # build, then deploy dist/ to Cloudflare
The browser tests look for Chrome in the usual places; set CHROME_PATH to use another Chromium-based browser. To test the live site instead of a local build: BASE_URL=https://how-much-do-i-need.freewebtoolss.workers.dev node test/e2e/run.mjs.
wrangler.jsonc configures an assets-only Cloudflare Worker (no Worker script). Wrangler runs node scripts/build.mjs first (the build.command), then uploads dist/, which is the folder the build writes the finished static site into. html_handling: "auto-trailing-slash" gives clean URLs such as /paint-calculator/, and not_found_handling: "404-page" serves dist/404.html with a 404 status.
If the site moves to a custom domain, change SITE.url in src/site.config.mjs and redeploy. Canonical links, Open Graph URLs, robots.txt and sitemap.xml all come from it.
src/calculators/<name>.mjs exporting a definition: id, slug, name, question, category, keywords, title, description, summary, intro, groups, inputs, compute(values), present(result, ctx) and content (explanatory sections, including how it works and the rounding rules). Copy an existing one as a starting point.src/calculators/index.mjs and add it to CALCULATORS.test/calculators.test.mjs, then run npm test and npm run test:e2e.The build creates the page, the links, the search entry and the sitemap entry. It fails if a title or description is missing, duplicated or too long, or if the default inputs don't produce a result.
compute() receives every measurement in SI base units (metres, m², m³, m² per litre, kg/m³, bytes), so it never has to deal with unit conversion. present() turns the result into the display model: a headline, an "Estimated amount to buy" section, a "Calculated quantity" section, the step-by-step working and notes.
Ads are Adsterra banners, configured in ADS in src/site.config.mjs. Nothing ad-related is built until at least one unit there has a key and a src (the invoke.js URL from Adsterra's Get code). Then:
/ads/<unit>.html, a tiny page the build generates. The iframe has sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox" (no same-origin, no top navigation), so ad code can't read the calculator, the site's storage, or redirect the page. /ads/* gets its own Content-Security-Policy in src/static/_headers; every other page keeps the strict one and loads no third-party code.src/lib/ads.mjs asks first when the browser's time zone is in the EU/EEA, UK or Switzerland. Ad choices in the footer lets anyone change their choice; it's stored in localStorage as hmdin-ad-consent.ADS.privacyUpdated when ads go live or change.npm run test:e2e includes test/e2e/ads.mjs, which builds with stub units (test/fixtures/stub-ads.mjs) and checks consent, unit sizes, sandboxing and print in headless Chrome. scripts/serve.mjs applies _headers the way Cloudflare does, so local tests run under the real security headers.
Unit conversions use exact definitions (1 in = 2.54 cm, 1 ft = 0.3048 m, 1 US gal = 3.785411784 L, 1 lb = 0.45359237 kg). Results are estimates. The pages explain what can change them and why the waste allowances exist. Found a mistake? Please open an issue.
MIT