Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Stop Your Html Codes From Being Stolen


16 replies to this topic

#1 -Sky-

    For those who are interested in Spiritual discussion: www.thespiritualportal.com

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,039 posts
  • Gender:Male
  • Location:Italy
  • myCENT:91.23

Posted 16 October 2008 - 05:55 PM

Hello people! Obviously a lot of people use these little scripts to stop you from right clicking on websites/HTML pages etc. I know many many people use near enough the same kind of coding as the one I just made. I decided not to put this in the Tutorials section because I know alot of other codes do exactly the same thing as this one I am going to be sharing with you!

This code may be re-distributed if you wish. I have no copyright on it, but please put some kind of "Thanks for the no right-click script".

Here it is:

Quote

oncontextmenu="return false" onselectstart="return true" ondragstart="return false">
This code must be placed below </head> and at <body>.

So It's:

Quote

<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">

I am also going to add my News bar script here, for EVERYONE to use. I have decided It's not very good for me to only allow the use of it for just Trap17 and my site.

Script Name: News Link
Description of Script: This "News Link" script puts a header in the top middle of the board under "<% BOARD HEADER %>" and above "<% MEMBER BAR %>".
Screenshots: http://www.trap17.com/forums/req-and-sugge...ink-t61172.html
IPB: 1.3x and 2.0x.
Script code:
<br>
&lt;script type="text/javascript" src="jscripts/ipb_forum.js"></script>
<table cellspacing="0" class="newslink">
	<tr>
		<td><td align="center"><b><font color="-[HEX color code here]-">Central-Gaming latest news: <a href="http://central-gaming.trap17.com/forums/index.php?showtopic=14&view=getnewpost">Changes</a></b></p><br/></td>
		<td align="right" valign="middle">
		
		</td>
	</tr>

</table>
<br>


Change "Central-Gaming latest news:" text to your desired name, and change the link

Quote

a href="http://central-gaming.trap17.com/forums/index.php?showtopic=14&view=getnewpost">Changes</a>
to the news forum:

Quote


Attention Notice: If you wish to use this news bar script PLEASE Thank me by putting something like "A big Thanks to -Sky- for the News Bar Script" HTML code:
<p><a href=""http://www.trap17.com/forums/sky-m67096.html"">-Sky-</a></p>
.

This script/modification will work only for Invision Power Board (IPB) 1.3x. This means also it will work on IP.Boards 2.0x.

Thank you

#2 Nabb

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 244 posts
  • Gender:Male
  • Location:Australia
  • myCENT:58.68
  • Spam Patrol

Posted 17 October 2008 - 06:02 AM

ctrl-u

(a fancy way - bookmark this (unless you're in IE)) java script:window.location="view-source:"+document.URL

#3 -Sky-

    For those who are interested in Spiritual discussion: www.thespiritualportal.com

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,039 posts
  • Gender:Male
  • Location:Italy
  • myCENT:91.23

Posted 17 October 2008 - 10:51 AM

View PostNabb, on Oct 17 2008, 07:02 AM, said:

ctrl-u

(a fancy way - bookmark this (unless you're in IE)) java script:window.location="view-source:"+document.URL
What's that all about? Did I forget to add something else to the description?

Anyways, I hope you all enjoy. :lol:

-Sky

#4 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 17 October 2008 - 04:11 PM

Trying to prevent people from "stealing" your HTML is unnecessary and a waste of effort. Even if you disable their right-click, there are still ways of getting passed that. Then there is their cache, where they can right click (:lol:) and pick "Open with...". But there's really no point in trying to "steal" HTML from others. Also, any HTML specialist can not only figure out how the site is structured and coded, but also won't have any need for "your" HTML. Even if you prevent your pages from being cached, there's still ways around that. But that'll just increase your bandwidth consumption.

#5 -Sky-

    For those who are interested in Spiritual discussion: www.thespiritualportal.com

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,039 posts
  • Gender:Male
  • Location:Italy
  • myCENT:91.23

Posted 17 October 2008 - 10:14 PM

True. Eh, well theres my news script you can all still enjoy. :D All though I could search for ways to disable the cache from being viewed etc. It may not work but still...at least it stops script noobs from ripping my stuff. I hate it when people steel my signatures/avatars and use them for themselves like RedAlert did, with both my avatar and my signature banner. :lol:

Thanks anyway Fusion. ^_^

#6 gara456

    Newbie [Level 1]

  • Kontributors
  • Pip
  • 11 posts

Posted 23 October 2008 - 01:02 PM

that is not working, and also meaningless to prevent the code from others.

thanks

Edited by gara456, 23 October 2008 - 01:03 PM.


#7 pyost

    Newbie [Level 2]

  • Kontributors
  • PipPip
  • 34 posts
  • Gender:Male
  • Location:Belgrade, Serbia
  • myCENT:55.01

Posted 23 October 2008 - 02:44 PM

Not only meaningless - impossible. If you want the page to be displayed properly, all the information (e.g. HTML/CSS, images) must be sent to the visitor's browser, and therefore the visitor's computer. You can try any script to prevent "theft" but it always comes to the fact that everything is given to the user the moment he opens a page of your web site.

#8 shadowx

    Live your life so that in death you may stand side by side with your gods. Not at their feet.

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1,674 posts
  • Gender:Male
  • Location:Essex, UK
  • Interests:Photography is a big interest, i have some photos up at my site, apex photographs (http://apex-photographs.com). Using my Lumix g1 to take the photos of course! <br /><br />Um computer games... photo editing and thats about it!
  • myCENT:68.57
  • Spam Patrol

Posted 23 October 2008 - 11:05 PM

As has been said its really impossible to do such things. A classic way is to prevent right clicking, but in most cases disabling javascript will thwart most scripts as most rely on JS. also clicking left and right button together fools the system. In general the script looks for the numbers corresponding to a mouse click, something like "1" is left, "2" is right, so if the mouseclick == 2 it was a right click so block it. but if i click both buttons and generate a 3 then the script is useless :P

also View>source

There are i think programs that claim to hide your HTML by somehow encrypting it but telling the browser how to display it or something. I dont know if they actually exist/work but im sure ive seen them advertised for high prices.

But as Pyost said, for a browser to render a page it needs unrestricted access to the HTML code. and to display the code to the browser is to display it to the user!

Of course you could always make your websute using flash or something and then the source is hidden, though thre are ways to get fragments back :)

#9 amarti64

    Newbie [Level 1]

  • Kontributors
  • Pip
  • 12 posts

Posted 29 October 2008 - 12:56 PM

View Postshadowx, on Oct 23 2008, 11:05 PM, said:

There are i think programs that claim to hide your HTML by somehow encrypting it but telling the browser how to display it or something. I dont know if they actually exist/work but im sure ive seen them advertised for high prices.

I saw one of those being sold for 30 dollars. As it turns out, it put all the HTML on one line. Thirty dollars, for that. And that's why I don't trust the Internet.

#10 galexcd

    Trap Grand Marshal Member

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,331 posts
  • Gender:Not Telling
  • myCENT:39.82

Posted 29 October 2008 - 06:21 PM

Disabling right click is one of the most annoying things you can do if you own a website. It is especially annoying when a message comes up saying "No right click allowed" or something like that, it just makes me more tempted to steal the source code. But then again the kind of people who put this on their website can't design websites for anything, so there really isn't even the point of wasting the energy moving my mouse up to the "View" menu. As pyost said, the data needs to be sent to the browser so even if you were able to tell most standard browsers to disable the "view source" menu item, it would be fairly easy just to download the the source of the website via other means. If you put this content up in a place where people can access it, then just know that it can be stolen. There's no use fighting it. If you are able to design a website that is good enough that others may want to steal it, then you should feel proud of your web design abilities.

Now on to the uses of this script. *Everybody gasps*. Yes, returning false on right click actually can be implemented very well if you know what you are doing. Google is one such example, where they replace your right click menu with their menu in Google Docs when you right click in the input area, allowing them to insert their own items. They are clearly not attempting to thwart others from accessing their source, they are trying to make their website more user friendly, and more advanced.

Edited by galexcd, 29 October 2008 - 06:22 PM.





Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users