Created
April 10, 2023 18:50
-
-
Save Mufanc/45726e906fe4f822d9cce9221560e09b to your computer and use it in GitHub Desktop.
New Bing 增强脚本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name New Bing | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Mufanc | |
// @match https://www.bing.com/search?*showconv=1* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=bing.com | |
// @grant GM_addStyle | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict' | |
// 禁止通过滚轮滚动到搜索页 | |
const addEventListener = EventTarget.prototype.addEventListener | |
Object.defineProperty( | |
EventTarget.prototype, 'addEventListener', { | |
value(...args) { | |
if (args[0] === 'mousewheel') { | |
console.log(this) | |
return | |
} | |
addEventListener.apply(this, args) | |
}, | |
configurable: false | |
} | |
) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment