WebSite X5Help Center

 
Tom G.
Tom G.
User

Is there a way to disable u ?  en

Auteur : Tom G.
Visité 1647, Followers 1, Partagé 0  

Is there a way to disble <ctrl>u (Vew page source)?

I added to WSX5 project JS routine, which I bought and would like to protect it from copying...

Posté le
16 RéPONSES
Esahc ..
Esahc ..
Moderator

Tom

I am sure that the more learned who frequent these pages will correct me if I am wrong again, but I believe the answer is no, you cannot stop people looking at your source code.

There are many examples to be found by googling "disable ctrl U or "disable right click", but I suspect if the perpetrator is persistent enough they will get your source code displayed. . . 

eg (related but not specifically for wx5)  https://www.bloggerspice.com/2016/01/how-to-Protect-your-Website-by-Disabling-page-source-view.html?m=1

Lire plus
Posté le de Esahc ..
Tom G.
Tom G.
User
Auteur

Thank you, Esahc, for quick answer...

I only have to hope that no-one will steal it...

Lire plus
Posté le de Tom G.
John S.
John S.
User

Hello Tom

There is no way you can prevent your source code to be exposed.

Even if you could block the Ctrl+U then people can download a html page.

Try to download a page from web and then open in Notepad++ - it is the source you see.

It is needed for the browser to show you something meaningful on your monitor :-)

If you have some valuable code you want to not have shown, then you could maybe use some PHP and include's.

This will not be shown in the browser.

Lire plus
Posté le de John S.
Tom G.
Tom G.
User
Auteur

Good answer, John! Will try that.

Lire plus
Posté le de Tom G.
John S.
John S.
User

If it is javascript code you can obfuscate it. But I would not do it unless the code was really valuable.

And as far as I know, there are decompileres so.....

Lire plus
Posté le de John S.
Tom G.
Tom G.
User
Auteur

So, there is no win situation...

Thank you, guys!

Lire plus
Posté le de Tom G.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Tom G.
So, there is no win situation... Thank you, guys!

(It > En) ... ... yes, ...if you want, you can have fun to annoy the less experienced...laughing...
... for block Ctrl+ enables line number 27 :
>> SEE

.

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
Tom G.
Tom G.
User
Auteur
‪ KolAsim ‪ ‪
...you can have fun to annoy the less experienced......

I like it!

(But Ctrl+U will still work)

Lire plus
Posté le de Tom G.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Tom G.
‪... ...  (But Ctrl+U will still work)

... no! wink
 >> HERE  I have enabled the line of code number 27 :

[27]   // uKey = 85;

[27]    uKey = 85;

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
John S.
John S.
User

But you can still download the page and see all the code :


<!DOCTYPE html><html><head>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>

<!-- multi protezione esclusiva by KolAsim - x /HEAD - -->
<style>
#divK {position:absolute; top:0px;z-index:20000;width:100%;height:100%; background: rgba(25, 25, 25, .5);text-align: center;display:none}
</style>

<script>
window.oncontextmenu = function () {return false;}
function chiudi(){
document.getElementById("divK").style.display = "none";
document.getElementById("divK").reset();
return false;
}
function apri(){
document.getElementById("divK").style.display = "block";
document.getElementById("divK").reset();
return false;
}
$(document).ready(function() {
var ctrlDown = false,
ctrlKey = 17,
cmdKey = 91,
vKey = 86,
cKey = 67;
uKey = 85;
$(document).keydown(function(e) {
if (e.keyCode == ctrlKey || e.keyCode == cmdKey || e.keyCode == vKey || e.keyCode == uKey) ctrlDown = true;
}).keyup(function(e) {
if (e.keyCode == ctrlKey || e.keyCode == cmdKey || e.keyCode == vKey || e.keyCode == uKey) ctrlDown = false;
});
$("body").keydown(function(e) {
if ((ctrlDown && e.keyCode == vKey) || (ctrlDown && e.keyCode == cKey) || (ctrlDown && e.keyCode == uKey)) {document.getElementById("divK").style.display = "block";return false;}
});
});
</script>

<script>
document.onkeyup = function(event){
codiceK = (event)?event.keyCode:window.event.keyCode;
if(codiceK==44){

//alert('Tasto disabilitato');

copyK() ;
apri();
}
}
function copyK() {
var inputK = document.createElement('input');
inputK.setAttribute('value', "...!...Copyright © - Copia vietata...!...");
document.body.appendChild(inputK);
inputK.select();
var result = document.execCommand('copy');
document.body.removeChild(inputK)
return result;
}
</script>
<!-- ===========K=============== -->


</head>


<!-- multi protezione esclusiva by KolAsim - x dichiarazione del BODY - -->
<body oncontextmenu="apri()" ondragstart="return false" onselectstart="apri()">
<!-- ===========K=============== -->


<center>

<!-- multi protezione esclusiva by KolAsim - x BODY - -->
<div id="no-copy-paste">
<form>
Campo di input:<br>
<input type="text" name="digita" >
</form>
</div>
<br>
<textarea></textarea>
<br><br>
<img src="http://www.kolasim-zone.it/immagini/1.png" />
<div id="divK" >
<button onclick="chiudi()" autofocus >OK</button>
<div style="position:relative;top:20px;width:200px;height:100px;background-color:yellow;left:50%;margin-left:-100px; font-size:22px">
(!) <br> ...!...Copyright © - Copia vietata...!... </div>
</div>
<!-- ===========K=============== -->


</center></body> </html>

Lire plus
Posté le de John S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
John S.
But you can still download the page and see all the code : ... ... ... 

... ... of course ... laughing... it's in the premise...

.

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
John S.
John S.
User

- if you really want it, you can get it foot-in-mouth

Lire plus
Posté le de John S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... we talked about Ctrl + U ...
... then you can certainly do everything ...

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
John S.
John S.
User

I know KolAsim - but what would be the meaning by that. I just try to tell it has no meaning.

It is like telling a person he can secure his bicycle with a strong chain that locks the front wheel - that will not stop people from stealing the bike. It can easily and quick be collected by a van.

Then you can tell him to lock the bike together with a lamppost.

That will not prevent people with grinders to take the bike.

You can secure your bike by putting it in a vault - and you can secure your code by not putting it on the web.

Important is that people is aware that whatever is put on the net can be copied. You can make it more or less hard - but not impossible.

Lire plus
Posté le de John S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
John S.
... ...  Important is that people is aware that whatever is put on the net can be copied. You can make it more or less hard - but not impossible.

... certainly, I agree, and it has already been said before in the presuppositions ...

.

Lire plus
Posté le de  ‪ KolAsim ‪ ‪
Axel  
Axel  
User

Nothing is sure at 100% wink

Firefox and hop ...opening source code

Lire plus
Posté le de Axel