经常用FireFox写博客的人都会有一个共同的苦恼,不能复制粘贴,我研究了个解决方法
在user.js中加入
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http: https");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
user.js的位置
C:\Users\<username>\AppData\Roaming\ folder (Windows 7/Vista) 或 the C:\Documents and Settings\<username>\Application Data\ folder (Windows XP/2000)
这样就能让任意http,https协议的网站具有复制粘贴能力了,如果嫌这样权限太大,还可以
只允许指定的网站
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org http://youkuaiyun.com");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
指定地址的格式
"<URL list>"
URL List可以有两种格式的URL
1,protocol:
如http:,https:等
2,protocol://host
如http://www.google.cn,http://google.cn,http://youkuaiyun.com
host是域名,host后不能包含“/”和资源路径
多个URL用空格分隔
本文详细介绍了如何通过修改Firefox的user.js文件,为特定或所有http、https协议的网站启用复制粘贴功能。包括具体代码示例及针对不同用户的权限调整建议。
2237

被折叠的 条评论
为什么被折叠?



