设置Firefox访问剪切板

今天在 CentOS 6.2 下使用 Firefox ,写博客时候发现无法使用剪切板,解决办法如下:

英文原文:

For Firefox:

  1. Quit Firefox. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.
  2. Find your Firefox profile directory.
  3. Open the user.js file from that directory in a text editor. If there's no user.js file, create one.
  4. Add these lines to user.js:

    user_pref("capability.policy.policynames", "allowclipboard");
    user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
    user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
    user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");

    * Change the url "http://www.mozilla.org" to the site for which you want to enable this function.

  5. Save the file, and restart Firefox. The Clipboard buttons should now function.

 


 

  1.关闭 Firefox

  2.打开 Firefox 的 profile 目录

    我用root登陆的,所以对应的目录是/root/.mozilla/firefox/xxxxxxxx.default。 这里有一个技巧,如果手动找不到这个目录,可以在Firefox里输入

       http://support.mozilla.com/en-US/kb/Profiles,选择 打开目录。

  3.修改user.js文件,如果不存在,则创建一个。添加以下内容:

    user_pref("capability.policy.policynames", "allowclipboard");
    user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
    user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
    user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");

    修改一下要允许使用剪切板的网址,就可以了。

    

posted @ 2012-06-17 16:58  Hakunamatata-  阅读(2437)  评论(0编辑  收藏  举报