Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function copyToClipboard() {
- / Create a "hidden" input
- var aux = document.createElement("input");
- // Assign it the value of the specified element
- aux.setAttribute("value", "Você não pode mais dar printscreen. Isto faz
- parte da nova medida de segurança do sistema.");
- // Append it to the body
- document.body.appendChild(aux);
- // Highlight its content
- aux.select();
- // Copy the highlighted text
- document.execCommand("copy");
- // Remove it from the body
- document.body.removeChild(aux);
- alert("Print screen desabilitado.");
- }
- $(window).keyup(function(e){
- if(e.keyCode == 44){
- copyToClipboard();
- }
- });
- $(window).focus(function() {
- $("body").show();
- }).blur(function() {
- $("body").hide();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement