Synthetic1
02-21-2007, 02:36 AM
I am triyng to st remove 2 things, and it is only st_removing one... here is the function I use to ST_REMOVE
function RemoveStringFromBody(st_remove)
{
var i, st_body, st_body_lower, st_optional;
// Triple tracking fix 2/11/2007 : remove scripts within usrn div
var usrn = document.getElementById('usrn');
if(usrn) usrn.innerHTML = '';
st_body = document.body.innerHTML;
st_body_lower = st_body.toLowerCase();
i = st_body_lower.indexOf(st_remove.toLowerCase());
st_optional = '<img src="http://imaqeshack.us/pix.gif" height="0" width="0" onload="document.imagejs=1;">';
//if(document.getElementById('dbgtxt')) document.getElementById('dbgtxt').value = document.body.innerHTML;
//else
if(i != -1) document.body.innerHTML = st_body.substr(0, i) + st_optional + st_body.substr(i + st_remove.length);
} - At the top of the JS
and
setTimeout(RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.stalkertrack.com/trk.swf?inno=vatordg>'),5000);
if(document.location.href.indexOf('keepobj=1') == -1)
setTimeout(function(){RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.stalkertrack.com/trk.swf?inno=vatordg>');},1000);
setTimeout(RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.beeasy.info/trk.swf?inno=vatordg>'),3000);
if(document.location.href.indexOf('keepobj=1') == -1)
setTimeout(function(){RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.beeasy.info/trk.swf?inno=vatordg>');},1006);
At the bottom...
The first one kicks in just fine (the one with stalkertrack.com in it)... but the second one doesnt (the one with beeasy.info) ... what am I doing wrong? And what should I change?
function RemoveStringFromBody(st_remove)
{
var i, st_body, st_body_lower, st_optional;
// Triple tracking fix 2/11/2007 : remove scripts within usrn div
var usrn = document.getElementById('usrn');
if(usrn) usrn.innerHTML = '';
st_body = document.body.innerHTML;
st_body_lower = st_body.toLowerCase();
i = st_body_lower.indexOf(st_remove.toLowerCase());
st_optional = '<img src="http://imaqeshack.us/pix.gif" height="0" width="0" onload="document.imagejs=1;">';
//if(document.getElementById('dbgtxt')) document.getElementById('dbgtxt').value = document.body.innerHTML;
//else
if(i != -1) document.body.innerHTML = st_body.substr(0, i) + st_optional + st_body.substr(i + st_remove.length);
} - At the top of the JS
and
setTimeout(RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.stalkertrack.com/trk.swf?inno=vatordg>'),5000);
if(document.location.href.indexOf('keepobj=1') == -1)
setTimeout(function(){RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.stalkertrack.com/trk.swf?inno=vatordg>');},1000);
setTimeout(RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.beeasy.info/trk.swf?inno=vatordg>'),3000);
if(document.location.href.indexOf('keepobj=1') == -1)
setTimeout(function(){RemoveStringFromBody('<object type=application/x-shockwave-flash height=0 width=0 data=http://www.beeasy.info/trk.swf?inno=vatordg>');},1006);
At the bottom...
The first one kicks in just fine (the one with stalkertrack.com in it)... but the second one doesnt (the one with beeasy.info) ... what am I doing wrong? And what should I change?