Forum Moderators: open

Message Too Old, No Replies

detect NoScript

         

rafarataneneces

3:38 am on Feb 1, 2010 (gmt 0)

10+ Year Member



I have the current script that I use to detect NoScript

<?
$forward="index.php"
$variables= $_SERVER['QUERY_STRING'];
?>

<!-- NoScript-->
<script>
a = 1;
switch(a) {
/* NoScript will follow this */
case 0:top.location.href = 'ssi/scripts/noscript.php';
}
</script>
<script>
/* JS will follow this */
eval(function(p,a,c,k,e,r){
e=String;if(!''.replace(/^/,String)){
while(c--)r[c]=k[c]||c;k=[function(e){
return r[e]
}];e=function(){
return'\\w+'
};c=1
};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p
}
('2.1=\'0.3\';',4,4,'<? echo $forward; ?>|location|document|php<? echo $variables;?>'.split('|'),0,{})
)
</script>
<!-- NoScript-->

The script works great

my domain is

[domain.com...]

Now, if I put Mark domain.com as untrusted, the script detects I am blocking JavScript and it tells me to Mark domain.com as trusted

The script works great

Now, I have another question

Can I detect if NoScript is blocking

googlesyndication.com
ugo.com
fastclick.net

other domains?

I have Adbock detector and NoScript detector

but everybody can use Adblock and disable on domain.com

and they can also use NoScript and makr domain.com as trusted

but that means all ads will still be blocked

I have no idea how much money I'm loosing every month because of this

whoisgregg

10:32 pm on Feb 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, rafarataneneces!

You would only be able to check other domains if you controlled them. There's no way for Javascript to be evaluated in the context of a domain other than the one the visitor is on. This is part of the cross-domain browser security model.