├── .gitignore ├── .prettierignore ├── .prettierrc ├── .stylelintignore ├── .stylelintrc.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── css └── style.css ├── docs ├── CNAME ├── assets │ ├── main-5K-XWtAn.js │ ├── main-CNuglGdF.css │ ├── manifest-VZotnU81.webmanifest │ └── share-D5g2DLjW.js ├── fugu.png ├── fugu.svg ├── fugu_maskable.png ├── index.html ├── narrow_dark.png ├── narrow_light.png ├── offline.html ├── screenshot.svg ├── share-ios.svg ├── share-others.svg ├── sw.js ├── wide_dark.png └── wide_light.png ├── eslint.config.js ├── index.html ├── js ├── script.mjs └── share.mjs ├── manifest.webmanifest ├── offline.html ├── package-lock.json ├── package.json ├── public ├── fugu.png ├── fugu.svg ├── fugu_maskable.png ├── narrow_dark.png ├── narrow_light.png ├── screenshot.svg ├── share-ios.svg ├── share-others.svg ├── wide_dark.png └── wide_light.png ├── scripts └── license.mjs ├── sw.js └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | *.local 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "embeddedLanguageFormatting": "auto", 5 | "htmlWhitespaceSensitivity": "css", 6 | "insertPragma": false, 7 | "jsxBracketSameLine": false, 8 | "jsxSingleQuote": false, 9 | "printWidth": 80, 10 | "proseWrap": "always", 11 | "quoteProps": "as-needed", 12 | "requirePragma": false, 13 | "semi": true, 14 | "singleQuote": true, 15 | "tabWidth": 2, 16 | "trailingComma": "all", 17 | "useTabs": false, 18 | "vueIndentScriptAndStyle": false 19 | } 20 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "plugins": ["stylelint-order"], 4 | "rules": { 5 | "order/order": ["custom-properties", "declarations"], 6 | "order/properties-order": ["width", "height"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | All Google open source projects are covered by our 4 | [community guidelines](https://opensource.google/conduct/) which define the kind 5 | of respectful behavior we expect of all participants. 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement (CLA). You (or your employer) retain the copyright to your 10 | contribution; this simply gives us permission to use and redistribute your 11 | contributions as part of the project. Head over to 12 | to see your current agreements on file or 13 | to sign a new one. 14 | 15 | You generally only need to submit a CLA once, so if you've already submitted one 16 | (even if it was for a different project), you probably don't need to do it 17 | again. 18 | 19 | ## Code Reviews 20 | 21 | All submissions, including submissions by project members, require review. We 22 | use GitHub pull requests for this purpose. Consult 23 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 24 | information on using pull requests. 25 | 26 | ## Community Guidelines 27 | 28 | This project follows 29 | [Google's Open Source Community Guidelines](https://opensource.google/conduct/). 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How Fugu 🐡 is my browser? 2 | 3 | ![howfuguismybrowser_dev](https://user-images.githubusercontent.com/145676/127011981-51a9b3d2-3291-4ce8-93cf-24b5a4b01e14.png) 4 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2022 Google LLC. All Rights Reserved. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | 14 | :root { 15 | --main-background-color: #fff; 16 | --main-color: #111; 17 | --table-alternate-color: #eee; 18 | --table-hover-color: #ddd; 19 | --link-color: rgb(0 0 238); 20 | --contrast-color: deeppink; 21 | 22 | color-scheme: dark light; 23 | } 24 | 25 | @media (prefers-color-scheme: dark) { 26 | :root { 27 | --main-background-color: #111; 28 | --main-color: #eee; 29 | --table-alternate-color: #222; 30 | --table-hover-color: #333; 31 | --link-color: rgb(158 158 255); 32 | } 33 | } 34 | 35 | html, 36 | body { 37 | color: var(--main-color); 38 | background-color: var(--main-background-color); 39 | } 40 | 41 | html { 42 | display: flex; 43 | align-items: center; 44 | justify-content: center; 45 | } 46 | 47 | body { 48 | width: 60ch; 49 | max-width: 60ch; 50 | font-family: system-ui, sans-serif; 51 | margin-block: 1rem; 52 | } 53 | 54 | h1 { 55 | color: var(--contrast-color); 56 | font-size: 1.25rem; 57 | } 58 | 59 | a { 60 | color: var(--link-color); 61 | } 62 | 63 | a:hover { 64 | color: var(--contrast-color); 65 | } 66 | 67 | /* just the line */ 68 | .sparkline { 69 | stroke: var(--main-color); 70 | fill: none; 71 | } 72 | 73 | /* change the spot color */ 74 | /* stylelint-disable-next-line selector-class-pattern */ 75 | .sparkline--spot { 76 | stroke: var(--contrast-color); 77 | fill: var(--contrast-color); 78 | } 79 | 80 | /* change the cursor color */ 81 | /* stylelint-disable-next-line selector-class-pattern */ 82 | .sparkline--cursor { 83 | stroke: var(--contrast-color); 84 | } 85 | 86 | .tooltip { 87 | position: absolute; 88 | background-color: var(--main-background-color); 89 | color: var(--main-color); 90 | padding: 2px 5px; 91 | font-size: 12px; 92 | white-space: nowrap; 93 | z-index: 9999; 94 | } 95 | 96 | .wrapper { 97 | display: flex; 98 | gap: 1rem; 99 | } 100 | 101 | ol { 102 | visibility: hidden; 103 | } 104 | 105 | .share, 106 | .screenshot { 107 | visibility: hidden; 108 | display: inline-block; 109 | border: none; 110 | padding-inline: 0.5rem; 111 | padding-inline-start: 42px; 112 | margin: 0; 113 | text-decoration: none; 114 | background-color: dodgerblue; 115 | background-position-y: 50%; 116 | background-position-x: 15%; 117 | border-radius: 4px; 118 | color: #fff; 119 | font-family: inherit; 120 | font-size: inherit; 121 | cursor: pointer; 122 | text-align: center; 123 | transition: 124 | background 250ms ease-in-out, 125 | transform 150ms ease; 126 | appearance: none; 127 | background-repeat: no-repeat; 128 | min-width: 7rem; 129 | } 130 | 131 | button:hover { 132 | background-color: var(--link-color); 133 | } 134 | 135 | button:active { 136 | transform: scale(0.99); 137 | } 138 | 139 | .ios { 140 | background-image: url('/share-ios.svg'); 141 | } 142 | 143 | .others { 144 | background-image: url('/share-others.svg'); 145 | } 146 | 147 | .screenshot { 148 | background-image: url('/screenshot.svg'); 149 | } 150 | 151 | img { 152 | vertical-align: middle; 153 | } 154 | 155 | code, 156 | label { 157 | color: var(--contrast-color); 158 | } 159 | 160 | code { 161 | font-size: 1rem; 162 | font-family: ui-monospace, monospace; 163 | } 164 | 165 | table { 166 | width: 100%; 167 | outline: solid 1px var(--table-alternate-color); 168 | outline-offset: -2px; 169 | } 170 | 171 | thead { 172 | background-color: var(--table-hover-color); 173 | } 174 | 175 | th { 176 | padding-block: 0.5rem; 177 | font-weight: normal; 178 | } 179 | 180 | td { 181 | padding: 0.25rem; 182 | position: relative; 183 | } 184 | 185 | tr > td:last-child { 186 | width: 100px; 187 | height: 2.75rem; 188 | } 189 | 190 | tbody > tr:nth-of-type(2n) { 191 | background-color: var(--table-alternate-color); 192 | } 193 | 194 | tbody > tr:hover { 195 | background-color: var(--table-hover-color); 196 | } 197 | 198 | footer { 199 | margin-block-start: 1rem; 200 | } 201 | 202 | meter { 203 | display: block; 204 | } 205 | 206 | .meter { 207 | width: 80px; 208 | height: 8px; 209 | background: #555; 210 | border-radius: 4px; 211 | } 212 | 213 | .meter > span { 214 | display: block; 215 | height: 100%; 216 | border-radius: 4px 2px 2px 4px; 217 | } 218 | 219 | .meter.green > span { 220 | background-color: green; 221 | } 222 | 223 | .meter.orange > span { 224 | background-color: orange; 225 | } 226 | 227 | .meter.red > span { 228 | background-color: red; 229 | } 230 | 231 | .legend { 232 | font-size: 0.75rem; 233 | text-align: start; 234 | } 235 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | howfuguismybrowser.dev 2 | -------------------------------------------------------------------------------- /docs/assets/main-5K-XWtAn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Apache-2.0 3 | * Copyright 2022 Google LLC 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))e(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const c of n.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&e(c)}).observe(document,{childList:!0,subtree:!0});function t(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerPolicy&&(n.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?n.credentials="include":r.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function e(r){if(r.ep)return;r.ep=!0;const n=t(r);fetch(r.href,n)}})();const te="modulepreload",re=function(a){return"/"+a},U={},ae=function(o,t,e){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");r=Promise.allSettled(t.map(p=>{if(p=re(p),p in U)return;U[p]=!0;const i=p.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${l}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":te,i||(s.as="script"),s.crossOrigin="",s.href=p,u&&s.setAttribute("nonce",u),document.head.appendChild(s),i)return new Promise((d,b)=>{s.addEventListener("load",d),s.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${p}`)))})}))}function n(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return r.then(c=>{for(const u of c||[])u.status==="rejected"&&n(u.reason);return o().catch(n)})},ne={"Absolute Orientation Sensor":{regEx:/new\s+AbsoluteOrientationSensor\s*\(/g,where:"JavaScript",supported:(async()=>"AbsoluteOrientationSensor"in self)(),featureDetection:"(async () => 'AbsoluteOrientationSensor' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:1900,chromeStatusID:5698781827825664},Accelerometer:{regEx:/new\s+Accelerometer\s*\(/g,where:"JavaScript",supported:(async()=>"Accelerometer"in self)(),featureDetection:"(async () => 'Accelerometer' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:1899,chromeStatusID:5698781827825664},"Add to Home Screen":{regEx:/["']beforeinstallprompt["']|\.onbeforeinstallprompt/g,where:"JavaScript",supported:(async()=>"BeforeInstallPromptEvent"in self)(),featureDetection:"(async () => 'BeforeInstallPromptEvent' in self)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent",blinkFeatureID:1436,chromeStatusID:6560913322672128},"Ambient Light Sensor":{regEx:/new\s+AmbientLightSensor\s*\(\)/g,where:"JavaScript",supported:(async()=>"AmbientLightSensor"in self)(),featureDetection:"(async () => 'AmbientLightSensor' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:1901,chromeStatusID:5298357018820608},"Async Clipboard":{regEx:/navigator\.clipboard\.writeText\s*\(/g,where:"JavaScript",supported:(async()=>"clipboard"in navigator&&"writeText"in navigator.clipboard)(),featureDetection:"(async () => 'clipboard' in navigator && 'writeText' in navigator.clipboard)()",documentation:"https://web.dev/async-clipboard/",blinkFeatureID:2372,chromeStatusID:5861289330999296},"Async Clipboard (Images)":{regEx:/navigator\.clipboard\.write\s*\(/g,where:"JavaScript",supported:(async()=>"clipboard"in navigator&&"write"in navigator.clipboard)(),featureDetection:"(async () => 'clipboard' in navigator && 'write' in navigator.clipboard)()",documentation:"https://web.dev/async-clipboard/",blinkFeatureID:2370,chromeStatusID:5074658793619456},"Background Fetch":{regEx:/\.backgroundFetch\.fetch\s*\(["']/g,where:"JavaScript",supported:(async()=>"BackgroundFetchManager"in self)(),featureDetection:"(async () => 'BackgroundFetchManager' in self)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Background_Fetch_API",blinkFeatureID:2549,chromeStatusID:5712608971718656},"Background Sync":{regEx:/\.sync\.register\s*\(["']/g,where:"JavaScript",supported:(async()=>"serviceWorker"in navigator&&"sync"in(await navigator.serviceWorker?.ready||self.registration))(),featureDetection:"(async () => 'serviceWorker' in navigator && 'sync' in (await navigator.serviceWorker?.ready || self.registration))()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Background_Synchronization_API",blinkFeatureID:745,chromeStatusID:6170807885627392},Badging:{regEx:/navigator\.setAppBadge\s*\(/g,where:"JavaScript",supported:(async()=>"setAppBadge"in navigator)(),featureDetection:"(async () => 'setAppBadge' in navigator)()",documentation:"https://developer.chrome.com/articles/badging-api/",blinkFeatureID:2726,chromeStatusID:6068482055602176},"Cache Storage":{regEx:/caches\.open\s*\(/g,where:"JavaScript",supported:(async()=>"serviceWorker"in navigator&&"caches"in self)(),featureDetection:"(async () => 'serviceWorker' in navigator && 'caches' in self)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage",blinkFeatureID:3022,chromeStatusID:6461631328419840},"Compression Streams":{regEx:/new\s+CompressionStream\s*\(/g,where:"JavaScript",supported:(async()=>"CompressionStream"in self)(),featureDetection:"(async () => 'CompressionStream' in self)()",documentation:"https://developer.chrome.com/blog/compression-streams-api/",blinkFeatureID:3060,chromeStatusID:5855937971617792},"Compute Pressure":{regEx:/new\s+ComputePressureObserver\s*\(/g,where:"JavaScript",supported:(async()=>"ComputePressureObserver"in self)(),featureDetection:"(async () => 'ComputePressureObserver' in self)()",documentation:"https://developer.chrome.com/docs/web-platform/compute-pressure/",blinkFeatureID:3899,chromeStatusID:5597608644968448},"Contact Picker":{regEx:/navigator\.contacts\.select\s*\(/g,where:"JavaScript",supported:(async()=>"contacts"in navigator)(),featureDetection:"(async () => 'contacts' in navigator)()",documentation:"https://developer.chrome.com/articles/contact-picker/",blinkFeatureID:2993,chromeStatusID:6511327140904960},"Content Index":{regEx:/index\.getAll\s*\(/g,where:"JavaScript",supported:(async()=>"serviceWorker"in navigator&&"index"in(await navigator.serviceWorker?.ready||self.registration))(),featureDetection:"(async () => 'serviceWorker' in navigator && 'index' in (await navigator.serviceWorker?.ready || self.registration))()",documentation:"https://developer.chrome.com/articles/content-indexing-api/",blinkFeatureID:2985,chromeStatusID:5658416729030656},"Credential Management":{regEx:/navigator\.credentials\.get\s*\(/g,where:"JavaScript",supported:(async()=>"credentials"in navigator)(),featureDetection:"(async () => 'credentials' in navigator)()",documentation:"https://developers.google.com/web/updates/2016/04/credential-management-api",blinkFeatureID:960,chromeStatusID:5026422640869376},"Device Memory":{regEx:/navigator\.deviceMemory/g,where:"JavaScript",supported:(async()=>"deviceMemory"in navigator)(),featureDetection:"(async () => 'deviceMemory' in navigator)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Device_Memory_API",blinkFeatureID:2121,chromeStatusID:5119701235531776},"Device Posture":{regEx:/navigator\.devicePosture/g,where:"JavaScript",supported:(async()=>"devicePosture"in navigator)(),featureDetection:"(async () => 'devicePosture' in navigator)()",documentation:"https://github.com/w3c/device-posture/blob/gh-pages/README.md",blinkFeatureID:4880,chromeStatusID:5185813744975872},"Digital Goods":{regEx:/getDigitalGoodsService\s*\(/g,where:"JavaScript",supported:(async()=>"getDigitalGoodsService"in self)(),featureDetection:"(async () => 'getDigitalGoodsService' in self)()",documentation:"https://developer.chrome.com/docs/android/trusted-web-activity/receive-payments-play-billing/",blinkFeatureID:3397,chromeStatusID:5339955595313152},EyeDropper:{regEx:/new\s+EyeDropper\s*\(\)/g,where:"JavaScript",supported:(async()=>"EyeDropper"in self)(),featureDetection:"(async () => 'EyeDropper' in self)()",documentation:"https://developer.chrome.com/articles/eyedropper/",blinkFeatureID:5042,chromeStatusID:6304275594477568},"File Handling":{regEx:/"file_handlers"/g,where:"Web App Manifest",supported:(async()=>"launchQueue"in self&&"files"in LaunchParams.prototype)(),featureDetection:"(async () => 'launchQueue' in self && 'files' in LaunchParams.prototype)()",documentation:"https://developer.chrome.com/articles/file-handling/",blinkFeatureID:3875,chromeStatusID:5721776357113856},"File System Observer":{regEx:/new\s+FileSystemObserver\s*\(/g,where:"JavaScript",supported:(async()=>"FileSystemObserver"in self)(),featureDetection:"(async () => 'FileSystemObserver' in self)()",documentation:"https://github.com/whatwg/fs/blob/main/proposals/FileSystemObserver.md",blinkFeatureID:5020,chromeStatusID:4622243656630272},"File System Access":{regEx:/showOpenFilePicker\s*\(|showSaveFilePicker\s*\(|showDirectoryPicker\s*\(/g,where:"JavaScript",supported:(async()=>"showOpenFilePicker"in self)(),featureDetection:"(async () => 'showOpenFilePicker' in self)()",documentation:"https://developer.chrome.com/articles/file-system-access/",blinkFeatureID:3340,chromeStatusID:6284708426022912},Gamepad:{regEx:/navigator\.getGamepads\s*\(/g,where:"JavaScript",supported:(async()=>"getGamepads"in navigator)(),featureDetection:"(async () => 'getGamepads' in navigator)()",documentation:"https://web.dev/gamepad/",blinkFeatureID:1916,chromeStatusID:5118776383111168},getInstalledRelatedApps:{regEx:/navigator\.getInstalledRelatedApps\s*\(/g,where:"JavaScript",supported:(async()=>"getInstalledRelatedApps"in navigator)(),featureDetection:"(async () => 'getInstalledRelatedApps' in navigator)()",documentation:"https://web.dev/get-installed-related-apps/",blinkFeatureID:1870,chromeStatusID:5695378309513216},"Gravity Sensor":{regEx:/new\s+GravitySensor\s*\(/g,where:"JavaScript",supported:(async()=>"GravitySensor"in self)(),featureDetection:"(async () => 'GravitySensor' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:3795,chromeStatusID:5384099747332096},Gyroscope:{regEx:/new\s+Gyroscope\s*\(/g,where:"JavaScript",supported:(async()=>"Gyroscope"in self)(),featureDetection:"(async () => 'Gyroscope' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:1906,chromeStatusID:5698781827825664},"Handwriting Recognition":{regEx:/navigator\.queryHandwritingRecognizerSupport\s*\(/g,where:"JavaScript",supported:(async()=>"queryHandwritingRecognizerSupport"in navigator)(),featureDetection:"(async () => 'queryHandwritingRecognizerSupport' in navigator)()",documentation:"https://developer.chrome.com/docs/web-platform/handwriting-recognition/",blinkFeatureID:3893,chromeStatusID:5263213807534080},HapticsDevice:{regEx:/\.haptics\.play\s*\(/g,where:"JavaScript",supported:(async()=>"HapticsDevice"in self)(),featureDetection:"(async () => 'HapticsDevice' in self)()",documentation:"https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/HapticsDevice/explainer.md",blinkFeatureID:void 0,chromeStatusID:5720648543371264},"Idle Detection":{regEx:/new\s+IdleDetector\s*\(/g,where:"JavaScript",supported:(async()=>"IdleDetector"in self)(),featureDetection:"(async () => 'IdleDetector' in self)()",documentation:"https://developer.chrome.com/articles/idle-detection/",blinkFeatureID:2834,chromeStatusID:4590256452009984},Ink:{regEx:/navigator\.ink\.requestPresenter\s*\(/g,where:"JavaScript",supported:(async()=>"ink"in navigator)(),featureDetection:"(async () => 'ink' in navigator)()",documentation:"https://blogs.windows.com/msedgedev/2021/08/18/enhancing-inking-on-the-web/",blinkFeatureID:5017,chromeStatusID:5961434129235968},"Insertable streams for MediaStreamTrack":{regEx:/MediaStreamTrackProcessor\s*\(/g,where:"JavaScript",supported:(async()=>"MediaStreamTrackProcessor"in self&&"MediaStreamTrackGenerator"in self)(),featureDetection:"(async () => 'MediaStreamTrackProcessor' in self && 'MediaStreamTrackGenerator' in self)()",documentation:"https://developer.chrome.com/articles/mediastreamtrack-insertable-media-processing/",blinkFeatureID:3729,chromeStatusID:5499415634640896},"Launch Handler":{regEx:/"launch_handler"/g,where:"Web App Manifest",supported:(async()=>"launchQueue"in self&&"targetURL"in LaunchParams.prototype)(),featureDetection:"(async () => 'launchQueue' in self && 'targetURL' in LaunchParams.prototype)()",documentation:"https://developer.chrome.com/docs/web-platform/launch-handler/",blinkFeatureID:4080,chromeStatusID:5722383233056768},"Linear Acceleration Sensor":{regEx:/new\s+LinearAccelerationSensor\s*\(/g,where:"JavaScript",supported:(async()=>"LinearAccelerationSensor"in self)(),featureDetection:"(async () => 'LinearAccelerationSensor' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:2051,chromeStatusID:5698781827825664},"Local Font Access":{regEx:/queryLocalFonts\s*\(/g,where:"JavaScript",supported:(async()=>"queryLocalFonts"in self)(),featureDetection:"(async () => 'queryLocalFonts' in self)()",documentation:"https://developer.chrome.com/articles/local-fonts/",blinkFeatureID:4211,chromeStatusID:6234451761692672},Magnetometer:{regEx:/new\s+Magnetometer\s*\(/g,where:"JavaScript",supported:(async()=>"Magnetometer"in self)(),featureDetection:"(async () => 'Magnetometer' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:1907,chromeStatusID:5698781827825664},"Media Capabilities":{regEx:/navigator\.mediaCapabilities\.decodingInfo\s*\(/g,where:"JavaScript",supported:(async()=>"mediaCapabilities"in navigator)(),featureDetection:"(async () => 'mediaCapabilities' in navigator)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Media_Capabilities_API",blinkFeatureID:2239,chromeStatusID:5869632707624960},"Media Session":{regEx:/navigator\.mediaSession\.setActionHandler|navigator\.mediaSession\.metadata/g,where:"JavaScript",supported:(async()=>"mediaSession"in navigator)(),featureDetection:"(async () => 'mediaSession' in navigator)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API",blinkFeatureID:1792,chromeStatusID:5639924124483584},"Window Management":{regEx:/getScreenDetails\s*\(\)/g,where:"JavaScript",supported:(async()=>"getScreenDetails"in self)(),featureDetection:"(async () => 'getScreenDetails' in self)()",documentation:"https://developer.chrome.com/articles/window-management/",blinkFeatureID:3388,chromeStatusID:5252960583942144},"Navigation Preload":{regEx:/\.navigationPreload\.enable\s*\(\)/g,where:"JavaScript",supported:(async()=>"serviceWorker"in navigator&&"navigationPreload"in(await navigator.serviceWorker?.ready||self.registration))(),featureDetection:"(async () => 'serviceWorker' in navigator && 'navigationPreload' in (await navigator.serviceWorker?.ready || self.registration))()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/NavigationPreloadManager",blinkFeatureID:1803,chromeStatusID:5734842339688448},"Origin Private File System":{regEx:/navigator\.storage\.getDirectory\s*\(\)/g,where:"JavaScript",supported:(async()=>"StorageManager"in self&&"getDirectory"in StorageManager.prototype)(),featureDetection:"(async () => 'StorageManager' in self && 'getDirectory' in StorageManager.prototype)()",documentation:"https://web.dev/origin-private-file-system/",blinkFeatureID:3428,chromeStatusID:5702777582911488},"Payment Handler":{regEx:/\.paymentManager\.instruments\.set\s*\(/g,where:"JavaScript",supported:(async()=>"PaymentInstruments"in self)(),featureDetection:"(async () => 'PaymentInstruments' in self)()",documentation:"https://web.dev/registering-a-web-based-payment-app/",blinkFeatureID:2397,chromeStatusID:5160285237149696},"Payment Request":{regEx:/new\s+PaymentRequest\s*\(/g,where:"JavaScript",supported:(async()=>"PaymentRequest"in self)(),featureDetection:"(async () => 'PaymentRequest' in self)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API",blinkFeatureID:2894,chromeStatusID:5639348045217792},"Periodic Background Sync":{regEx:/periodicSync\.register\s*\(/g,where:"JavaScript",supported:(async()=>"PeriodicSyncManager"in self)(),featureDetection:"(async () => 'PeriodicSyncManager' in self)()",documentation:"https://developer.chrome.com/articles/periodic-background-sync/",blinkFeatureID:2931,chromeStatusID:5689383275462656},"Persistent Storage":{regEx:/navigator\.storage\.persist\s*\(\)/g,where:"JavaScript",supported:(async()=>"storage"in navigator&&"persist"in navigator.storage)(),featureDetection:"(async () => 'storage' in navigator && 'persist' in navigator.storage)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist",blinkFeatureID:1369,chromeStatusID:5715811364765696},"Storage Buckets":{regEx:/navigator\.storageBuckets\.open\s*\(/g,where:"JavaScript",supported:(async()=>"storageBuckets"in navigator)(),featureDetection:"(async () => 'storageBuckets' in navigator)()",documentation:"https://developer.chrome.com/blog/storage-buckets/",blinkFeatureID:4378,chromeStatusID:5739224579964928},"Pointer Lock (unadjustedMovement)":{regEx:/unadjustedMovement\s*:\s*/g,where:"JavaScript",supported:(async()=>"HTMLParagraphElement"in self?await(async()=>{try{return!!await document.createElement("p").requestPointerLock({unadjustedMovement:!0})}catch{return"requestPointerLock"in HTMLParagraphElement.prototype}})():void 0)(),featureDetection:`(async () => 'HTMLParagraphElement' in self ? await (async () => { try { return !!await document.createElement("p").requestPointerLock({ unadjustedMovement: true }) } catch { return 'requestPointerLock' in HTMLParagraphElement.prototype } })() : undefined)()`,documentation:"https://web.dev/disable-mouse-acceleration/",blinkFeatureID:3027,chromeStatusID:5723553087356928},"Protocol Handlers":{regEx:/"protocol_handlers"/g,where:"Web App Manifest",supported:(async()=>{})(),featureDetection:"(async () => undefined)()",documentation:"https://developer.chrome.com/articles/url-protocol-handler/",blinkFeatureID:3884,chromeStatusID:5151703944921088},Push:{regEx:/\.pushManager\.subscribe\s*\(/g,where:"JavaScript",supported:(async()=>"serviceWorker"in navigator&&"pushManager"in(await navigator.serviceWorker?.ready||self.registration))(),featureDetection:"(async () => 'serviceWorker' in navigator && 'pushManager' in (await navigator.serviceWorker?.ready || self.registration))()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Push_API",blinkFeatureID:371,chromeStatusID:5416033485586432},"Relative Orientation Sensor":{regEx:/new\s+RelativeOrientationSensor\s*\(/g,where:"JavaScript",supported:(async()=>"RelativeOrientationSensor"in self)(),featureDetection:"(async () => 'RelativeOrientationSensor' in self)()",documentation:"https://developer.chrome.com/articles/generic-sensor/",blinkFeatureID:2019,chromeStatusID:5698781827825664},"Screen Wake Lock":{regEx:/navigator\.wakeLock\.request\s*\(/g,where:"JavaScript",supported:(async()=>"wakeLock"in navigator)(),featureDetection:"(async () => 'wakeLock' in navigator)()",documentation:"https://developer.chrome.com/articles/wake-lock/",blinkFeatureID:3005,chromeStatusID:4636879949398016},"Service Worker":{regEx:/navigator\.serviceWorker\.register\s*\(/g,where:"JavaScript",supported:(async()=>"serviceWorker"in navigator)(),featureDetection:"(async () => 'serviceWorker' in navigator)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API",blinkFeatureID:990,chromeStatusID:6561526227927040},"Shape Detection (Barcodes)":{regEx:/new\s+BarcodeDetector\s*\(/g,where:"JavaScript",supported:(async()=>"BarcodeDetector"in self)(),featureDetection:"(async () => 'BarcodeDetector' in self)()",documentation:"https://developer.chrome.com/articles/shape-detection/",blinkFeatureID:3711,chromeStatusID:4757990523535360},"Shape Detection (Faces)":{regEx:/new\s+FaceDetector\s*\(/g,where:"JavaScript",supported:(async()=>"FaceDetector"in self)(),featureDetection:"(async () => 'FaceDetector' in self)()",documentation:"https://developer.chrome.com/articles/shape-detection/",blinkFeatureID:3712,chromeStatusID:5678216012365824},"Shape Detection (Texts)":{regEx:/new\s+TextDetector\s*\(/g,where:"JavaScript",supported:(async()=>"TextDetector"in self)(),featureDetection:"(async () => 'TextDetector' in self)()",documentation:"https://developer.chrome.com/articles/shape-detection/",blinkFeatureID:3713,chromeStatusID:5644087665360896},Shortcuts:{regEx:/"shortcuts"/g,where:"Web App Manifest",supported:(async()=>{})(),featureDetection:"(async () => undefined)()",documentation:"https://web.dev/app-shortcuts/",blinkFeatureID:void 0,chromeStatusID:5706099464339456},"Storage Estimation":{regEx:/navigator\.storage\.estimate\s*\(\)/g,where:"JavaScript",supported:(async()=>"storage"in navigator&&"estimate"in navigator.storage)(),featureDetection:"(async () => 'storage' in navigator && 'estimate' in navigator.storage)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/estimate",blinkFeatureID:1371,chromeStatusID:5630353511284736},"Tabbed Application Mode":{regEx:/"tabbed"/g,where:"Web App Manifest",supported:(async()=>{})(),featureDetection:"(async () => undefined)()",documentation:"https://web.dev/tabbed-application-mode/",blinkFeatureID:4608,chromeStatusID:5128143454076928},VirtualKeyboard:{regEx:/navigator\.virtualKeyboard/g,where:"JavaScript",supported:(async()=>"virtualKeyboard"in navigator)(),featureDetection:"(async () => 'virtualKeyboard' in navigator)()",documentation:"https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/VirtualKeyboardAPI/explainer.md",blinkFeatureID:4640,chromeStatusID:5717448231747584},"Web App Link Handling":{regEx:/"handle_links"/g,where:"Web App Manifest",supported:(async()=>{})(),featureDetection:"(async () => undefined)()",documentation:"https://github.com/WICG/pwa-url-handler/blob/main/handle_links/explainer.md",blinkFeatureID:4109,chromeStatusID:5740751225880576},"Web Audio":{regEx:/new\s+AudioContext\s*\(/g,where:"JavaScript",supported:(async()=>"AudioContext"in self)(),featureDetection:"(async () => 'AudioContext' in self)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API",blinkFeatureID:1698,chromeStatusID:6261718720184320},"Web Share":{regEx:/navigator\.share\s*\(/g,where:"JavaScript",supported:(async()=>"share"in navigator)(),featureDetection:"(async () => 'share' in navigator)()",documentation:"https://web.dev/web-share/",blinkFeatureID:1501,chromeStatusID:5668769141620736},"Web Share (Files)":{regEx:/navigator\.canShare\s*\(/g,where:"JavaScript",supported:(async()=>"canShare"in navigator)(),featureDetection:"(async () => 'canShare' in navigator)()",documentation:"https://web.dev/web-share/",blinkFeatureID:2737,chromeStatusID:4777349178458112},"Web Share Target":{regEx:/"share_target"/g,where:"Web App Manifest",supported:(async()=>{})(),featureDetection:"(async () => undefined)()",documentation:"https://developer.chrome.com/articles/web-share-target/",blinkFeatureID:void 0,chromeStatusID:5662315307335680},"Web Share Target (Files)":{regEx:/"enctype"\s*:\s*"multipart\/form-data"/g,where:"Web App Manifest",supported:(async()=>{})(),featureDetection:"(async () => undefined)()",documentation:"https://developer.chrome.com/articles/web-share-target/",blinkFeatureID:void 0,chromeStatusID:6124071381106688},"Web Bluetooth":{regEx:/navigator\.bluetooth\.requestDevice\s*\(/g,where:"JavaScript",supported:(async()=>"bluetooth"in navigator)(),featureDetection:"(async () => 'bluetooth' in navigator)()",documentation:"https://developer.chrome.com/articles/bluetooth/",blinkFeatureID:1670,chromeStatusID:5264933985976320},WebCodecs:{regEx:/new\s+MediaStreamTrackProcessor\s*\(/g,where:"JavaScript",supported:(async()=>"MediaStreamTrackProcessor"in self)(),featureDetection:"(async () => 'MediaStreamTrackProcessor' in self)()",documentation:"https://developer.chrome.com/articles/webcodecs/",blinkFeatureID:3728,chromeStatusID:5669293909868544},WebGPU:{regEx:/navigator\.gpu\.requestAdapter\s*\(/g,where:"JavaScript",supported:(async()=>"gpu"in navigator)(),featureDetection:"(async () => 'gpu' in navigator)()",documentation:"https://developer.chrome.com/docs/web-platform/webgpu/",blinkFeatureID:3888,chromeStatusID:6213121689518080},WebHID:{regEx:/navigator\.hid\.requestDevice\s*\(/g,where:"JavaScript",supported:(async()=>"hid"in navigator)(),featureDetection:"(async () => 'hid' in navigator)()",documentation:"https://developer.chrome.com/articles/hid/",blinkFeatureID:2866,chromeStatusID:5172464636133376},"Web MIDI":{regEx:/navigator\.requestMIDIAccess\s*\(/g,where:"JavaScript",supported:(async()=>"requestMIDIAccess"in navigator)(),featureDetection:"(async () => 'requestMIDIAccess' in navigator)()",documentation:"https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API",blinkFeatureID:2029,chromeStatusID:4923613069180928},"Web NFC":{regEx:/new\s+NDEFReader\s*\(/g,where:"JavaScript",supported:(async()=>"NDEFReader"in self)(),featureDetection:"(async () => 'NDEFReader' in self)()",documentation:"https://developer.chrome.com/articles/nfc/",blinkFeatureID:3094,chromeStatusID:6261030015467520},WebOTP:{regEx:/transport\s*:\s*\[["']sms["']\]/g,where:"JavaScript",supported:(async()=>"OTPCredential"in self)(),featureDetection:"(async () => 'OTPCredential' in self)()",documentation:"https://developer.chrome.com/articles/web-otp/",blinkFeatureID:2880,chromeStatusID:5873577578463232},"Web Serial":{regEx:/navigator\.serial\.requestPort\s*\(/g,where:"JavaScript",supported:(async()=>"serial"in navigator)(),featureDetection:"(async () => 'serial' in navigator)()",documentation:"https://developer.chrome.com/articles/serial/",blinkFeatureID:2546,chromeStatusID:6577673212002304},WebSocketStream:{regEx:/new\s+WebSocketStream\s*\(/g,where:"JavaScript",supported:(async()=>"WebSocketStream"in self)(),featureDetection:"(async () => 'WebSocketStream' in self)()",documentation:"https://developer.chrome.com/articles/websocketstream/",blinkFeatureID:3018,chromeStatusID:5189728691290112},WebTransport:{regEx:/new\s+WebTransport\s*\(/g,where:"JavaScript",supported:(async()=>"WebTransport"in self)(),featureDetection:"(async () => 'WebTransport' in self)()",documentation:"https://developer.chrome.com/articles/webtransport/",blinkFeatureID:3472,chromeStatusID:4854144902889472},WebUSB:{regEx:/navigator\.usb\.requestDevice\s*\(/g,where:"JavaScript",supported:(async()=>"usb"in navigator)(),featureDetection:"(async () => 'usb' in navigator)()",documentation:"https://developer.chrome.com/articles/usb/",blinkFeatureID:1520,chromeStatusID:5651917954875392},"Window Controls Overlay":{regEx:/"window-controls-overlay"/g,where:"Web App Manifest",supported:(async()=>"windowControlsOverlay"in navigator)(),featureDetection:"(async () => 'windowControlsOverlay' in navigator)()",documentation:"https://web.dev/window-controls-overlay/",blinkFeatureID:3902,chromeStatusID:5741247866077184}};var C,B;function oe(){return B||(B=1,C=function(a){var o={};function t(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return a[e].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=a,t.c=o,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r||4&r&&typeof e=="object"&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&typeof e!="string")for(var c in e)t.d(n,c,function(u){return e[u]}.bind(null,c));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(a,o,t){var e=t(2),r=t(3),n=t(4);a.exports=function(c){return e(c)||r(c)||n()}},function(a,o,t){t.r(o),t.d(o,"sparkline",function(){return p});var e=t(0),r=t.n(e);function n(i,l,s,d){return parseFloat((l-d*l/i+s).toFixed(2))}function c(i){return i.value}function u(i,l){var s=document.createElementNS("http://www.w3.org/2000/svg",i);for(var d in l)s.setAttribute(d,l[d]);return s}function p(i,l,s){var d;if(d=i,r()(d.querySelectorAll("*")).forEach(function(g){return d.removeChild(g)}),!(l.length<=1)){s=s||{},typeof l[0]=="number"&&(l=l.map(function(g){return{value:g}}));var b=s.onmousemove,O=s.onmouseout,G="interactive"in s?s.interactive:!!b,k=s.spotRadius||2,D=2*k,z=s.cursorWidth||2,M=parseFloat(i.attributes["stroke-width"].value),$=s.fetch||c,x=l.map(function(g){return $(g)}),V=parseFloat(i.attributes.width.value)-2*D,E=parseFloat(i.attributes.height.value),q=E-2*M-D,T=Math.max.apply(Math,r()(x)),v=-1e3,R=x.length-1,K=V/R,I=[],Q=n(T,q,M+k,x[0]),W="M".concat(D," ").concat(Q);x.forEach(function(g,f){var h=f*K+D,y=n(T,q,M+k,g);I.push(Object.assign({},l[f],{index:f,x:h,y})),W+=" L ".concat(h," ").concat(y)});var Y=u("path",{class:"sparkline--line",d:W,fill:"none"}),X=u("path",{class:"sparkline--fill",d:"".concat(W," V ").concat(E," L ").concat(D," ").concat(E," Z"),stroke:"none"});if(i.appendChild(X),i.appendChild(Y),G){var w=u("line",{class:"sparkline--cursor",x1:v,x2:v,y1:0,y2:E,"stroke-width":z}),F=u("circle",{class:"sparkline--spot",cx:v,cy:v,r:k});i.appendChild(w),i.appendChild(F);var J=u("rect",{width:i.attributes.width.value,height:i.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});i.appendChild(J),J.addEventListener("mouseout",function(g){w.setAttribute("x1",v),w.setAttribute("x2",v),F.setAttribute("cx",v),O&&O(g)}),J.addEventListener("mousemove",function(g){var f=g.offsetX,h=I.find(function(ee){return ee.x>=f});h||(h=I[R]);var y,P=I[I.indexOf(h)-1],L=(y=P?P.x+(h.x-P.x)/2<=f?h:P:h).x,Z=y.y;F.setAttribute("cx",L),F.setAttribute("cy",Z),w.setAttribute("x1",L),w.setAttribute("x2",L),b&&b(g,y)})}}}o.default=p},function(a,o){a.exports=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e{const e=a.target.closest("svg").nextElementSibling,r=new Date(o.date).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});e.hidden=!1,e.textContent=`On ${r} on ${o.value.toFixed(6)}% of pages`,e.style.top=`${a.offsetY}px`,e.style.left=`${a.offsetX+20}px`},de=a=>{const t=a.target.closest("svg").nextElementSibling;t.hidden=!0},ge=async(a,o)=>{let t=await fetch(se+o).then(e=>e.json());if(t=t.map(e=>({date:e.date,value:e.day_percentage*100})),t.filter(e=>e.value!==0).length===0){const e=a.parentNode.parentNode;a.parentNode.remove(),e.textContent=N;return}ie.sparkline(a,t,{onmousemove:pe,onmouseout:de}),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.style.display="block"};window.addEventListener("load",async()=>{"serviceWorker"in navigator&&await navigator.serviceWorker.register("./sw.js");let a=await Promise.all(Object.entries(ne).map(t=>new Promise(async e=>{t[1].supported=await t[1].supported,t[1].supported&&_++,t[1].supported!==void 0&&S++,e(t)})));a=a.sort((t,e)=>!t[1].supported&&e[1].supported?1:t[1].supported&&!e[1].supported?-1:0),a=[!0,!1,void 0].map(t=>a.filter(e=>e[1].supported===t).sort((e,r)=>(e=e[0].toLowerCase(),r=r[0].toLowerCase(),e>r?1:eimport("./share-D5g2DLjW.js"),[])}); 7 | -------------------------------------------------------------------------------- /docs/assets/main-CNuglGdF.css: -------------------------------------------------------------------------------- 1 | :root{--main-background-color: #fff;--main-color: #111;--table-alternate-color: #eee;--table-hover-color: #ddd;--link-color: rgb(0 0 238);--contrast-color: deeppink;color-scheme:dark light}@media (prefers-color-scheme: dark){:root{--main-background-color: #111;--main-color: #eee;--table-alternate-color: #222;--table-hover-color: #333;--link-color: rgb(158 158 255)}}html,body{color:var(--main-color);background-color:var(--main-background-color)}html{display:flex;align-items:center;justify-content:center}body{width:60ch;max-width:60ch;font-family:system-ui,sans-serif;margin-block:1rem}h1{color:var(--contrast-color);font-size:1.25rem}a{color:var(--link-color)}a:hover{color:var(--contrast-color)}.sparkline{stroke:var(--main-color);fill:none}.sparkline--spot{stroke:var(--contrast-color);fill:var(--contrast-color)}.sparkline--cursor{stroke:var(--contrast-color)}.tooltip{position:absolute;background-color:var(--main-background-color);color:var(--main-color);padding:2px 5px;font-size:12px;white-space:nowrap;z-index:9999}.wrapper{display:flex;gap:1rem}ol{visibility:hidden}.share,.screenshot{visibility:hidden;display:inline-block;border:none;padding-inline:.5rem;padding-inline-start:42px;margin:0;text-decoration:none;background-color:#1e90ff;background-position-y:50%;background-position-x:15%;border-radius:4px;color:#fff;font-family:inherit;font-size:inherit;cursor:pointer;text-align:center;transition:background .25s ease-in-out,transform .15s ease;appearance:none;background-repeat:no-repeat;min-width:7rem}button:hover{background-color:var(--link-color)}button:active{transform:scale(.99)}.ios{background-image:url(/share-ios.svg)}.others{background-image:url(/share-others.svg)}.screenshot{background-image:url(/screenshot.svg)}img{vertical-align:middle}code,label{color:var(--contrast-color)}code{font-size:1rem;font-family:ui-monospace,monospace}table{width:100%;outline:solid 1px var(--table-alternate-color);outline-offset:-2px}thead{background-color:var(--table-hover-color)}th{padding-block:.5rem;font-weight:400}td{padding:.25rem;position:relative}tr>td:last-child{width:100px;height:2.75rem}tbody>tr:nth-of-type(2n){background-color:var(--table-alternate-color)}tbody>tr:hover{background-color:var(--table-hover-color)}footer{margin-block-start:1rem}meter{display:block}.meter{width:80px;height:8px;background:#555;border-radius:4px}.meter>span{display:block;height:100%;border-radius:4px 2px 2px 4px}.meter.green>span{background-color:green}.meter.orange>span{background-color:orange}.meter.red>span{background-color:red}.legend{font-size:.75rem;text-align:start} 2 | -------------------------------------------------------------------------------- /docs/assets/manifest-VZotnU81.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "How Fugu is my browser?", 3 | "short_name": "How Fugu?", 4 | "description": "The cross-company effort Project Fugu has the objective of making it possible for Web apps to do anything iOS, Android, or desktop apps can. Find out where on this exciting journey your current browser is!", 5 | "start_url": "https://howfuguismybrowser.dev/", 6 | "display": "standalone", 7 | "theme_color": "deeppink", 8 | "background_color": "#111", 9 | "orientation": "portrait", 10 | "language": "en", 11 | "icons": [ 12 | { 13 | "src": "https://howfuguismybrowser.dev/fugu.svg", 14 | "type": "image/svg+xml", 15 | "sizes": "150x150", 16 | "purpose": "any" 17 | }, 18 | { 19 | "src": "https://howfuguismybrowser.dev/fugu.png", 20 | "type": "image/png", 21 | "sizes": "320x320", 22 | "purpose": "any" 23 | }, 24 | { 25 | "src": "https://howfuguismybrowser.dev/fugu_maskable.png", 26 | "type": "image/png", 27 | "sizes": "1024x1024", 28 | "purpose": "maskable" 29 | } 30 | ], 31 | "screenshots": [ 32 | { 33 | "src": "https://howfuguismybrowser.dev/wide_light.png", 34 | "sizes": "1341x869", 35 | "type": "image/png", 36 | "platform": "wide", 37 | "label": "Desktop (light mode)" 38 | }, 39 | { 40 | "src": "https://howfuguismybrowser.dev/wide_dark.png", 41 | "sizes": "1341x869", 42 | "type": "image/png", 43 | "platform": "wide", 44 | "label": "Desktop (dark mode)" 45 | }, 46 | { 47 | "src": "https://howfuguismybrowser.dev/narrow_light.png", 48 | "sizes": "1081x2162", 49 | "type": "image/png", 50 | "platform": "narrow", 51 | "label": "Mobile (light mode)" 52 | }, 53 | { 54 | "src": "https://howfuguismybrowser.dev/narrow_dark.png", 55 | "sizes": "1081x2162", 56 | "type": "image/png", 57 | "platform": "narrow", 58 | "label": "Mobile (dark mode)" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /docs/fugu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/docs/fugu.png -------------------------------------------------------------------------------- /docs/fugu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/fugu_maskable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/docs/fugu_maskable.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 20 | 24 | 25 | 26 | 27 | 31 | 32 | 36 | How Fugu is my browser? 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 |

How Fugu is my browser?

48 | 49 |

50 | The cross-company effort 51 | Project Fugu 54 | has the objective of making it possible for Web apps to do 55 | anything iOS, Android, or desktop apps can. 56 |

57 |

58 | We do this by exposing the capabilities of these platforms to the Web, 59 | all while maintaining user security, privacy, trust, and other core 60 | tenets of the Web. 61 |

62 |

63 | Find out below where on this exciting journey your current browser is 64 | and share it with others! 65 |

66 |
    67 |
  1. Click Screenshot to download the results.
  2. 68 |
  3. Click Share and attach the screenshot.
  4. 69 |
70 | 71 |
72 |
73 | A blowfish, the Project Fugu logo. 79 | 80 | 81 | 84 |
85 | 86 | 87 |
88 | 89 | 94 | 95 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 115 | 116 | 117 | 118 | 119 | 120 | 127 | 128 | 138 |
139 | 140 | 141 | -------------------------------------------------------------------------------- /docs/narrow_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/docs/narrow_dark.png -------------------------------------------------------------------------------- /docs/narrow_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/docs/narrow_light.png -------------------------------------------------------------------------------- /docs/offline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | How Fugu is my browser? 13 | 14 | 69 | 70 | 71 |
72 |

How Fugu is my browser? (Offline)

73 | 74 |

75 | The cross-company effort 76 | Project Fugu has the 77 | objective of making it possible for Web apps to do 78 | anything iOS, Android, or desktop apps can. 79 |

80 |

81 | We do this by exposing the capabilities of these platforms to the Web, 82 | all while maintaining user security, privacy, trust, and other core 83 | tenets of the Web. 84 |

85 |

86 | Find out when you are back online where on this exciting 87 | journey your current browser is! 88 |

89 | 94 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /docs/screenshot.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/share-ios.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/share-others.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/sw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license Apache-2.0 3 | * Copyright 2022 Google LLC 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | /** 7 | * Copyright 2022 Google LLC. All Rights Reserved. 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | const CACHE_NAME = 'offline'; 20 | // Customize this with a different URL if needed. 21 | const OFFLINE_URL = './offline.html'; 22 | 23 | self.addEventListener('install', (event) => { 24 | event.waitUntil( 25 | (async () => { 26 | const cache = await caches.open(CACHE_NAME); 27 | // Setting {cache: 'reload'} in the new request will ensure that the 28 | // response isn't fulfilled from the HTTP cache; i.e., it will be from 29 | // the network. 30 | await cache.add(new Request(OFFLINE_URL, { cache: 'reload' })); 31 | })(), 32 | ); 33 | // Force the waiting service worker to become the active service worker. 34 | self.skipWaiting(); 35 | }); 36 | 37 | self.addEventListener('activate', (event) => { 38 | event.waitUntil( 39 | (async () => { 40 | // Enable navigation preload if it's supported. 41 | // See https://developers.google.com/web/updates/2017/02/navigation-preload 42 | if ('navigationPreload' in self.registration) { 43 | await self.registration.navigationPreload.enable(); 44 | } 45 | })(), 46 | ); 47 | // Tell the active service worker to take control of the page immediately. 48 | self.clients.claim(); 49 | }); 50 | 51 | self.addEventListener('fetch', (event) => { 52 | // We only want to call event.respondWith() if this is a navigation request 53 | // for an HTML page. 54 | if (event.request.mode === 'navigate') { 55 | event.respondWith( 56 | (async () => { 57 | try { 58 | // First, try to use the navigation preload response if it's supported. 59 | const preloadResponse = await event.preloadResponse; 60 | if (preloadResponse) { 61 | return preloadResponse; 62 | } 63 | 64 | // Always try the network first. 65 | const networkResponse = await fetch(event.request); 66 | return networkResponse; 67 | } catch { 68 | const cache = await caches.open(CACHE_NAME); 69 | const cachedResponse = await cache.match(OFFLINE_URL); 70 | return cachedResponse; 71 | } 72 | })(), 73 | ); 74 | } 75 | 76 | // If our if() condition is false, then this fetch handler won't intercept the 77 | // request. If there are any other fetch handlers registered, they will get a 78 | // chance to call event.respondWith(). If no fetch handlers call 79 | // event.respondWith(), the request will be handled by the browser as if there 80 | // were no service worker involvement. 81 | }); 82 | -------------------------------------------------------------------------------- /docs/wide_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/docs/wide_dark.png -------------------------------------------------------------------------------- /docs/wide_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/docs/wide_light.png -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import google from 'eslint-config-google-jsdocless'; 2 | import prettier from 'eslint-config-prettier'; 3 | 4 | // ignore unused exports 5 | export default [ 6 | google, 7 | prettier, 8 | { 9 | files: ['**/*.js', '**/*.mjs'], 10 | languageOptions: { 11 | parserOptions: { 12 | ecmaVersion: 2020, 13 | sourceType: 'module', 14 | }, 15 | }, 16 | }, 17 | ]; 18 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 20 | 24 | 25 | 26 | 27 | 31 | 32 | 36 | How Fugu is my browser? 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 |

How Fugu is my browser?

48 | 49 |

50 | The cross-company effort 51 | Project Fugu 54 | has the objective of making it possible for Web apps to do 55 | anything iOS, Android, or desktop apps can. 56 |

57 |

58 | We do this by exposing the capabilities of these platforms to the Web, 59 | all while maintaining user security, privacy, trust, and other core 60 | tenets of the Web. 61 |

62 |

63 | Find out below where on this exciting journey your current browser is 64 | and share it with others! 65 |

66 |
    67 |
  1. Click Screenshot to download the results.
  2. 68 |
  3. Click Share and attach the screenshot.
  4. 69 |
70 | 71 |
72 |
73 | A blowfish, the Project Fugu logo. 79 | 80 | 81 | 84 |
85 | 86 | 87 |
88 | 89 | 94 | 95 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 115 | 116 | 117 | 118 | 119 | 120 | 127 | 128 | 138 |
139 | 140 | 141 | -------------------------------------------------------------------------------- /js/script.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2022 Google LLC. All Rights Reserved. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | 14 | import patterns from 'fugu-api-data/patterns'; 15 | import { sparkline } from '@fnando/sparkline'; 16 | 17 | const CHROME_STATUS_API_URL = 18 | 'https://chromestatus.com/data/timeline/featurepopularity?bucket_id='; 19 | const CHROME_STATUS_POPULARITY_URL = 20 | 'https://chromestatus.com/metrics/feature/timeline/popularity/'; 21 | 22 | const NO_DATA = 'No data'; 23 | 24 | // DOM references. 25 | const tbody = document.querySelector('tbody'); 26 | const meter = document.querySelector('meter'); 27 | const fakeMeter = document.querySelector('.meter'); 28 | const label = document.querySelector('label'); 29 | const code = document.querySelector('code'); 30 | const template = document.querySelector('template'); 31 | 32 | let totalValues = 0; 33 | let trueValues = 0; 34 | 35 | const onmousemove = (event, datapoint) => { 36 | const svg = event.target.closest('svg'); 37 | const tooltip = svg.nextElementSibling; 38 | const date = new Date(datapoint.date).toLocaleDateString(undefined, { 39 | year: 'numeric', 40 | month: 'short', 41 | day: 'numeric', 42 | }); 43 | tooltip.hidden = false; 44 | tooltip.textContent = `On ${date} on ${datapoint.value.toFixed(6)}% of pages`; 45 | tooltip.style.top = `${event.offsetY}px`; 46 | tooltip.style.left = `${event.offsetX + 20}px`; 47 | }; 48 | 49 | const onmouseout = (event) => { 50 | const svg = event.target.closest('svg'); 51 | const tooltip = svg.nextElementSibling; 52 | tooltip.hidden = true; 53 | }; 54 | 55 | const getSVGCode = async (svg, blinkFeatureID) => { 56 | let data = await fetch(CHROME_STATUS_API_URL + blinkFeatureID).then( 57 | (response) => response.json(), 58 | ); 59 | data = data.map((item) => { 60 | return { 61 | date: item.date, 62 | value: item.day_percentage * 100, 63 | }; 64 | }); 65 | if (data.filter((item) => item.value !== 0).length === 0) { 66 | const td = svg.parentNode.parentNode; 67 | svg.parentNode.remove(); 68 | td.textContent = NO_DATA; 69 | return; 70 | } 71 | sparkline(svg, data, { 72 | onmousemove, 73 | onmouseout, 74 | }); 75 | svg.setAttribute('width', '100%'); 76 | svg.setAttribute('height', '100%'); 77 | svg.style.display = 'block'; 78 | }; 79 | 80 | window.addEventListener('load', async () => { 81 | if ('serviceWorker' in navigator) { 82 | // Some of the feature detection tests ideally need a service worker. 83 | await navigator.serviceWorker.register('./sw.js'); 84 | } 85 | 86 | // Await all the promises. 87 | let patternsResolved = await Promise.all( 88 | Object.entries(patterns).map( 89 | (pattern) => 90 | new Promise(async (resolve) => { 91 | pattern[1].supported = await pattern[1].supported; 92 | if (pattern[1].supported) trueValues++; 93 | if (pattern[1].supported !== undefined) totalValues++; 94 | resolve(pattern); 95 | }), 96 | ), 97 | ); 98 | 99 | // Sort by supported status. 100 | patternsResolved = patternsResolved.sort((a, b) => { 101 | if (!a[1].supported && b[1].supported) return 1; 102 | if (a[1].supported && !b[1].supported) return -1; 103 | return 0; 104 | }); 105 | 106 | // Sort by API name. 107 | patternsResolved = [true, false, undefined] 108 | .map((supported) => 109 | patternsResolved 110 | .filter((pattern) => pattern[1].supported === supported) 111 | .sort((a, b) => { 112 | a = a[0].toLowerCase(); 113 | b = b[0].toLowerCase(); 114 | if (a > b) return 1; 115 | if (a < b) return -1; 116 | return 0; 117 | }), 118 | ) 119 | .flat(); 120 | 121 | // Create HTML. 122 | for (const [api, value] of patternsResolved) { 123 | const tr = document.createElement('tr'); 124 | tbody.append(tr); 125 | const td1 = document.createElement('td'); 126 | const td2 = document.createElement('td'); 127 | const td3 = document.createElement('td'); 128 | tr.append(td1); 129 | tr.append(td2); 130 | tr.append(td3); 131 | const a = document.createElement('a'); 132 | a.textContent = api; 133 | a.href = value.documentation; 134 | td1.append(a); 135 | td2.classList.add('icon'); 136 | td2.textContent = value.supported 137 | ? '✅ Yes' 138 | : value.supported === undefined 139 | ? '🤷 Unknown' 140 | : '🚫 No'; 141 | if (value.blinkFeatureID) { 142 | const clone = template.content.cloneNode(true); 143 | const svg = clone.querySelector('svg'); 144 | svg.style.display = 'none'; 145 | const tooltip = clone.querySelector('span'); 146 | const link = document.createElement('a'); 147 | link.href = `${CHROME_STATUS_POPULARITY_URL}${value.blinkFeatureID}`; 148 | td3.append(link); 149 | link.append(svg); 150 | link.append(tooltip); 151 | getSVGCode(svg, value.blinkFeatureID); 152 | } else { 153 | td3.textContent = NO_DATA; 154 | } 155 | } 156 | tbody.parentNode.hidden = false; 157 | 158 | const percentage = `${Math.floor((trueValues / totalValues) * 100)}%`; 159 | 160 | meter.max = totalValues; 161 | meter.low = Math.floor(0.2 * totalValues); 162 | meter.high = Math.floor(0.8 * totalValues); 163 | meter.optimum = Math.floor(0.9 * totalValues); 164 | meter.value = trueValues; 165 | 166 | fakeMeter.querySelector('span').style.width = percentage; 167 | if (meter.value < meter.low) { 168 | fakeMeter.classList.add('red'); 169 | } else if (meter.value <= meter.low && meter.value <= meter.high) { 170 | fakeMeter.classList.add('orange'); 171 | } else { 172 | fakeMeter.classList.add('green'); 173 | } 174 | 175 | label.textContent = percentage; 176 | label.parentNode.hidden = false; 177 | document.querySelector('[hidden].legend').hidden = false; 178 | 179 | code.textContent = navigator.userAgent; 180 | 181 | import('/js/share.mjs'); 182 | }); 183 | -------------------------------------------------------------------------------- /js/share.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2022 Google LLC. All Rights Reserved. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | 14 | import html2canvas from 'html2canvas'; 15 | 16 | const shareButton = document.querySelector('button.share'); 17 | const screenshotButton = document.querySelector('button.screenshot'); 18 | const label = document.querySelector('label'); 19 | const fakeMeter = document.querySelector('.meter'); 20 | 21 | // This needs to be prepared before the share button is clicked, 22 | // else, the user gesture would be consumed by the time the PNG 23 | // image can be created. 24 | let files; 25 | 26 | const canonical = document.querySelector('link[rel="canonical"]').href; 27 | 28 | const shareTextOnly = async (shareData) => { 29 | delete shareData.files; 30 | try { 31 | await navigator.share(shareData); 32 | } catch (err) { 33 | if (err.name !== 'AbortError') { 34 | console.error(err.name, err.message); 35 | } 36 | } 37 | }; 38 | 39 | shareButton.addEventListener('click', async () => { 40 | // Cap the userAgent at 135 characters (just enough for Edge's.) 41 | const message = `🙋 My browser… 42 | 43 | 👉 \`${navigator.userAgent.substring(0, 135)}\` 👈 44 | 45 | …is ${ 46 | fakeMeter.classList.contains('green') 47 | ? '🟩' 48 | : fakeMeter.classList.contains('red') 49 | ? '🟥' 50 | : '🟧' 51 | } ${label.textContent} Fugu 🐡! 52 | 53 | How Fugu 🐡 is yours? Find out at ${canonical} and share on #HowFuguIsMyBrowser!`.trim(); 54 | 55 | if ('share' in navigator) { 56 | const shareData = { 57 | text: message, 58 | title: '', 59 | files, 60 | }; 61 | if (!navigator.canShare(shareData)) { 62 | return shareTextOnly(shareData); 63 | } 64 | try { 65 | await navigator.share(shareData); 66 | } catch (err) { 67 | if (err.name !== 'AbortError') { 68 | console.error(err.name, err.message); 69 | shareTextOnly(shareData); 70 | } 71 | } 72 | } else { 73 | const shareURL = new URL('https://twitter.com/intent/tweet'); 74 | const params = new URLSearchParams(); 75 | params.append('text', message); 76 | shareURL.search = params; 77 | window.open(shareURL, '_blank', 'popup,noreferrer,noopener'); 78 | } 79 | }); 80 | 81 | const createScreenshot = async (clone) => { 82 | const computedStyle = getComputedStyle(document.documentElement); 83 | const linkColor = computedStyle.getPropertyValue('--link-color'); 84 | clone.querySelectorAll('a').forEach((a) => (a.style.color = linkColor)); 85 | const contrastColor = computedStyle.getPropertyValue('--contrast-color'); 86 | clone 87 | .querySelectorAll('code') 88 | .forEach((code) => (code.style.color = contrastColor)); 89 | const backgroundColor = computedStyle.getPropertyValue( 90 | '--main-background-color', 91 | ); 92 | clone.querySelectorAll('.legend').forEach((legend) => { 93 | legend.style.display = 'none'; 94 | }); 95 | const canvas = await html2canvas(clone, { 96 | backgroundColor, 97 | }); 98 | return new Promise((resolve) => 99 | canvas.toBlob((blob) => { 100 | resolve(blob); 101 | }), 102 | ); 103 | }; 104 | 105 | (async () => { 106 | const clone = document.querySelector('main').cloneNode(true); 107 | // Use standard `sans-serif` font instead of `system-ui`. 108 | clone.style.fontFamily = 'sans-serif'; 109 | // Add some padding to the clone. 110 | clone.style.padding = '2rem'; 111 | // Hide all paragraphs, except the one with the user-agent. 112 | clone 113 | .querySelectorAll('p:not(.message)') 114 | .forEach((p) => (p.style.display = 'none')); 115 | // Make the fake meter visible. 116 | clone.querySelector('.meter').hidden = false; 117 | // Show only the supported rows. 118 | clone.querySelectorAll('tr > td:nth-child(2)').forEach((td) => { 119 | if (!/✅/.test(td.textContent)) { 120 | td.parentNode.remove(); 121 | } 122 | }); 123 | // Hide the sparkline. 124 | clone.querySelectorAll('tr > th:nth-child(3)').forEach((th) => { 125 | th.style.display = 'none'; 126 | }); 127 | clone.querySelectorAll('tr > td:nth-child(3)').forEach((td) => { 128 | td.style.display = 'none'; 129 | }); 130 | // Use standard `monospace` font instead of `ui-monospace`. 131 | clone.querySelectorAll('code').forEach((code) => { 132 | code.style.fontFamily = 'monospace'; 133 | code.style.fontSize = '16px'; 134 | }); 135 | // Add the URL to the footer. 136 | const footer = clone.querySelector('footer'); 137 | footer.innerHTML = footer.innerHTML 138 | .replace('Source code on', 'Test your browser at') 139 | .replace('https://github.com/tomayac/how-fugu-is-my-browser', canonical) 140 | .replace( 141 | 'GitHub', 142 | canonical 143 | .replace('https://', '') 144 | .replace('/', '') 145 | .replace('how', 'How') 146 | .replace('fugu', 'Fugu') 147 | .replace('is', 'Is') 148 | .replace('my', 'My') 149 | .replace('browser', 'Browser'), 150 | ); 151 | document.body.append(clone); 152 | const blob = await createScreenshot(clone); 153 | clone.remove(); 154 | files = [new File([blob], 'howfuguismybrowser_dev.png', { type: blob.type })]; 155 | /Apple/.test(navigator.vendor) 156 | ? shareButton.classList.add('ios') 157 | : shareButton.classList.add('others'); 158 | shareButton.style.visibility = 'visible'; 159 | if (!('share' in navigator)) { 160 | document.querySelector('ol').style.visibility = 'visible'; 161 | screenshotButton.style.visibility = 'visible'; 162 | // Fallback to use Twitter's Web Intent URL, as outlined in 163 | // https://web.dev/patterns/advanced-apps/share/. 164 | screenshotButton.addEventListener('click', () => { 165 | const a = document.createElement('a'); 166 | a.download = 'how-fugu-is-my-browser.png'; 167 | a.style.display = 'none'; 168 | a.href = URL.createObjectURL(files[0]); 169 | document.body.appendChild(a); 170 | a.click(); 171 | setTimeout(() => { 172 | document.body.remove(a); 173 | URL.revokeObjectURL(a.href); 174 | }, 30 * 1000); 175 | }); 176 | } else { 177 | screenshotButton.style.display = 'none'; 178 | } 179 | })(); 180 | -------------------------------------------------------------------------------- /manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "How Fugu is my browser?", 3 | "short_name": "How Fugu?", 4 | "description": "The cross-company effort Project Fugu has the objective of making it possible for Web apps to do anything iOS, Android, or desktop apps can. Find out where on this exciting journey your current browser is!", 5 | "start_url": "https://howfuguismybrowser.dev/", 6 | "display": "standalone", 7 | "theme_color": "deeppink", 8 | "background_color": "#111", 9 | "orientation": "portrait", 10 | "language": "en", 11 | "icons": [ 12 | { 13 | "src": "https://howfuguismybrowser.dev/fugu.svg", 14 | "type": "image/svg+xml", 15 | "sizes": "150x150", 16 | "purpose": "any" 17 | }, 18 | { 19 | "src": "https://howfuguismybrowser.dev/fugu.png", 20 | "type": "image/png", 21 | "sizes": "320x320", 22 | "purpose": "any" 23 | }, 24 | { 25 | "src": "https://howfuguismybrowser.dev/fugu_maskable.png", 26 | "type": "image/png", 27 | "sizes": "1024x1024", 28 | "purpose": "maskable" 29 | } 30 | ], 31 | "screenshots": [ 32 | { 33 | "src": "https://howfuguismybrowser.dev/wide_light.png", 34 | "sizes": "1341x869", 35 | "type": "image/png", 36 | "platform": "wide", 37 | "label": "Desktop (light mode)" 38 | }, 39 | { 40 | "src": "https://howfuguismybrowser.dev/wide_dark.png", 41 | "sizes": "1341x869", 42 | "type": "image/png", 43 | "platform": "wide", 44 | "label": "Desktop (dark mode)" 45 | }, 46 | { 47 | "src": "https://howfuguismybrowser.dev/narrow_light.png", 48 | "sizes": "1081x2162", 49 | "type": "image/png", 50 | "platform": "narrow", 51 | "label": "Mobile (light mode)" 52 | }, 53 | { 54 | "src": "https://howfuguismybrowser.dev/narrow_dark.png", 55 | "sizes": "1081x2162", 56 | "type": "image/png", 57 | "platform": "narrow", 58 | "label": "Mobile (dark mode)" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /offline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | How Fugu is my browser? 13 | 14 | 69 | 70 | 71 |
72 |

How Fugu is my browser? (Offline)

73 | 74 |

75 | The cross-company effort 76 | Project Fugu has the 77 | objective of making it possible for Web apps to do 78 | anything iOS, Android, or desktop apps can. 79 |

80 |

81 | We do this by exposing the capabilities of these platforms to the Web, 82 | all while maintaining user security, privacy, trust, and other core 83 | tenets of the Web. 84 |

85 |

86 | Find out when you are back online where on this exciting 87 | journey your current browser is! 88 |

89 | 94 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "how-fugu-is-my-browser", 3 | "version": "1.0.0", 4 | "description": "A test app to determine what Project Fugu 🐡 APIs your browser supports.", 5 | "scripts": { 6 | "start": "npm run dev", 7 | "dev": "vite --host", 8 | "build": "vite build && shx echo \"howfuguismybrowser.dev\" > docs/CNAME && shx cp ./sw.js ./docs/ && npm run license && git add docs/", 9 | "license": "node ./scripts/license.mjs", 10 | "serve": "vite preview", 11 | "https-preview": "serve docs", 12 | "lint": "npm run lint:js && npm run lint:css && npm run lint:esm", 13 | "lint:esm": "npx find-unused-exports", 14 | "lint:js": "npx eslint . --fix --ignore-pattern docs/", 15 | "lint:css": "npx stylelint \"**/*.css\" --fix", 16 | "fix": "npx prettier . --write", 17 | "deploy": "npm run lint && npm run fix && npm run build && git commit -a -m \"Deploy\" && git push", 18 | "oculus": "ovr-platform-util create-pwa -o output.apk --android-sdk ~/bin/android-10 --manifest-content-file manifest.webmanifest --package-name dev.howfuguismybrowser" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "git+https://github.com/tomayac/how-fugu-is-my-browser.git" 23 | }, 24 | "keywords": [ 25 | "project-fugu" 26 | ], 27 | "author": "Thomas Steiner (tomac@google.com)", 28 | "license": "Apache-2.0", 29 | "bugs": { 30 | "url": "https://github.com/tomayac/how-fugu-is-my-browser/issues" 31 | }, 32 | "homepage": "https://github.com/tomayac/how-fugu-is-my-browser#readme", 33 | "type": "module", 34 | "devDependencies": { 35 | "@rollup/plugin-dynamic-import-vars": "^2.1.5", 36 | "eslint": "^9.21.0", 37 | "eslint-config-google-jsdocless": "^0.14.1", 38 | "eslint-config-prettier": "^10.0.2", 39 | "find-unused-exports": "^7.1.1", 40 | "fugu-api-data": "^1.20.0", 41 | "html2canvas": "^1.4.1", 42 | "http-server": "^14.1.1", 43 | "https-localhost": "^4.7.1", 44 | "prettier": "^3.5.3", 45 | "shx": "^0.3.4", 46 | "stylelint": "^16.15.0", 47 | "stylelint-config-standard": "^37.0.0", 48 | "stylelint-order": "^6.0.4", 49 | "vite": "^6.2.0" 50 | }, 51 | "dependencies": { 52 | "@fnando/sparkline": "^0.3.10" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /public/fugu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/public/fugu.png -------------------------------------------------------------------------------- /public/fugu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/fugu_maskable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/public/fugu_maskable.png -------------------------------------------------------------------------------- /public/narrow_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/public/narrow_dark.png -------------------------------------------------------------------------------- /public/narrow_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/public/narrow_light.png -------------------------------------------------------------------------------- /public/screenshot.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/share-ios.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/share-others.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/wide_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/public/wide_dark.png -------------------------------------------------------------------------------- /public/wide_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/how-fugu-is-my-browser/a76c34719aec771cd95df1e9a9bb69d443fbf991/public/wide_light.png -------------------------------------------------------------------------------- /scripts/license.mjs: -------------------------------------------------------------------------------- 1 | import { readdirSync, readFileSync, writeFileSync, statSync } from 'fs'; 2 | 3 | const LICENSE = `/** 4 | * @license Apache-2.0 5 | * Copyright 2022 Google LLC 6 | * SPDX-License-Identifier: Apache-2.0 7 | */ 8 | `; 9 | 10 | const listAllJavaScriptFiles = (dir) => { 11 | const files = []; 12 | const list = (dir) => { 13 | const entries = readdirSync(dir); 14 | for (const entry of entries) { 15 | const path = dir + '/' + entry; 16 | const stat = statSync(path); 17 | if (stat.isDirectory()) { 18 | list(path); 19 | } else if (entry.endsWith('.js')) { 20 | files.push(path); 21 | } 22 | } 23 | }; 24 | list(dir); 25 | return files; 26 | }; 27 | 28 | const prependDataToFile = (path, prependData) => { 29 | const data = readFileSync(path, 'utf8'); 30 | writeFileSync(path, prependData + data); 31 | }; 32 | 33 | const allJavaScriptFiles = listAllJavaScriptFiles('./docs'); 34 | allJavaScriptFiles.forEach((file) => { 35 | prependDataToFile(file, LICENSE); 36 | }); 37 | -------------------------------------------------------------------------------- /sw.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2022 Google LLC. All Rights Reserved. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | 14 | const CACHE_NAME = 'offline'; 15 | // Customize this with a different URL if needed. 16 | const OFFLINE_URL = './offline.html'; 17 | 18 | self.addEventListener('install', (event) => { 19 | event.waitUntil( 20 | (async () => { 21 | const cache = await caches.open(CACHE_NAME); 22 | // Setting {cache: 'reload'} in the new request will ensure that the 23 | // response isn't fulfilled from the HTTP cache; i.e., it will be from 24 | // the network. 25 | await cache.add(new Request(OFFLINE_URL, { cache: 'reload' })); 26 | })(), 27 | ); 28 | // Force the waiting service worker to become the active service worker. 29 | self.skipWaiting(); 30 | }); 31 | 32 | self.addEventListener('activate', (event) => { 33 | event.waitUntil( 34 | (async () => { 35 | // Enable navigation preload if it's supported. 36 | // See https://developers.google.com/web/updates/2017/02/navigation-preload 37 | if ('navigationPreload' in self.registration) { 38 | await self.registration.navigationPreload.enable(); 39 | } 40 | })(), 41 | ); 42 | // Tell the active service worker to take control of the page immediately. 43 | self.clients.claim(); 44 | }); 45 | 46 | self.addEventListener('fetch', (event) => { 47 | // We only want to call event.respondWith() if this is a navigation request 48 | // for an HTML page. 49 | if (event.request.mode === 'navigate') { 50 | event.respondWith( 51 | (async () => { 52 | try { 53 | // First, try to use the navigation preload response if it's supported. 54 | const preloadResponse = await event.preloadResponse; 55 | if (preloadResponse) { 56 | return preloadResponse; 57 | } 58 | 59 | // Always try the network first. 60 | const networkResponse = await fetch(event.request); 61 | return networkResponse; 62 | } catch { 63 | const cache = await caches.open(CACHE_NAME); 64 | const cachedResponse = await cache.match(OFFLINE_URL); 65 | return cachedResponse; 66 | } 67 | })(), 68 | ); 69 | } 70 | 71 | // If our if() condition is false, then this fetch handler won't intercept the 72 | // request. If there are any other fetch handlers registered, they will get a 73 | // chance to call event.respondWith(). If no fetch handlers call 74 | // event.respondWith(), the request will be handled by the browser as if there 75 | // were no service worker involvement. 76 | }); 77 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2022 Google LLC. All Rights Reserved. 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * Unless required by applicable law or agreed to in writing, software 8 | * distributed under the License is distributed on an "AS IS" BASIS, 9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | * See the License for the specific language governing permissions and 11 | * limitations under the License. 12 | */ 13 | 14 | import { resolve } from 'path'; 15 | 16 | import dynamicImportVars from '@rollup/plugin-dynamic-import-vars'; 17 | 18 | // ignore unused exports default 19 | export default { 20 | plugins: [ 21 | dynamicImportVars({ 22 | include: './*.mjs', 23 | }), 24 | ], 25 | build: { 26 | outDir: 'docs', 27 | target: 'esnext', 28 | assetsInlineLimit: 0, 29 | rollupOptions: { 30 | input: { 31 | main: resolve(__dirname, 'index.html'), 32 | offline: resolve(__dirname, 'offline.html'), 33 | }, 34 | }, 35 | }, 36 | }; 37 | --------------------------------------------------------------------------------