How Fugu is the Web?
рдЦрд╛рд╕ рдЬрд╛рдирдХрд╛рд░реА
An extension to shine light on the Project Fugu ЁЯРб APIs web apps want to use.
How it works API data The raw data for the different Project Fugu ЁЯРб APIs is curated in a spreadsheet, which is then turned into JavaScript, so keeping the list of APIs updated is hopefully a straightforward task. API detection The extension monitors the requests a page makes via the chrome.webRequest.onBeforeRequest.addListener() API. Each response body, grouped by main frame, JavaScript, and Web App Manifest response bodies, is then run through a set of regular expressions like /navigator\.hid\.requestDevice\s*\(/g to determine if the code hints at a Project Fugu ЁЯРб API potentially being used. Browser support detection Most Project Fugu ЁЯРб APIs are easily feature-detectable by checking for the existence of interfaces or properties, for example, as in 'BarcodeDetector' in window. Other APIs require a ServiceWorkerRegistration, but luckily the popup window in Manifest V3 extensions uses a service worker, so it can be used via an IIFE that can be run in the client or the service worker. An example is (async () => 'periodicSync' in (await navigator.serviceWorker?.ready || self.registration))(). The support categories are listed below: тЬФя╕П Supported by your browser. ЁЯЪл Not supported by your browser. ЁЯд╖ Support unknown for your browser. (The only way to know would be user-agent sniffing.) Deep-linking The extension makes use of Text Fragment URLs to deep-link to the occurrence of a detected API, for example https://airhorner.com/scripts/main.min.js#:~:text=navigator.setAppBadge(. For main frame documents, the source code gets rendered in a helper HTML page controlled by the extension, since it is impossible to link to view-source: protocol links. Limitations тАв The chrome.webRequest.onBeforeRequest.addListener() API unfortunately does not "see" requests that are handled by a service worker (crbug.com/766433). There are three possible workarounds for this: - Hard-reload via тМШ/ctrl+shift+r. - Open DevTools and check the Bypass for network checkbox in the Service Worker section of the Application tab. - Clear storage in the Storage section of the Application tab. тАв The extension only does static code analysis, that is, there is no guarantee that the app actually uses the code snippet where a Project Fugu ЁЯРб API was detected. тАв Heavily minified code will not be detected. For example, if an app minifies navigator.clipboard.write() to const nav = navigator; nav.clipboard.write(), the extension will not detect this. License Apache 2.0.
5 рдореЗрдВ рд╕реЗ 0рдХреЛрдИ рд░реЗрдЯрд┐рдВрдЧ рдирд╣реАрдВ рд╣реИ
рд╡рд░реНрдгрди
- рд╡рд░реНрд╢рди1.24.0
- рдкрд┐рдЫрд▓реА рдмрд╛рд░ рдЕрдкрдбреЗрдЯ рд╣реЛрдиреЗ рдХреА рддрд╛рд░реАрдЦ:10 рджрд┐рд╕рдВрдмрд░ 2025
- рдСрдлрд╝рд░ рдХрд░рдиреЗ рд╡рд╛рд▓рд╛Thomas Steiner
- рдЖрдХрд╛рд░125KiB
- рднрд╛рд╖рд╛рдПрдВEnglish
- рдбреЗрд╡рд▓рдкрд░Thomas Steiner
Neanderstr. 3 Hamburg 20459 GermanyрдИрдореЗрд▓
steiner.thomas@gmail.com - рдЧреИрд░-рд╡реНрдпрд╛рдкрд╛рд░реАрдЗрд╕ рдбреЗрд╡рд▓рдкрд░ рдиреЗ рдЕрдкрдиреА рдкрд╣рдЪрд╛рди рд╡реНрдпрд╛рдкрд╛рд░реА рдХреЗ рддреМрд░ рдкрд░ рдЬрд╝рд╛рд╣рд┐рд░ рдирд╣реАрдВ рдХреА рд╣реИ. рдЕрдЧрд░ рдЖрдк рдпреВрд░реЛрдкрд┐рдпрди рд╕рдВрдШ рдХреЗ рдХрд┐рд╕реА рджреЗрд╢ рдореЗрдВ рд░рд╣рдиреЗ рд╡рд╛рд▓реЗ рдЙрдкрднреЛрдХреНрддрд╛ рд╣реИрдВ, рддреЛ рдЖрдкрдХреЗ рдФрд░ рдбреЗрд╡рд▓рдкрд░ рдХреЗ рдмреАрдЪ рд╣реБрдП рд╕рдордЭреМрддреЗ рдкрд░ рдЙрдкрднреЛрдХреНрддрд╛ рдХреЗ рдЕрдзрд┐рдХрд╛рд░ рд▓рд╛рдЧреВ рдирд╣реАрдВ рд╣реЛрдВрдЧреЗ.
рдирд┐рдЬрддрд╛
рдбреЗрд╡рд▓рдкрд░ рдиреЗ рдПрд▓рд╛рди рдХрд┐рдпрд╛ рд╣реИ рдХрд┐ рдЖрдкрдХрд╛ рдбреЗрдЯрд╛
- рдЬрд┐рди рдорд╛рдорд▓реЛрдВ рдореЗрдВ рдЗрд╕реНрддреЗрдорд╛рд▓ рдХреА рдордВреЫреВрд░реА рджреА рдЧрдИ рд╣реИ рдЙрдирдХреЗ рдЕрд▓рд╛рд╡рд╛, рдХрд┐рд╕реА рднреА рддреАрд╕рд░реЗ рдкрдХреНрд╖ рдХреЛ рдирд╣реАрдВ рдмреЗрдЪрд╛ рдЬрд╛рддрд╛
- рдХрд┐рд╕реА рдРрд╕реЗ рдордХрд╕рдж рд╕реЗ рдЗрд╕реНрддреЗрдорд╛рд▓ рдпрд╛ рдЯреНрд░рд╛рдВрд╕рдлрд╝рд░ рдирд╣реАрдВ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рдЬреЛ рдЖрдЗрдЯрдо рдХреЗ рдореБрдЦреНрдп рдлрдВрдХреНрд╢рди рдХреЗ рд╣рд┐рд╕рд╛рдм рд╕реЗ рдЬрд╝рд░реВрд░реА рдирд╣реАрдВ рд╣реИ
- рдХрд╝рд░реНрдЬрд╝ рд▓реЗрдиреЗ рдпрд╛ рдХрд╝рд░реНрдЬрд╝ рджреЗрдиреЗ рдХреА рд╕реНрдерд┐рддрд┐ рддрдп рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдЗрд╕реНрддреЗрдорд╛рд▓ рдпрд╛ рдЯреНрд░рд╛рдВрд╕рдлрд╝рд░ рдирд╣реАрдВ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛
рд╕рд╣рд╛рдпрддрд╛
рд╕рд╡рд╛рд▓реЛрдВ, рд╕реБрдЭрд╛рд╡реЛрдВ рдпрд╛ рд╕рдорд╕реНрдпрд╛рдУрдВ рд╕реЗ рдЬреБрдбрд╝реА рдорджрдж рдкрд╛рдиреЗ рдХреЗ рд▓рд┐рдП, рдХреГрдкрдпрд╛ рдЗрд╕ рдкреЗрдЬ рдХреЛ рдбреЗрд╕реНрдХрдЯреЙрдк рдмреНрд░рд╛рдЙрдЬрд╝рд░ рдкрд░ рдЦреЛрд▓реЗрдВ