Hello all,
the following event for the add of the title tag is not fired on
http://www.example.com/ (alert is not shown):
// ==UserScript==
> // @name rtzgrgd
> // @namespace fhdf
> // @description fdhdrfhdrfg
> // @version 1
> // @include http*
> // @grant none
> // @run-at document-start
> // ==/UserScript==
>
> MutationObserver = window.MutationObserver;
> var observer = new MutationObserver(function(mutations) {
> mutations.forEach(function(mutation) {
>
> var addedNodes = mutation.addedNodes;
> for (var i = 0; i < addedNodes.length; i++) {
> if (addedNodes[i].nodeName == 'TITLE') {alert("Yes, script is
> active! Hurray!");}
> }
>
> });
> });
>
> // pass in the target node, as well as the observer options
> observer.observe(document, {childList: true, subtree: true, attributes:
> true});
However, if the source of http://www.example.com/ is saved locally and the
script is added there (as <script..</script> without using GM), everything
works, event fires, alert is shown:
- see the attached example.com.htm
Besides, the user.js script is even working in Chrome (added in
settings>extensions). So I guess it's not a problem in FF or the code.
Somehow GM seems to swallow up all events, without giving them back. I have
this problem with several userscripts (on some sites they're simply not
active). This drives me crazy, if anyone has an idea about the problem or
workaround please help ;)
Greetz
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/groups/opt_out.