#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,323
January 2004
todge
|
Post by Todge on Oct 18, 2008 8:10:05 GMT -8
This code will help protect posted images, it's not infallible, but it does stop all the 'normal' or common ways to get at the URLs of posted images or to download them, it also stops people from quoting posts to get at the URLs..
It works in a different way to a previous code I submitted, so if one doesn't work, maybe the other will..
<script type="text/javascript"> <!-- /* Image security v2.. (Global Footer) by Todge Copyright © 2008 Please keep this header intact */
if(location.href.match('tion=display')) { document.onmousedown = function(){var button = 1;} document.onmouseup = function(){button = 0;}
var pics = document.images;
for(p=0; p<pics.length; p++) { if(pics[p].alt.match(/\[image\]/)) { pics[p].oncontextmenu = function(){alert("Please don't do that!");return(false);} pics[p].onclick = function(){alert("Please don't do that!");return(false);} pics[p].onmousedown = function(){alert("Please don't do that!");return(false);} }}}
// Remove images from quotes..
if(document.postForm && document.location.href.match('quote=')) { var quote = document.postForm.message.value; quote = quote.replace(/\[img\](.)+\[\/img\]/ig,''); document.postForm.message.value = quote; } // --> </script>
Put it in either your Global Footer or the footer of the board you want it to work on.
|
|