Remove Experimental / Deprecated Useless APIs

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

作者
𝖢𝖸 𝖥𝗎𝗇𝗀
今日安裝
0
安裝總數
113
評價
0 0 0
版本
0.1.2
建立日期
2023-06-11
更新日期
2023-06-11
相容性
相容於 Firefox 相容於 Chrome 相容於 Opera 相容於 Safari 相容於 Edge
授權條款
MIT
腳本執行於
所有網站

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.