您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
to remove useless APIs (either experimental or deprecated) like IdleDetector
当前为
// ==UserScript== // @name Remove Experimental / Deprecated Useless APIs // @namespace http://tampermonkey.net/ // @version 0.1.0 // @description to remove useless APIs (either experimental or deprecated) like IdleDetector // @author CY Fung // @match https://*/* // @match http://*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org // @grant none // @run-at document-start // @license MIT // @compatible chrome // @compatible firefox // @compatible opera // @unwrap // @allFrames // @inject-into page // ==/UserScript== (function () { 'use strict'; if (typeof IdleDetector === 'function') { IdleDetector = undefined; delete window.IdleDetector; } if (typeof webkitCancelAnimationFrame === 'function') { webkitCancelAnimationFrame = undefined; delete window.webkitCancelAnimationFrame; } if (typeof webkitRequestAnimationFrame === 'function') { webkitRequestAnimationFrame = undefined; delete window.webkitRequestAnimationFrame; } if (typeof styleMedia === 'function') { // This feature is deprecated/obsolete and should not be used. styleMedia = undefined; delete window.styleMedia; } if (typeof launchQueue === 'object') { // This feature is experimental. Use caution before using in production. launchQueue = undefined; delete window.launchQueue; } if (typeof webkitRequestFileSystem === 'function') { // This feature is deprecated/obsolete and should not be used. webkitRequestFileSystem = undefined; delete window.webkitRequestFileSystem; } if (typeof webkitResolveLocalFileSystemURL === 'function') { // This feature is non-standard and should not be used without careful consideration. webkitResolveLocalFileSystemURL = undefined; delete window.webkitResolveLocalFileSystemURL; } if (typeof VRDisplayEvent === 'function') { // This feature is deprecated/obsolete and should not be used. VRDisplayEvent = undefined; delete window.VRDisplayEvent; } if (typeof HTMLFrameSetElement === 'function') { // This feature is deprecated/obsolete and should not be used. HTMLFrameSetElement = undefined; delete window.HTMLFrameSetElement; } if (typeof CanMakePaymentEvent === 'function'){ // This feature is experimental. Use caution before using in production. CanMakePaymentEvent = undefined; delete window.CanMakePaymentEvent; } if (typeof PositionSensorVRDevice === 'function'){ // This feature is deprecated/obsolete and should not be used. PositionSensorVRDevice = undefined; delete window.PositionSensorVRDevice; } if (typeof PerformanceTiming === 'function') { // This feature is deprecated/obsolete and should not be used. PerformanceTiming = undefined; delete window.PerformanceTiming; } if (typeof navigation === 'function') { // This feature is experimental. Use caution before using in production. navigation = undefined; delete window.navigation; } /* let arr = ["navigation", "onsearch", "trustedTypes", "onappinstalled", "onbeforeinstallprompt", "onbeforexrselect", "oncancel", "oncontextlost", "oncontextrestored", "onmousewheel", "onpointerrawupdate", "scheduler", "chrome", "credentialless", "launchQueue", "onbeforematch", "onbeforetoggle", "originAgentCluster", "oncontentvisibilityautostatechange", "openDatabase", "webkitRequestFileSystem", "webkitResolveLocalFileSystemURL"]; */ // Your code here... })();