Moodle SecureDisable

disable secure events

目前为 2021-01-25 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Moodle SecureDisable
  3. // @version 0.3
  4. // @description disable secure events
  5. // @author vitaliusik
  6. // @match *://*/*
  7. // @grant none
  8. // @namespace https://greasyfork.org/users/590687
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. if(!document.body.classList.contains("quiz-secure-window")) return;
  14. window.addEventListener("mousedown", function (event) { event.stopPropagation();}, true);
  15. window.addEventListener("dragstart", function (event) { event.stopPropagation(); }, true);
  16. window.addEventListener("contextmenu", function (event) { event.stopPropagation(); }, true);
  17. window.addEventListener('copy', function (event) { event.stopPropagation(); }, true);
  18. window.addEventListener('beforeprint', function (event) { event.stopPropagation(); }, true);
  19. })();