On 24.02.2015 20:24, 'Ben Stover' via greasemonkey-users wrote:
However when I load/reload the webpage it is NOT applied.
When I copy exactly the two statements from script and run it in Firebug
console then it IS executed!!
The script is executed by Greasemonkey, but the dynamic page content
which you are trying to change is not loaded yet. When running the
script from the console, you have a fully loaded page with dynamic
content rendered, and therefore the script works.
You can see that the script works by executing your code only after a 5
second delay:
window.setTimeout(function() {var content =
document.getElementById("pf-src");
content.innerHTML=content.innerHTML.replace(/<strong>deutsche-wirtschafts-nachrichten.de<\/strong>/g,"aaa");
},5000);
You would typically set a short timeout and look for the content
element, then if found apply the change or otherwise set another timer.
--
Klaus Johannes Rusch
[email protected]
http://klausrusch.atmedia.net/
--
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/d/optout.