DIGIT-ARC read-only archive · snapshot: July 23, 2026

Make website copy protected

26 posts · originally from https://geek.digit.in/community/threads/make-website-copy-protected.154614/

mohityadavx
mohityadavx Original post #1
Mar 25, 2012 at 12:25 PM
How could one make website copy protected like this

Instructions issued to Examiners will now be disclosed under RTI

I was doing a case law search and accidentally came upon this. I do not get the option to select the text. How could I do this?
coolpcguy
Mar 25, 2012 at 12:29 PM
There's some js to disable them

Code:
document.oncontextmenu = function(){return false;};

document.onselectstart=function(){
	if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
		return false;
	}
	else {
	 	return true;
	}
};
if (window.sidebar) {
	document.onmousedown=function(e){
		var obj=e.target;
		if (obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD") {
			return true;
		}
		else {
			return false;
		}
	};
}

document.ondragstart = function(){return false;};

Trivial to bypass them.
Faun
Faun #3
Mar 25, 2012 at 12:45 PM
Use noscript
T
Tech&ME #4
Mar 26, 2012 at 12:23 AM
But some browsers will still allow you to copy the contains. This trick works with IE (best).
dashing.sujay
Mar 26, 2012 at 1:18 AM
I came across this kind of site for the first time. Any way to bypass them?
krishnandu.sarkar
Mar 26, 2012 at 10:17 AM
Instructions issued to Examiners will now be disclosed under RTI

In what has come as a relief to the whole Student Fraternity, the Supreme Court has ruled that Instructions issued to Examiners for checking the papers can now be made public after the Examination has been conducted.

The Supreme Court in its ruling announced that the “Instructions issued to the Examiners” can be construed as Intellectual Property before the Examination is conducted but this right lapses once the examination is conducted.

The Supreme Court pronounced its decision while hearing a case between the Institute of Chartered Accountants of India (ICAI) and a CA Student.

The CA Student had filed an application under RTI for disclosure of the “Instructions issued to Examiners” to which ICAI responded that “Instructions issued to Examiners” cannot be disclosed under RTI.

However, the Supreme Court (in a bench comprising of justice R. V. Raveendran and A.K. Patnaik) announced its decision in the favour the CA Student and said that “The RTI Act does not bar or prohibit the disclosure of question papers, model answers (solutions to questions) and instructions if any given to the examiners and moderators after the examination and after the evaluation of answer sheets is completed, as at that stage they will not harm the competitive position of any third party”

It also observed that “public authorities owe a duty to disseminate the information widely suo moto to the public so as to make it easily accessible to the public”. The court also noted that an object of “democracy is to bring about transparency of information to contain corruption and bring about accountability.

RTI Instructions issued to Examiners will now be disclosed under RTI
ICAI’s defence and contention

ICAI had contended that the disclosure of Answer Sheets would burden the examination body with extra work.

However, the Supreme Court announced that “Additional workload is not a defence. If there are practical insurmountable difficulties, it is open to the examining bodies to bring them to the notice of the government for consideration so that any changes to the Act can be deliberated upon.”

“Examining bodies like ICAI should change their old mindsets and tune them to the new regime of disclosure of maximum information.”

This is the text :p

Way : Nothing new..!! As suggested by Faun. Use FF + NoScript :p
ajaybc
ajaybc #7
Mar 26, 2012 at 10:54 AM
Or you could just press Ctrl + U in Firefox. This will bring up the view source window from where you can copy the text.
P
PraKs #8
Mar 26, 2012 at 3:58 PM
Correct - Use FF + NoScript

Just dont allow anything in No Script when you visit for the 1st time :)
RCuber
RCuber #9
Mar 26, 2012 at 4:13 PM
I used Ctrl+A to select all text.. worked !!
dashing.sujay
Mar 26, 2012 at 5:17 PM
Update: Text selection is working normally in opera :eek: !!
mohityadavx
Mar 27, 2012 at 4:09 PM
There's some js to disable them

Code:
document.oncontextmenu = function(){return false;};

document.onselectstart=function(){
	if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
		return false;
	}
	else {
	 	return true;
	}
};
if (window.sidebar) {
	document.onmousedown=function(e){
		var obj=e.target;
		if (obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD") {
			return true;
		}
		else {
			return false;
		}
	};
}

document.ondragstart = function(){return false;};

Trivial to bypass them.
Thanks

And Thanks to everyone else also who gave the methids to byepass it
R
Mar 28, 2012 at 9:56 AM
Just disable Javascript in mozilla firefox.go to tool>option and disable javascript.
nbaztec
nbaztec #14
Mar 30, 2012 at 9:25 PM
JS as a protection mechanism, why am I not amused?
Anyone who thinks JS is the way to go for protection is a weirdo.

document.onselectstart is assigned a function always returning false, which effectively tells the browser not to propagate the event further. Bypassing it is as trivial as reassigning it.
In JS console of the browser
Code:
document.onselectstart=null;
Or on the address bar
Code:
javascript: document.onselectstart=null;
and the document's selection start is reassigned to null.
nbaztec
nbaztec #16
Mar 31, 2012 at 1:00 AM
Code:
document.onselectstart=function(){return false;};
dashing.sujay
Mar 31, 2012 at 1:11 AM
Thanks, already got it from source code! :))

One question- there's a text box beside "subscribe". Selection of text is possible there except elsewhere.

I can figure out the following code for barring selection-

Code:
document.onselectstart=function(){
	if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") {
		return false;
	}
	else {
	 	return true;
	}
};

What changes I need to do to stop selection of texts in text box & vice versa ?
nbaztec
nbaztec #18
Mar 31, 2012 at 1:33 AM
Code:
document.onselectstart=function(){
	return  (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password");
};
nbaztec
nbaztec #20
Mar 31, 2012 at 1:55 AM
A textbox is rendered separately by the browser. You can set it to enabled=false.

Edit: Sorry I was barely awake (and busy with work). Wasn't able to think straight.
Code:
document.onmousedown = document.onselectstart=function(){return false;};   // Kinda hacky but works.
aroraanant
Mar 31, 2012 at 2:13 AM
Nice thread.
nbaztec
nbaztec #22
Mar 31, 2012 at 1:57 PM
A textbox is rendered separately by the browser. You can set it to enabled=false.

Edit: Sorry I was barely awake (and busy with work). Wasn't able to think straight.
Code:
document.onmousedown = document.onselectstart=function(){return false;};   // Kinda hacky but works.
Do note that you cannot disable content inside iframe/frames using this since it leads to an Unsafe Javascript Access
dashing.sujay
Mar 31, 2012 at 2:07 PM
^But that's disabling text entering. I just want it to let enter but not select it.
And how's it hacky?
nbaztec
nbaztec #24
Mar 31, 2012 at 9:47 PM
^That ain't possible, since textinput/textarea etc. are rendered by the browser separately and their work is to let users select (otherwise known as a label).
Hence the hacky way - to disable mousedown to select textbox.
dashing.sujay
Mar 31, 2012 at 10:22 PM
Thanks for your efforts.
nbaztec
nbaztec #26
Mar 31, 2012 at 10:33 PM
No problem :D