December 13th, 2012, 10:25 AM
Text selection disable script and Opera flaw
This script works fine on all other browsers except in Opera, if you drag mouse a little above the (starting of essay) "Evliliğe Dair" then the text can be selected. How to fix this flaw?
if (typeof target.onselectstart!="undefined") //IE route
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
else //All other route (ie: Opera)
target.style.cursor = "default"
December 13th, 2012, 10:40 AM
December 13th, 2012, 11:17 AM
Not really, if I add an another empty layer just above of the "Evliliğe Dair" then text selection completely disabled for Opera but I don't want to add such layer to my 1000+ pages.
December 13th, 2012, 06:28 PM
Being able to prevent text selection can be useful for drag-and-drop scripts, but using it to prevent copy-and-pasting of text is just user-hostile. People can often just do a "Select All" and then a "Copy" anyway. And usually they could view the page's source to access the text as well.
The web is a free (well mostly) and open medium. Get used to it.
Comments on this post
December 14th, 2012, 08:23 AM
Well if you spent 7 years on a site with original content then your site content becomes just a compilation of other forums and blogs you'd think different.
December 14th, 2012, 08:51 AM
there is no technical way to prevent people from "stealing" your content. None.
So forget that "copyright script". All it does is irritate and annoy legitimate users and give the bad guys a good laugh. Actually, when a website doesn't allow me to do what I want to do, I'm out and won't come back. So this script might actually make you lose users.
What you're trying to do is kind of a contradiction in terms: When you publish something, it's public. Anybody can view and use the data in any way they want.
I understand your concerns, and it really is annoying to see content pop up somewhere else. But you're fighting on the wrong end.
By the way, the script also doesn't work in Chrome. Throw it away.
December 14th, 2012, 09:27 AM
If I add an empty layer on the text then script works with Chrome and Opera as well.
December 14th, 2012, 09:37 AM
What are you here for when you don't care what we have to say? If you want useless help for nonsense scripts from the 90s, go to w3schools.
I can still select the text by simply clicking outside of the layers. And if I couldn't, I'd hide the layers in my browser. That's two clicks. I don't even have to view the source.
December 14th, 2012, 10:35 AM
Surely it's useful than what you keep saying or better than nothing. Bye.