Skip to content

Instantly share code, notes, and snippets.

@Mufanc
Created April 10, 2023 18:50
Show Gist options
  • Save Mufanc/45726e906fe4f822d9cce9221560e09b to your computer and use it in GitHub Desktop.
Save Mufanc/45726e906fe4f822d9cce9221560e09b to your computer and use it in GitHub Desktop.
New Bing 增强脚本
// ==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