If sandbox is a problem...

Status
Not open for further replies.

electrify

Active Member
500
2019
97
1,880
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.
Back
Top