I couldn't follow what is the code that is not working, nor you
specific problem with the example page. Could you give some more
details about this problem?
> Second one, clipboad: I couldnt access the clipboad following the
> instructions (https://addons.mozilla.org/en-US/developers/docs/sdk/1.3/
> packages/addon-kit/docs/clipboard.html). I tried adding
>
> let clipboard = require("clipboard");
>
> but when I tried to access it from contentScript, I have the same
> result as with the functions in the first problem, so I think that
> they are related.
In this case, if what you get is the following error:
ReferenceError: clipboard is not defined
That is because from inside the content script you do not have
permissions to access the variables and modules declared outside it.
You should send a message to the main thread and then from the
listener in the main thread access the clipboard. Here you'll find
some pointers about how to do that:
https://addons.mozilla.org/en-US/developers/docs/sdk/1.3/dev-guide/addon-development/content-scripts/using-postmessage.html
As a final note, try to use a contentScriptFile not the code inline in
a contentScript as it might not pass AMO revision and is way harder to
write having to escape everything ;)
Hernán
You cannot pass that node out of the content script, you can only
operate on it *in* the content script, or pass data from that node out
via postMessage. You cannot pass through a reference to the node
itself, as this is not allowed by the security model of the SDK.
Jeff
> --
> You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
> To post to this group, send email to mozilla-la...@googlegroups.com.
> To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
>
On Mon, Feb 13, 2012 at 10:12 AM, Carlos Pantelides
<carlos.p...@gmail.com> wrote:
> https://addons.mozilla.org/en-US/firefox/addon/nogoogle/