liuxb
非常火狐
非常火狐
  • UID26160
  • 注册日期2008-09-05
  • 最后登录2021-12-02
  • 发帖数659
  • 经验324枚
  • 威望0点
  • 贡献值184点
  • 好评度16点
阅读:3630回复:9

[解决]:屏蔽右键菜单如何破?

楼主#
更多 发布于:2014-08-31 23:02
找了个脚本https://greasyfork.org/scripts/2049-enablecopyandcontextmenu-user-js
==================================
某网页中有下面的内BODY oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() leftMargin=0 topMargin=0 onselect=document.selection.empty()不能弹出右键菜单,试过righttoclick扩展可以通过设置破掉,但是使用起来很不流畅响应太慢,不知道有无小的UserScript脚本可以做到?

最新喜欢:

点球射飞点球射飞
我的...
pcxfirefox
千年狐狸
千年狐狸
  • UID39042
  • 注册日期2012-06-22
  • 最后登录2018-01-15
  • 发帖数2539
  • 经验1263枚
  • 威望2点
  • 贡献值242点
  • 好评度133点
  • 最爱沙发
  • 忠实会员
  • 社区居民
1楼#
发布于:2014-08-31 23:49
把dom.event.contextmenu.enabled改成false呢
http://pcxfirefox.wordpress.com/
hzzhaiqi
火狐狸
火狐狸
  • UID30112
  • 注册日期2009-08-18
  • 最后登录2015-09-15
  • 发帖数279
  • 经验180枚
  • 威望1点
  • 贡献值44点
  • 好评度28点
2楼#
发布于:2014-09-01 10:42
这个脚本不全
小书签:破解右键限制
javascript:(function(){var%20doc=document;var%20bd=doc.body;bd.onselectstart=bd.oncopy=bd.onpaste=bd.onkeydown=bd.oncontextmenu=bd.onmousemove=bd.onselectstart=bd.ondragstart=doc.onselectstart=doc.oncopy=doc.onpaste=doc.onkeydown=doc.oncontextmenu=null;doc.onselectstart=doc.oncontextmenu=doc.onmousedown=doc.onkeydown=function%20(){return%20true;};with(document.wrappedJSObject||document){onmouseup=null;onmousedown=null;oncontextmenu=null;}var%20arAllElements=document.getElementsByTagName('*');for(var%20i=arAllElements.length-1;i>=0;i--){var%20elmOne=arAllElements[i];with(elmOne.wrappedJSObject||elmOne){onmouseup=null;onmousedown=null;}}var%20head=document.getElementsByTagName('head')[0];if(head){var%20style=document.createElement('style');style.type='text/css';style.innerHTML=%22html,*{-moz-user-select:auto!important;}%22;head.appendChild(style);}void(0);})();
liuxb
非常火狐
非常火狐
  • UID26160
  • 注册日期2008-09-05
  • 最后登录2021-12-02
  • 发帖数659
  • 经验324枚
  • 威望0点
  • 贡献值184点
  • 好评度16点
3楼#
发布于:2014-09-02 16:42
pcxfirefox:把dom.event.contextmenu.enabled改成false呢回到原帖
多谢,改了这个参数直接就可以了,哈!
我的...
liuxb
非常火狐
非常火狐
  • UID26160
  • 注册日期2008-09-05
  • 最后登录2021-12-02
  • 发帖数659
  • 经验324枚
  • 威望0点
  • 贡献值184点
  • 好评度16点
4楼#
发布于:2014-09-02 16:43
hzzhaiqi:这个脚本不全
小书签:破解右键限制
javascript:(function(){var%20doc=document;var%20bd=doc.body;bd.onselectstart=bd.oncopy=bd.onpaste=bd...
回到原帖
谢谢,主要是感觉小书签不是很方便,每次都要点一下。。。
我的...
pcxfirefox
千年狐狸
千年狐狸
  • UID39042
  • 注册日期2012-06-22
  • 最后登录2018-01-15
  • 发帖数2539
  • 经验1263枚
  • 威望2点
  • 贡献值242点
  • 好评度133点
  • 最爱沙发
  • 忠实会员
  • 社区居民
5楼#
发布于:2014-09-02 16:48
liuxb:多谢,改了这个参数直接就可以了,哈!回到原帖
不过有些网页的自己的右键菜单就出不来了,主要表现在网盘上

这个开关是Firefox原生的,原来在UI上还有选项来
http://pcxfirefox.wordpress.com/
白左
千年狐狸
千年狐狸
  • UID34985
  • 注册日期2010-12-29
  • 最后登录2023-11-13
  • 发帖数2039
  • 经验655枚
  • 威望0点
  • 贡献值364点
  • 好评度69点
  • 社区居民
  • 忠实会员
6楼#
发布于:2014-09-02 17:43
-いたんですか? -ええ、ずっと
pcxfirefox
千年狐狸
千年狐狸
  • UID39042
  • 注册日期2012-06-22
  • 最后登录2018-01-15
  • 发帖数2539
  • 经验1263枚
  • 威望2点
  • 贡献值242点
  • 好评度133点
  • 最爱沙发
  • 忠实会员
  • 社区居民
7楼#
发布于:2014-09-02 21:54
白左:https://addons.mozilla.org/en-US/firefox/addon/righttoclick/
这个扩展适用范围很广
回到原帖
乱用容易卡死。。。
http://pcxfirefox.wordpress.com/
hzzhaiqi
火狐狸
火狐狸
  • UID30112
  • 注册日期2009-08-18
  • 最后登录2015-09-15
  • 发帖数279
  • 经验180枚
  • 威望1点
  • 贡献值44点
  • 好评度28点
8楼#
发布于:2014-09-02 22:36
liuxb:谢谢,主要是感觉小书签不是很方便,每次都要点一下。。。回到原帖
很简单就可以转换得到,替换那个脚本。
(function() {
    var doc = document;
    var bd = doc.body;
    bd.onselectstart = bd.oncopy = bd.onpaste = bd.onkeydown = bd.oncontextmenu = bd.onmousemove = bd.onselectstart = bd.ondragstart = doc.onselectstart = doc.oncopy = doc.onpaste = doc.onkeydown = doc.oncontextmenu = null;
    doc.onselectstart = doc.oncontextmenu = doc.onmousedown = doc.onkeydown = function() {
        return true;
    };
    with(document.wrappedJSObject || document) {
        onmouseup = null;
        onmousedown = null;
        oncontextmenu = null;
    }
    var arAllElements = document.getElementsByTagName('*');
    for (var i = arAllElements.length - 1; i >= 0; i--) {
        var elmOne = arAllElements[i];
        with(elmOne.wrappedJSObject || elmOne) {
            onmouseup = null;
            onmousedown = null;
        }
    }
    var head = document.getElementsByTagName('head')[0];
    if (head) {
        var style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = "html,*{-moz-user-select:auto!important;}";
        head.appendChild(style);
    }
})();
liuxb
非常火狐
非常火狐
  • UID26160
  • 注册日期2008-09-05
  • 最后登录2021-12-02
  • 发帖数659
  • 经验324枚
  • 威望0点
  • 贡献值184点
  • 好评度16点
9楼#
发布于:2014-09-03 08:44
hzzhaiqi:很简单就可以转换得到,替换那个脚本。
(function() {
    var doc = document;
    var bd = doc.body;
    bd.onselectstart = bd.oncopy = b...
回到原帖
谢谢,测试正常,用上了!
我的...
游客

返回顶部