Remove Experimental / Deprecated Useless APIs

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

نووسەر
𝖢𝖸 𝖥𝗎𝗇𝗀
Daily installs
0
Total installs
129
Ratings
1 0 0
وەشان
0.1.2
Created
2023-06-11
Updated
2023-06-11
ڕێژەی گونجاوی
Compatible with Firefox Compatible with Chrome Compatible with Opera Compatible with Safari Compatible with Edge
مۆڵەت
MIT
Applies to
هەموو سایتەکان

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.