Skip to content
WJunction - Webmaster Forum

If sandbox is a problem...

Status
Not open for further replies.
Here is a code i wrote to stop sandbox users
May or may not work (Didn't test it)

Code:
<iframe src="linkhere.mp4" sandbox=""></iframe>

Add the code below to your pages and don't forget to change imgur to a 1x1 pixel image

Code:
<body onload="myFunction()" id="inner">
<noscript>Your browser does not support JavaScript or sandbox is not good!</noscript>
<script>
function myFunction(){
document.getElementById("inner").innerHTML="<img name='test' src='http://i.imgur.com/1.jpg' border=0 onerror='offline()' onabort='offline()' width='0' height='0'>";
}
function offline()
{alert('Yep video not for you homie');}
</script>
 

8 comments

This looks problematic, I would use curl to check referring page content.

What if someone blocks popups etc from iframe but enables scripts (allow-scripts)
 
Its the best approach.
I think there is a good way to deal with this, look at streamtape, they somehow block sandbox popups pretty well
Post automatically merged:

ok, tested you solution and can confirm, that it does not work!
 
Last edited:
ok, tested you solution and can confirm, that it does not work!
I just code and didn't test... If scripts are blocked the alert will popup as it can't load the image.

The image that i'm using is
Code:
http://i.imgur.com/Nnse909.jpg

save to your desktop and reupload to imgur.
 
Status
Not open for further replies.

About the author

E
Active Member · Joined
495
Messages
97
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom