allow_copy_and_selection

5/25/2021, 1:16:51 PM

  1. // ==UserScript==
  2. // @name allow_copy_and_selection
  3. // @namespace Violentmonkey Scripts
  4. // @include *
  5. // @grant none
  6. // @version 0.0.1
  7. // @author liudonghua123
  8. // @license MIT
  9. // @description 5/25/2021, 1:16:51 PM
  10. // ==/UserScript==
  11.  
  12. (function allow_copy_and_selection() {
  13. // document.body.oncopy=document.body.onselectstart=document.body.oncontextmenu=() => true;
  14. [
  15. 'oncopy',
  16. 'onselectstart',
  17. 'oncontextmenu',
  18. ].forEach(event => {
  19. console.info(`config document.body.${event} = () => true`)
  20. document.body[event] = () => true;
  21. })
  22. })();