WebSite X5Help Center

 
Tom G.
Tom G.
User

Is there a way to disable u ?  en

Autor: Tom G.
Visitado 1374, Seguidores 1, Compartilhado 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...

Publicado em
16 RESPOSTAS
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

Ler mais
Publicado em de Esahc ..
Tom G.
Tom G.
User
Autor

Thank you, Esahc, for quick answer...

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

Ler mais
Publicado em 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.

Ler mais
Publicado em de John S.
Tom G.
Tom G.
User
Autor

Good answer, John! Will try that.

Ler mais
Publicado em 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.....

Ler mais
Publicado em de John S.
Tom G.
Tom G.
User
Autor

So, there is no win situation...

Thank you, guys!

Ler mais
Publicado em de Tom G.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuário do mês PT
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

.

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪
Tom G.
Tom G.
User
Autor
‪ KolAsim ‪ ‪
...you can have fun to annoy the less experienced......

I like it!

(But Ctrl+U will still work)

Ler mais
Publicado em de Tom G.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuário do mês PT
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;

Ler mais
Publicado em 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>

Ler mais
Publicado em de John S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuário do mês PT
John S.
But you can still download the page and see all the code : ... ... ... 

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

.

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪
John S.
John S.
User

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

Ler mais
Publicado em de John S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuário do mês PT

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

Ler mais
Publicado em 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.

Ler mais
Publicado em de John S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuário do mês PT
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 ...

.

Ler mais
Publicado em de  ‪ KolAsim ‪ ‪
Axel  
Axel  
User

Nothing is sure at 100% wink

Firefox and hop ...opening source code

Ler mais
Publicado em de Axel