rappazf
(Rappazf)
April 27, 2017, 10:23am
1
I’m trying to have the copy example from Github working on Nigthlly.
I keep having the msg An unexpected error occurred in the console…
I tried to add
“content_scripts”: [
{
"matches": ["<all_urls>"],
"js": ["clipboard-helper.js"]
}],
In the manifest without success.
Could someone explains me in practical terms how I can get see this example
at work ?
Thanks
François
erosman
(erosman)
April 27, 2017, 2:05pm
2
Firefox blocks tabs.executeScript
on certain locations like addons.mozilla.org , about:* pages etc.
Is that where you are testing the code?
Depending on the code, you may also need "clipboardWrite"
in the "permissions"
rappazf
(Rappazf)
April 28, 2017, 11:25am
3
I run web-ext in the directory where the manifest.json is
In Nightly, I open this page http://www.unifr.ch/dokpe
I select a link and right click on Copy link to clipboard
In the console window I see “Failed to copy text: Error: An unexpected error occurred” and I can see that the clipboard content has not changed.
The permissions are
"permissions": [
“activeTab”,
“contextMenus”,
“clipboardWrite”
]
}
Thanks
François
erosman
(erosman)
April 28, 2017, 11:45am
4
There is an error in your code. It is not possible to say where without seeing the code.
rappazf
(Rappazf)
April 28, 2017, 11:55am
5
erosman
(erosman)
April 28, 2017, 12:19pm
6
There could be an error elsewhere.
You can also try asking Rob who wrote the code.