I am doing it quite simply in JS: I am testing if an element (based on class name) contains a string.
I think the reason it doesn't work is because the element is displayed on the page via an HTTPS request, separate for the onload event. (Type like inline / iFrame type).
An example script that I have:
(function($) {
if(window.location.href.indexOf("SpecificPageImRunningOn") > -1) {
setTimeout(function(){
if($('.aSpecificClass').text().indexOf('Foobar') != -1){
alert("Yes!");
}
else{
alert("No!");
}
}, 3000);
}
})(jQuery);
When I test this first time (a new browser-cleared cache), it does not work properly.
As soon as I update, it works fine.
I tried to start the function manually (by clicking the button after everything loaded), and it still does not behave differently. It did not work at all on the first boot.
I also tried to make one forced update by setting a cookie, and this does not seem to make any difference.
, - !
