我讨厌网站仍然具有某种平滑滚动功能,尽管它在我的浏览器中被禁用(Chrome 标志被禁用)。
我认为它来自 javascript。
https://www.thegeekpub.com/是一个示例站点。我从适用于该页面的开发人员选项中删除了wheel 事件侦听器,但我想要一些可以从任何其他拥有它的站点禁用这种“功能”的东西。
是否有插件或其他东西可以做到这一点?篡改脚本,甚至?
小智 6
// source: http://stackoverflow.com/a/35611393/992504
document.getElementsByTagName("body")[0].addEventListener("wheel",function (event) {
// exception for ACE Editor, JS text editor used by sites like GitHub
if (event.target.classList.contains('ace_content')) {
return;
}
event.stopPropagation();
}, true);
Run Code Online (Sandbox Code Playgroud)
谢谢乔吉!
我制作了一个书签(将其拖到您的书签中,当您想要删除 smoothscroll 时单击它):
如果不起作用,请将此代码粘贴到书签的 URL 字段中:
javascript:(function(){document.getElementsByTagName("body")[0].addEventListener("wheel",function (event) {if (event.target.classList.contains('ace_content')) {return;}event.stopPropagation();}, true);})();
Run Code Online (Sandbox Code Playgroud)
这是一个要测试的网站: https://hollandshielding.com/IP-Rating-Chart
归档时间: |
|
查看次数: |
3085 次 |
最近记录: |