Remove Annoying Copyright Claim On Copy

remove copyright protection on zhihu.com, jianshu.com, douban.com

目前为 2019-11-01 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Remove Annoying Copyright Claim On Copy
  3. // @namespace https://github.com/harryhare
  4. // @version 0.3
  5. // @description remove copyright protection on zhihu.com, jianshu.com, douban.com
  6. // @author harryhare
  7. // @license GPL 3.0
  8. // @icon https://raw.githubusercontent.com/harryhare/userscript/master/index.png
  9. // @match https://*.zhihu.com/**
  10. // @match https://*.jianshu.com/**
  11. // @match https://*.douban.com/**
  12. // @include https://*.zhihu.com/**
  13. // @include https://*.jianshu.com/**
  14. // @include https://*.douban.com/**
  15. // @grant none
  16. // ==/UserScript==
  17.  
  18. function rewrite_html(e){
  19. let inner=e.innerHTML;
  20. e.innerHTML=inner;
  21. }
  22.  
  23. function do_douban(){
  24. var targets=document.querySelectorAll('div#link-report .note,div.review-content.clearfix');
  25. for(let i=0;i<targets.length;i++){
  26. targets[i].oncopy=(e)=>{e.stopPropagation();};
  27. }
  28. }
  29.  
  30. (function() {
  31. 'use strict';
  32. if(location.href.match("https://[a-z]+.douban.com")!=null){
  33. do_douban();
  34. }else{
  35. document.body.oncopy=(e)=>{e.stopPropagation();};
  36. //document.documentElement.addEventListener('copy',function(e){e.stopImmediatePropagation()});
  37. //document.documentElement.addEventListener('copy',function(e){e.stopPropagation()});
  38. //document.body.addEventListener('copy',function(e){e.stopPropagation()});
  39. //document.body.oncopy=function(e){e.stopPropagation()};
  40. }
  41.  
  42.  
  43. /*
  44. var targets=document.querySelectorAll('span.RichText.CopyrightRichText-richText');
  45. for(let i=0;i<targets.length;i++){
  46. //rewrite_html(targets[i].parentElement);
  47. targets[i].oncopy=(e)=>{e.stopPropagation();};
  48. targets[i].parentElement.oncopy=(e)=>{e.stopPropagation();};
  49. targets[i].parentElement.parentElement.oncopy=(e)=>{e.stopPropagation();};
  50. }*/
  51. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址