Cool, I love counterintuitive (and even counterproductive) solutions just for their own sake. I tried to do a similar thing with text a while ago: http://nbush.github.io/headache/
"Tired of people stealing your content? Looking to make copying HTML text a huge pain for your users? Sick and tired of useful, well-made Python scripts?
Headache will make it so users cannot select, copy or paste html text without getting a bunch of garbage as well. Try copying this sentence. No, seriously, try it. Yeah that's right. Now try pasting it somewhere.
Now the only way you can steal my sweet, sweet content is by writing it out letter by letter or writing your own noble script that filters out all the junk. Checkmate.
You might say that this solution is unintuitive, massively inefficient and completely unnecessary. Well that's not the true Hacker Spirit now, is it?
"
;)
As a challenge I wanted to see how hard it would be to circumvent this. Here's a bookmarklet:
javascript:void(function(s,i){for(i=0;i<s.length;i++)if(window.getComputedStyle(s[i]).color=='transparent')s[i].style.display='none'}(document.getElementsByTagName('span')))
That should be one line with no spaces if gets line wrapped.
Nice work! Here's another solution posted in an earlier thread: javascript:d=document.createElement("div");d.innerHTML="<style>span:nth-child(odd) {display:none;}</style>";document.body.appendChild(d);
I don't think there's any easy way for the obfuscation to stay ahead of JS reversal. Thanks for taking a look!
fabrixxm|11 years ago
Now the only way you can steal my sweet, sweet content is by writing it out letter by letter or writing your own noble script that filters out all the junk. Checkmate.
You might say that this solution is unintuitive, massively inefficient and completely unnecessary. Well that's not the true Hacker Spirit now, is it? " ;)
abbeyj|11 years ago
That should be one line with no spaces if gets line wrapped.
nbush|11 years ago
I don't think there's any easy way for the obfuscation to stay ahead of JS reversal. Thanks for taking a look!
awhitty|11 years ago
nbush|11 years ago