zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    js & disabled right click

    
    (() => {
      const log = console.log;
      log(`disabled copy`);
    
      document.body.oncontextmenu = 
      document.body.ondragstart = 
      document.body.onselectstart = 
      document.body.onbeforecopy = function() {
        return false;
      };
    
      document.body.onselect = 
      document.body.oncopy = 
      document.body.onmouseup = function() {
        document.selection.empty();
      };
    })();
    
    
    
            <script type="text/javascript">
                var system = {
                    win: false,
                    mac: false,
                    xll: false
                };
                var p = navigator.platform;
                system.win = p.indexOf("Win") == 0;
                system.mac = p.indexOf("Mac") == 0;
                system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
                if (system.win || system.mac || system.xll) {
                    document.writeln("");
                } else {
                    document.writeln("<script type="text/javascript" language="javascript" src="/js/waptbplay3.js"></script>");
                }
            </script>
            <script type="text/javascript">
                document.body.oncontextmenu = document.body.ondragstart = document.body.onselectstart = document.body.onbeforecopy = function() {
                    return false;
                }
                ;
                document.body.onselect = document.body.oncopy = document.body.onmouseup = function() {
                    document.selection.empty();
                }
                ;
            </script>
    
    
    
      document.body.oncontextmenu = 
      document.body.ondragstart = 
      document.body.onselectstart = 
      document.body.onbeforecopy = function() {
        return false;
      };
    
      document.body.onselect = 
      document.body.oncopy = 
      document.body.onmouseup = function() {
        document.selection.empty();
      };
    
    
    
    
    window.addEventListener('DOMContentLoaded', (event) => {
      console.log('DOM fully loaded and parsed');
    
      document.body.oncontextmenu = 
      document.body.ondragstart = 
      document.body.onselectstart = 
      document.body.onbeforecopy = function() {
        return false;
      };
    
      document.body.onselect = 
      document.body.oncopy = 
      document.body.onmouseup = function() {
        document.selection.empty();
      };
    });
    
    

    demo

    一条狗的使命2


  • 相关阅读:
    Oracle经典教程学习笔记
    SQL server触发器、存储过程操作远程数据库插入数据,解决服务器已存在的问题
    sublime text3编译C/C++系统提示丢失zlib1.dll解决的方法
    上机题目(0基础)- 数据库事务(Java)
    SGU
    iOS
    iOS刷新某个cell时候crash
    nginx+tomcat反复请求
    加密学教程(Cryptography Tuturials)文件夹
    C/C++与Matlab混合编程初探
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/12275284.html
Copyright © 2011-2022 走看看