A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

copyvios.js 1.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Thanks to http://www.quirksmode.org/js/cookies.html for the cookie code.
  2. function get_cookie(name) {
  3. var nameEQ = name + "=";
  4. var ca = document.cookie.split(";");
  5. for (var i = 0; i < ca.length; i++) {
  6. var c = ca[i];
  7. while (c.charAt(0) == " ") {
  8. c = c.substring(1, c.length);
  9. }
  10. if (c.indexOf(nameEQ) == 0) {
  11. return c.substring(nameEQ.length, c.length);
  12. }
  13. }
  14. return null;
  15. }
  16. function set_cookie(name, value, days) {
  17. value = window.btoa(value);
  18. var path = window.location.pathname.split("/", 2)[1];
  19. if (days) {
  20. var date = new Date();
  21. date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
  22. var expires = "; expires=" + date.toGMTString();
  23. }
  24. else {
  25. var expires = "";
  26. }
  27. document.cookie = name + "=" + value + expires + "; path=/" + path;
  28. }
  29. function delete_cookie(name) {
  30. set_cookie(name, "", -1);
  31. }
  32. function copyvio_toggle_details(details) {
  33. link = document.getElementById("cv-result-detail-link");
  34. details = document.getElementById("cv-result-detail");
  35. if (link.innerHTML == "Show details:") {
  36. details.style.display = "block";
  37. link.innerHTML = "Hide details:";
  38. set_cookie("EarwigCVShowDetails", "True", 365);
  39. } else {
  40. details.style.display = "none";
  41. link.innerHTML = "Show details:";
  42. if (get_cookie("EarwigCVShowDetails")) {
  43. delete_cookie("EarwigCVShowDetails");
  44. }
  45. }
  46. }