View Full Version : No Right Clicks, Floaters, and Fireworks!


CaraLily13
07-21-2003, 09:45 PM
Hello! Thanks for helping me! I don't want any1 to do a "right click" on my website..I am useing this code and it doesn't work:

<script language="javascript">

// No click script
//provided free at http://www.lissaexplains.com
// Don't delete this header!

function click() {

if (event.button==1 || event.button==2) {

alert('Paws off!')

}

}

document.onmousedown=click

</script>


<script language="JavaScript"> <!--
// No rightclick script v.2.5
// (c) 1998 barts1000
// barts1000@aol.com
//provided free at http://www.lissaexplains.com
// Don't delete this header!

var message="Sorry, that function is disabled.\n\nContents & Graphics Copyright İyour name\nOur work is not Public Domain, and should NOT be taken from this site."; // Message for the alert box

// Don't edit below!

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>


Also, I can't get my floaters to work!:

<script>
<!--
document.write(unescape("%3Cscript%20language%3D%22JavaScript1.2%22%3E%0D%0 A%0D%0A/*%0D%0ASnow%20Effect%20Script%0D%0ASubmitted%20by% 20Altan%20d.o.o.%20%28snow@altan.hr%2C%20http%3A//www.altan.hr/snow/index.html%29%0D%0APermission%20granted%20to%20Dyn amicdrive.com%20to%20feature%20script%20in%20archi ve%0D%0AFor%20full%20source%20code%20to%20this%20s cript%2C%20visit%20http%3A//dynamicdrive.com%0D%0A*/%0D%0A%20%20%0D%0A%0D%0A%20%20//Configure%20below%20to%20change%20URL%20path%20to% 20the%20snow%20image%0D%0A%20%20var%20snowsrc%3D%2 2http://members.aol.com/dollangelz718/images/dsp.gif%22%0D%0A%20%20//%20Configure%20below%20to%20change%20number%20of%2 0snow%20to%20render%0D%0A%20%20var%20no%20%3D%205% 3B%0D%0A%0D%0A%20%20var%20ns4up%20%3D%20%28documen t.layers%29%20%3F%201%20%3A%200%3B%20%20//%20browser%20sniffer%0D%0A%20%20var%20ie4up%20%3D% 20%28document.all%29%20%3F%201%20%3A%200%3B%0D%0A% 20%20var%20ns6up%20%3D%20%28document.getElementByI d%26%26%21document.all%29%20%3F%201%20%3A%200%3B%0 D%0A%0D%0A%20%20var%20dx%2C%20xp%2C%20yp%3B%20%20% 20%20//%20coordinate%20and%20position%20variables%0D%0A%2 0%20var%20am%2C%20stx%2C%20sty%3B%20%20//%20amplitude%20and%20step%20variables%0D%0A%20%20v ar%20i%2C%20doc_width%20%3D%20800%2C%20doc_height% 20%3D%20600%3B%0D%0A%20%20%0D%0A%20%20if%20%28ns4u p%7C%7Cns6up%29%20%7B%0D%0A%20%20%20%20doc_width%2 0%3D%20self.innerWidth%3B%0D%0A%20%20%20%20doc_hei ght%20%3D%20self.innerHeight%3B%0D%0A%20%20%7D%20e lse%20if%20%28ie4up%29%20%7B%0D%0A%20%20%20%20doc_ width%20%3D%20document.body.clientWidth%3B%0D%0A%2 0%20%20%20doc_height%20%3D%20document.body.clientH eight%3B%0D%0A%20%20%7D%0D%0A%0D%0A%20%20dx%20%3D% 20new%20Array%28%29%3B%0D%0A%20%20xp%20%3D%20new%2 0Array%28%29%3B%0D%0A%20%20yp%20%3D%20new%20Array% 28%29%3B%0D%0A%20%20am%20%3D%20new%20Array%28%29%3 B%0D%0A%20%20stx%20%3D%20new%20Array%28%29%3B%0D%0 A%20%20sty%20%3D%20new%20Array%28%29%3B%0D%0A%20%2 0%0D%0A%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20n o%3B%20++%20i%29%20%7B%20%20%0D%0A%20%20%20%20dx%5 Bi%5D%20%3D%200%3B%20%20%20%20%20%20%20%20%20%20%2 0%20%20%20%20%20%20%20%20%20%20%20%20%20//%20set%20coordinate%20variables%0D%0A%20%20%20%20x p%5Bi%5D%20%3D%20Math.random%28%29*%28doc_width-50%29%3B%20%20//%20set%20position%20variables%0D%0A%20%20%20%20yp% 5Bi%5D%20%3D%20Math.random%28%29*doc_height%3B%0D% 0A%20%20%20%20am%5Bi%5D%20%3D%20Math.random%28%29* 20%3B%20%20%20%20%20%20%20%20%20//%20set%20amplitude%20variables%0D%0A%20%20%20%20st x%5Bi%5D%20%3D%200.02%20+%20Math.random%28%29/10%3B%20//%20set%20step%20variables%0D%0A%20%20%20%20sty%5Bi %5D%20%3D%200.7%20+%20Math.random%28%29%3B%20%20%2 0%20%20//%20set%20step%20variables%0D%0A%20%20%20%20if%20%2 8ns4up%29%20%7B%20%20%20%20%20%20%20%20%20%20%20%2 0%20%20%20%20%20%20%20%20%20%20//%20set%20layers%0D%0A%20%20%20%20%20%20if%20%28i%2 0%3D%3D%200%29%20%7B%0D%0A%20%20%20%20%20%20%20%20 document.write%28%22%3Clayer%20name%3D%5C%22dot%22 +%20i%20+%22%5C%22%20left%3D%5C%2215%5C%22%20top%3 D%5C%2215%5C%22%20visibility%3D%5C%22show%5C%22%3E %3Ca%20href%3D%5C%22http%3A//dynamicdrive.com/%5C%22%3E%3Cimg%20src%3D%27%22+snowsrc+%22%27%20bo rder%3D%5C%220%5C%22%3E%3C/a%3E%3C/layer%3E%22%29%3B%0D%0A%20%20%20%20%20%20%7D%20els e%20%7B%0D%0A%20%20%20%20%20%20%20%20document.writ e%28%22%3Clayer%20name%3D%5C%22dot%22+%20i%20+%22% 5C%22%20left%3D%5C%2215%5C%22%20top%3D%5C%2215%5C% 22%20visibility%3D%5C%22show%5C%22%3E%3Cimg%20src% 3D%27%22+snowsrc+%22%27%20border%3D%5C%220%5C%22%3 E%3C/layer%3E%22%29%3B%0D%0A%20%20%20%20%20%20%7D%0D%0A %20%20%20%20%7D%20else%20if%20%28ie4up%7C%7Cns6up% 29%20%7B%0D%0A%20%20%20%20%20%20if%20%28i%20%3D%3D %200%29%20%7B%0D%0A%20%20%20%20%20%20%20%20documen t.write%28%22%3Cdiv%20id%3D%5C%22dot%22+%20i%20+%2 2%5C%22%20style%3D%5C%22POSITION%3A%20absolute%3B% 20Z-INDEX%3A%20%22+%20i%20+%22%3B%20VISIBILITY%3A%20vi sible%3B%20TOP%3A%2015px%3B%20LEFT%3A%2015px%3B%5C %22%3E%3Ca%20href%3D%5C%22http%3A//dynamicdrive.com%5C%22%3E%3Cimg%20src%3D%27%22+sno wsrc+%22%27%20border%3D%5C%220%5C%22%3E%3C/a%3E%3C/div%3E%22%29%3B%0D%0A%20%20%20%20%20%20%7D%20else% 20%7B%0D%0A%20%20%20%20%20%20%20%20document.write% 28%22%3Cdiv%20id%3D%5C%22dot%22+%20i%20+%22%5C%22% 20style%3D%5C%22POSITION%3A%20absolute%3B%20Z-INDEX%3A%20%22+%20i%20+%22%3B%20VISIBILITY%3A%20vi sible%3B%20TOP%3A%2015px%3B%20LEFT%3A%2015px%3B%5C %22%3E%3Cimg%20src%3D%27%22+snowsrc+%22%27%20borde r%3D%5C%220%5C%22%3E%3C/div%3E%22%29%3B%0D%0A%20%20%20%20%20%20%7D%0D%0A%2 0%20%20%20%7D%0D%0A%20%20%7D%0D%0A%20%20%0D%0A%20% 20function%20snowNS%28%29%20%7B%20%20//%20Netscape%20main%20animation%20function%0D%0A%20 %20%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20no%3B %20++%20i%29%20%7B%20%20//%20iterate%20for%20every%20dot%0D%0A%20%20%20%20%2 0%20yp%5Bi%5D%20+%3D%20sty%5Bi%5D%3B%0D%0A%20%20%2 0%20%20%20if%20%28yp%5Bi%5D%20%3E%20doc_height-50%29%20%7B%0D%0A%20%20%20%20%20%20%20%20xp%5Bi%5D %20%3D%20Math.random%28%29*%28doc_width-am%5Bi%5D-30%29%3B%0D%0A%20%20%20%20%20%20%20%20yp%5Bi%5D%20 %3D%200%3B%0D%0A%20%20%20%20%20%20%20%20stx%5Bi%5D %20%3D%200.02%20+%20Math.random%28%29/10%3B%0D%0A%20%20%20%20%20%20%20%20sty%5Bi%5D%20%3 D%200.7%20+%20Math.random%28%29%3B%0D%0A%20%20%20% 20%20%20%20%20doc_width%20%3D%20self.innerWidth%3B %0D%0A%20%20%20%20%20%20%20%20doc_height%20%3D%20s elf.innerHeight%3B%0D%0A%20%20%20%20%20%20%7D%0D%0 A%20%20%20%20%20%20dx%5Bi%5D%20+%3D%20stx%5Bi%5D%3 B%0D%0A%20%20%20%20%20%20document.layers%5B%22dot% 22+i%5D.top%20%3D%20yp%5Bi%5D%3B%0D%0A%20%20%20%20 %20%20document.layers%5B%22dot%22+i%5D.left%20%3D% 20xp%5Bi%5D%20+%20am%5Bi%5D*Math.sin%28dx%5Bi%5D%2 9%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20setTime out%28%22snowNS%28%29%22%2C%2010%29%3B%0D%0A%20%20 %7D%0D%0A%0D%0A%20%20function%20snowIE_NS6%28%29%2 0%7B%20%20//%20IE%20and%20NS6%20main%20animation%20function%0D %0A%20%20%20%20for%20%28i%20%3D%200%3B%20i%20%3C%2 0no%3B%20++%20i%29%20%7B%20%20//%20iterate%20for%20every%20dot%0D%0A%20%20%20%20%2 0%20yp%5Bi%5D%20+%3D%20sty%5Bi%5D%3B%0D%0A%20%20%2 0%20%20%20if%20%28yp%5Bi%5D%20%3E%20doc_height-50%29%20%7B%0D%0A%20%20%20%20%20%20%20%20xp%5Bi%5D %20%3D%20Math.random%28%29*%28doc_width-am%5Bi%5D-30%29%3B%0D%0A%20%20%20%20%20%20%20%20yp%5Bi%5D%20 %3D%200%3B%0D%0A%20%20%20%20%20%20%20%20stx%5Bi%5D %20%3D%200.02%20+%20Math.random%28%29/10%3B%0D%0A%20%20%20%20%20%20%20%20sty%5Bi%5D%20%3 D%200.7%20+%20Math.random%28%29%3B%0D%0A%20%20%20% 20%20%20%20%20doc_width%20%3D%20ns6up%3Fwindow.inn erWidth%20%3A%20document.body.clientWidth%3B%0D%0A %20%20%20%20%20%20%20%20doc_height%20%3D%20ns6up%3 Fwindow.innerHeight%20%3A%20document.body.clientHe ight%3B%0D%0A%20%20%20%20%20%20%7D%0D%0A%20%20%20% 20%20%20dx%5Bi%5D%20+%3D%20stx%5Bi%5D%3B%0D%0A%20% 20%20%20%20%20if%20%28ie4up%29%7B%0D%0A%20%20%20%2 0%20%20document.all%5B%22dot%22+i%5D.style.pixelTo p%20%3D%20yp%5Bi%5D%3B%0D%0A%20%20%20%20%20%20docu ment.all%5B%22dot%22+i%5D.style.pixelLeft%20%3D%20 xp%5Bi%5D%20+%20am%5Bi%5D*Math.sin%28dx%5Bi%5D%29% 3B%0D%0A%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20 %20else%20if%20%28ns6up%29%7B%0D%0A%20%20%20%20%20 %20document.getElementById%28%22dot%22+i%29.style. top%3Dyp%5Bi%5D%3B%0D%0A%20%20%20%20%20%20document .getElementById%28%22dot%22+i%29.style.left%3Dxp%5 Bi%5D%20+%20am%5Bi%5D*Math.sin%28dx%5Bi%5D%29%3B%0 D%0A%20%20%20%20%20%20%7D%20%20%20%0D%0A%20%20%20% 20%7D%0D%0A%20%20%20%20setTimeout%28%22snowIE_NS6% 28%29%22%2C%2010%29%3B%0D%0A%20%20%7D%0D%0A%0D%0A% 20%20if%20%28ns4up%29%20%7B%0D%0A%20%20%20%20snowN S%28%29%3B%0D%0A%20%20%7D%20else%20if%20%28ie4up%7 C%7Cns6up%29%20%7B%0D%0A%20%20%20%20snowIE_NS6%28% 29%3B%0D%0A%20%20%7D%0D%0A%0D%0A%3C/script%3E%3Ca%20href%3D%22http%3A//www.dollparadise.net%22%3E%3Cimg%20src%3D%22http://publish.hometown.aol.com/dollangelz718/images/fbd.gif%22%20border%3D0%3E%3C/a%3E"));
//-->
</script>

Dude128
07-22-2003, 02:34 AM
in what way does it not work? does it not give you the popup, or does it not make it impossible to get the source code? if it's just the latter, then it's working properly. no right clicks in my opinion do absolutely nothing but annoy your visitors. there are useful things on the right click menu, and not being able to use it is annoying (and the ones that disable the scroll wheel so you can't even begin to scroll are even more annoying). to get the source, anyone can easily go to View > Source at the top of the browser window.

if you aren't getting the popup, though: where did you put those codes? they should go in the head section to work as they should.

also, the second code is redundant. the first one disables all clicks, so there's no need to then only disable the right click.

for the next part of your question: please post the unencrypted code. yes, it is possible and not that hard to decode it, but it's time consuming and I doubt anyone here wants to do it.

CaraLily13
07-22-2003, 02:05 PM
Well, it doesn't work because you can still click on everything & the box with "properties, view source, save image as, etc. still pops up!

Also, my webpage isn't all that great..it's just a personal page, soI don't think people would care TOO much if they didn't get to right click..I just don't want them stealing images.


P.S. I posted the wrong 2nd. code..sry *slaps forehead*

Kaliyoda
07-22-2003, 02:09 PM
Hi

If someone wants your images then they will get them. Taking out the right button menu will just slow them down by about 5 seconds.

View Source will give them the direct path to your image - failing that they can just paste a screen dump into their graphics prog and away they go. Or they can just have a rummage though their browser cache for your images.

The basic rule I use is this: If I don't want peopel to have it - don't put it on your web page.

CaraLily13
07-22-2003, 02:16 PM
I know that if someone REALLY wants to get my images, they can..but my page is a personal page that mostly my friends look at..my one friend keeps stealing my images tho..so that's why I want to try this! Plus, shes new to HTML & probably doesn't know about the "view source" button.
My view source button is the the pop-up that comes up when you right click..where is yours?

Dude128
07-22-2003, 04:54 PM
Originally posted by Dude128
for the next part of your question: please post the unencrypted code. yes, it is possible and not that hard to decode it, but it's time consuming and I doubt anyone here wants to do it.

please see the above.

also, please use the Edit button within 4 minutes instead of replying. there's really no reason to have 5 posts in a row. I combined a couple, but I couldn't do any more because that "encrypted" code is so long. I'm deleting your replies because nobody can do anything with the encrypted code anyway.