Greasy Fork is available in English.

Remove Experimental / Deprecated Useless APIs

to remove useless APIs (either experimental or deprecated) like IdleDetector

Autore
𝖢𝖸 𝖥𝗎𝗇𝗀
Installazioni giornaliere
0
Installazioni totali
113
Valutazione
0 0 0
Versione
0.1.2
Creato il
11/06/2023
Aggiornato il
11/06/2023
Compatibilità
Compatibile con Firefox Compatibile con Chrome Compatibile con Opera Compatibile con Safari Compatibile con Edge
Licenza
MIT
Applica a
Tutti i siti

Remove Experimental / Deprecated Useless APIs

This user script aims to remove useless APIs from web pages that are either experimental or deprecated. These APIs, such as IdleDetector, webkitCancelAnimationFrame, webkitRequestAnimationFrame, styleMedia, launchQueue, webkitRequestFileSystem, webkitResolveLocalFileSystemURL, VRDisplayEvent, HTMLFrameSetElement, CanMakePaymentEvent, PositionSensorVRDevice, PerformanceTiming, and navigation, are identified and removed to enhance the browsing experience.

How It Works

  1. The script is designed to run on Tampermonkey, a popular userscript manager.
  2. Upon installation, the script is automatically executed when a web page is being loaded.
  3. The script first checks if each identified API is present on the window object.
  4. If an API is found, its value is set to undefined, effectively removing it.
  5. Additionally, the corresponding property on the window object is deleted to ensure complete removal.
  6. This process is repeated for each identified API, ensuring that any deprecated or experimental functionality associated with them is eliminated.
  7. The script operates at the document-start stage, allowing it to intercept and modify the page before it fully loads.
  8. The script is compatible with popular browsers such as Chrome, Firefox, and Opera, and does not require any additional permissions or grants.

Notes

  • Removing these APIs can help improve the performance and security of web pages by eliminating outdated or potentially risky functionality.
  • Please note that some APIs may still be present in the script but commented out. If you wish to remove additional APIs, you can uncomment and add them to the provided array.
  • Use this script at your discretion, and be aware that it may affect the functionality of certain web pages that rely on the removed APIs.