Logo

Links, Tutorials And Scripts


No Right Click ??

There are some ways to interdict right-clicking and prevent hot-linking to your graphics. On this page I gathered some tips and tricks.


Note: info The average user will go away without success but you should know also following:
"There are several variations on JavaScript, but essentially, each one of the proposed no right-click solutions is meaningless. With IE5.x you can literally save the entire webpage to your disk, and you can simply left click on a graphic, hold down the mouse button and drag it up to the address bar, which will open the graphic in a window all by itself, without the right click code. Or just type 'view source:' infront of the url in the adress-bar.
Gecko-based browsers (Netscape, Mozilla) also having a "view source" option in the VIEW menu, and a nice Page-Info is provided with their tools.
Everything your browser has 'seen' is stored (temp.-files) to your pc.
So if you can't acces a graphic directly search in
C:/Windows/Temporary Internet Files/Content IE... or wherever your pc stores its temporary files.
In effect it (the JavaScript) is a nice experiment, can be used as a joke, or to display an abusive comment to the surfer, and for possibly deterring the web newcomer, but for all intents and purposes, it won't really stop anyone from getting your source codes.
It's best summed up by saying; 'The web is no place to be hiding things and nothing can be protected.' "

So it would be useful to add a note to your forum/homepage to ask people
Not to steel/use/link any images...
They should know about the ability to save any graphic to their own space if they want/allowed to use it without stretching someone else's bandwidth and bear costs to that person.

Smile? Sadly enough some folks are either unaware or ignorant, and copy entire webpages.

To add a private thought here:
I don't like webpages where the Right mouse button is disabled. What is a context menu good for when someone bar it from my use! It takes away the comfort which comes with modern use of internet


Tips And Tricks

• A Simple Script-Line
You may add this simple code somewhere to your HEADER to hinder anybody (InternetExplorer and Netscape-Users) using the right mouse-button:
<body oncontextmenu="return false" oncontext="return false">

• JavaScript
Or you may select,copy and paste this JavaScript or from that page:
<SCRIPT language="JavaScript">
<!--
function click()
   {
   if (event.button==2)
      {
 alert('I will not let you do that');
      }
   }
document.onmousedown=click
// -->
</SCRIPT>
To explain the code:

it will not let you right-click on your document (forum, webpagege, whatever..)
if you are nevertheless trying this a little alertbox will pop up
to tell you politely that you can't do this.
So you my change this line, write instead of
'I will not let you do that'
anything else, whatever you like. :-)
(works in IE only.)
It will not hinder people to keep the button pressed down and hit the Enter key to get access to the source code.


• Hiding The Source
Another simple trick to hide the source:
Open your source. Place your cursor in front of the <html> tag and hit your Enter key for a while. It will push your source code out of view.
Nothing is fool proof but this will fool the fools. *grin*

• The Easy Way
You also may want to encrypt your source.
Mr.Pip has created a converter for this: Encoder
• And Another
Download this tool from MicroSoft Script Encoder
Script Encoder is a simple command-line tool that enables script designers to encode
their final script so that Web hosts and Web clients cannot view or modify their source.

• And Another:

(link to Mr. Pip's forum.Third post from above. Thanks, Phil!!)
& Deny image access... July 16 2003, 12:41 PM
Deny image access...
If you put a graphic as background for a table-row and put in a transparent gif and someone try to save this graphic to his pc he will only get that fake gif.


• And Another

Found out by accident ;-) smile
Faster and perhaps easier to create than a table is this way:

 
Graphic Blind GIF Both
mouse spacer maus

The graphic's name here is maus_016.gif and the 'blind' pic's name is spacer.gif
Right-Click on the third picture for the properties... You see, it is not the maus_016.GIF.
<img style="background-image:url(http://netwo
rk54.com/Realm/Rat_Smilies/maus_016.gif);" src="http://network54.
com/Realm/n54_files/spacer.gif" alt="maus" border="0" width="64px" hight="53">

Simply put your graphic as background-picture in an image-tag which will include a transparent gif in the same size as your graphic is. Anybody who save this 'picture' will get .. nothing... but a transparent GIF.


• And Another:

Compress your source-code. How....


• And Another:

Use a graphic-program to cut the picture into pieces.
The program will create a 'blind' table to make it appear as one entire picture.


• And Another:

If you want to show your own creations online but don't like them to be stolen you may want to add a watermark to the picture.
(Realisable with a graphic-program)


• And Another:

Use 'relative' file-names for your pictures.
Put your graphics in an separate folder and re-name it from time to time.
Hot-linked pics will appear at the pinchers webpage only as little box with a red cross within.


• And Another (Thanks, Phil):
Surround your image with an Input-field,
this will hide the image code by right-clicking on it
(it will be still viewable in the page source
but much harder to find ;-) )
<input type=image src="http://www.network54.com/Realm/n54_files/icon_arrow.gif" height=35 width=59>

• You rather will like this easy one

Hide the graphic completely:
Hover your mouse over the pic and be amazed....
    Hide Picture
<SPAN onMouseOver="pic.style.visibility='hidden'" onMouseOut="pic.style.visibility='visible'"><IMG id=pic style="VISIBILITY: visible" height=50 width=50 alt="Hide Picture" src="happy.gif"></SPAN>



    1/2004 © Ed Home/BilgeRat

Top