Jump to content

Clipboard in Firefox


Kowash
 Share

Recommended Posts

Hi

 

Thanx for all of the great attitude and help in the past. You guys ROCK. :drum:

 

Help me out again, PLEASE.

 

I have to copy text into firefox. (To do the administration on my website)

 

Mozilla gives me an error, and the fix. For security reasons it is not allowed at all, but you can change the settings to rectify this.

 

I tried to rectify this problem. I created an user.js file in my file:/usr/lib/mozilla-firefox-1.0.2/defaults, and in every folder in that one. It is still not working.

 

What am I doing wrong? Someone out there must see what I am missing. Seems like no one else is struggeling with this, so forgive my slooooooowwwwwness.

:)

 

Here is the fix :

 

Setting Prefs for the Mozilla Rich Text Editing Demo

 

To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions for purposes of the demo, you must modify your browser preferences.

 

1. Quit Mozilla. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.

2. Find your Mozilla profile directory. On Windows, this is often located in c://WINNT/Profiles/<your Windows login>/Application Data/Mozilla. (See also editing configuration files for more info on locating your profile folder.)

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"'>http://www.mozilla.org");

user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");

user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");

 

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

 

 

Here is my file that I created.

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");

 

 

 

 

Kowash

Edited by Kowash
Link to comment
Share on other sites

In the firefox address bar type about:config and verify that the settings you set in your user.js are being implemented correctly by firefox. If what you see from about:config does not agree with what is in your user.js, then something in prefs.js is overwriting your input. If that is the case, edit the prefs.js accordingly.

Link to comment
Share on other sites

Do you know greek mathology? :)

 

I surely don´t. I have been there to try and make any sense of it. Since you are the clever

uys, is there a way you can maybe guide me through it. I don´t have a clue what to do there.

What is it???????? I tried adding aser.js but then it gets difficult. I don´t know what I am doing, and that is dangerous. not for me, but for Mozilla.

 

:lol2:

 

Thanx for responding

 

Kowash

Link to comment
Share on other sites

As I understand it, you now have a user.js with the following in it:

 

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");

 

And this does not work.

 

Check prefs.js (it should be in the same folder as user.js). Make sure there are no commands similar to those above. If there are, delete them.

 

Restart firefox.

 

Is your problem fixed?

Link to comment
Share on other sites

The prefs.js file consists of the following.

 

# Mozilla User Preferences

 

/* Do not edit this file.

*

* If you make changes to this file while the browser is running,

* the changes will be overwritten when the browser exits.

*

* To make a manual change to preferences, you can visit the URL about:config

* For more information, see http://www.mozilla.org/unix/customizing.html#prefs

*/

 

I hope that helps, cause it means nothing to me. :o

 

Thanx for helping

 

Kowash

Link to comment
Share on other sites

Something interesting I just realized.

 

I am able to copy and paste in the browser, but it is not possible on that specific website. the Error starts with a Javascript error. could that be because it is java setting and not a mozilla setting. I am probably wrong but I am running out of options. I am able to paste into that same website when i am on my Win XP pc.

 

Just wanted to let you know. hope it helps.

 

Kowash

Link to comment
Share on other sites

Something isn't right, your prefs.js has nothing but some comments. It should have stuff similar to what is in user.js, and alot of it...

 

Are you sure user.js and prefs.js are in the same folder? Are they both in your profile folder .mozilla/firefox/stuff.Default User?

 

If your problem is specific to a particular website, then what we are doing is not relevant.

Link to comment
Share on other sites

Something isn't right, your prefs.js has nothing but some comments. It should have stuff similar to what is in user.js, and alot of it...

 

Are you sure user.js and prefs.js are in the same folder? Are they both in your profile folder .mozilla/firefox/stuff.Default User?

 

If your problem is specific to a particular website, then what we are doing is not relevant.

Letś answer it piece by piece.

This is my firefox folder :

file:/usr/lib/mozilla-firefox-1.0.2/

 

in this folder is the following folders

Chrome, components, defaults, extensions, geprefs, icons, init-d, plug-ins, res and search plugins

In the defaults folder is 3 folders and a user.js file I created myself.

The 3 folders are autoconfig, pref and profile.

I created a copy of user.js in all 3 folders.

In the profile folder is the only prefs.js file in the firefox folder.

 

I hope that answers your first question.

 

The reason I am doing this is because of the error and sullotion that was reported to me. It reads as follows.

Copy/cut/paste is not available in Mozilla and Firefox.

Do you want more information on this isue?

 

I responded ok and it transfered me to the following html page.

http://www.mozilla.org/editor/midasdemo/securityprefs.html

On this page is the following info.

 

Setting Prefs for the Mozilla Rich Text Editing Demo

 

To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions for purposes of the demo, you must modify your browser preferences.

 

1. Quit Mozilla. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.

2. Find your Mozilla profile directory. On Windows, this is often located in c://WINNT/Profiles/<your Windows login>/Application Data/Mozilla. (See also editing configuration files for more info on locating your profile folder.)

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");

 

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

 

* Site Map

* Security Updates

* Contact Us

 

I hope that answers your second question.

 

What should I do.

 

Kowash

Link to comment
Share on other sites

This is my firefox folder : file:/usr/lib/mozilla-firefox-1.0.2/

 

That is not the folder you want to add user.js to. You want to add user.js to your profile folder. This profile folder should be located in your home directory.

 

I am at work right now on a Windows box and thus I cannot check this, but if my memory serves me correctly your profile will reside in a folder that looks like this:

 

~/.mozilla/firefox/xxxxxxxx.Default User/

 

This folder is hidden (that is what the . signifies)

Link to comment
Share on other sites

This is my firefox folder : file:/usr/lib/mozilla-firefox-1.0.2/

 

That is not the folder you want to add user.js to. You want to add user.js to your profile folder. This profile folder should be located in your home directory.

 

I am at work right now on a Windows box and thus I cannot check this, but if my memory serves me correctly your profile will reside in a folder that looks like this:

 

~/.mozilla/firefox/xxxxxxxx.Default User/

 

This folder is hidden (that is what the . signifies)

Thanx

 

that helped me a lot. I got to know linux better. Thatś good.

unfortunately my problem is not solved yet. Your still stuck with me. :thumbs:

 

I found the hidden folder file:/home/kowash/.mozilla/firefox

There is no real files in that folder - There is another folder that contains the prefs.js file (and it looks much more complete). I copied the user.js file in there. Thus the current location is now

file:/home/kowash/.mozilla/firefox/iin2tamo.default (I guess that is what the xxxxxxxxx means?

 

I have to try something i have just thought about. Iĺl be back to tell you how I fared.

 

For now, It is still not working.

 

Thanks for your patience

 

Kowash

Link to comment
Share on other sites

Ok

 

It worked.

 

itś official, you are a genius.

 

Thanx for the help. I really do appreciate it.

 

There is something I thought of doing that I will just post for future reference. That is why it still did not work. You have to edit the file information I had to copy into the user.js file The file you can copy from the Mozilla site is as follows.

 

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");

 

The problem is that they only allow specified websites to access to cut/copy and past. In the above file they specify mozilla.org.

 

I changed it to the site I am currently using it for.

 

a last Question :

How do I add websites behind that one?

Will the following be correct?

user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org", "http://www.madrivausers.org");

 

Thanx anyway and have a great day.

 

Kowash

Link to comment
Share on other sites

How do I add websites behind that one?

Will the following be correct?

user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org", "http://www.madrivausers.org");

 

I really don't know. If I had to guess I would say that each web site would have its own individual line. The only way to find out is trial and error. Try it your way, see if it works. Try it my way, see if it works.

 

I'm glad you got things working! :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...