Advertisement
ASP_Volume2 Security #39559

Fool Proof No View Source Script

Makes it kind of hard to get the source from a page. This code has been on javascripts.com for a while and I won code of the month ince with it, but I also recived over 11500 mails becuase of it so I hope that wont be needed here.

AI

AI-sammanfattning: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Källkod
original-source
Add this line to/ instead of your body tag:
(In a standalone HTML file before your protected page)
<body bgcolor=black onload="window.open('fullproof.htm','','halfscreen,scrollbars')">

ADD this script at the bottom of your page, just before your </body> tag.
(in the page you want to protect)
<script language=JavaScript>
 <!--
var message="ENTER YOUR CUSTOM MESSAGE HERE";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> 
</script>
Originalkommentarer (3)
Återställd från Wayback Machine