CodeHS Cheat

Funny

  1. // ==UserScript==
  2. // @name CodeHS Cheat
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-05-29 v6 skibidi version
  5. // @description Funny
  6. // @author Anghel sefu la bani
  7. // @match https://codehs.com/student/*/assignment/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=codehs.com
  9. // @grant GM_setClipboard
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14.  
  15. function cleanHTMLString(htmlString) {
  16. // Remove comments
  17. htmlString = htmlString.replace(/<!--[\s\S]*?-->/g, '');
  18.  
  19. // Remove <noscript> tags and their content
  20. htmlString = htmlString.replace(/<noscript[\s\S]*?<\/noscript>/gi, '');
  21.  
  22. // Remove <script> tags inside the <head> section
  23. htmlString = htmlString.replace(/(<head[\s\S]*?>[\s\S]*?)<script[\s\S]*?<\/script>/gi, (match, p1) => {
  24. // Remove <script> tags from the <head> section content
  25. return p1.replace(/<script[\s\S]*?<\/script>/gi, '');
  26. });
  27.  
  28. // Clean com
  29.  
  30. return `<!DOCTYPE html>\n` + htmlString;
  31. }
  32. 'use strict';
  33. let htmlc;
  34.  
  35. console.log("FUNNY SKIBIDI LOADED");
  36.  
  37. const textField = document.querySelector('.ace_text');
  38. const ace_content = document.querySelector('.ace_content');
  39. const text_area = document.querySelector('.ace_text-input');
  40. const xbutton = document.querySelector('.start-ex-button');
  41. const iframe = document.querySelector('.sample-sols');
  42.  
  43. window.addEventListener('load', function () {
  44.  
  45. const secondHTML = iframe.contentDocument || iframe.contentWindow.document;
  46.  
  47. console.log(secondHTML.children[0]);
  48. const HTMLCode = secondHTML.children[0].outerHTML;
  49. htmlc = cleanHTMLString(HTMLCode);
  50. console.log(htmlc);
  51. GM_setClipboard (htmlc);
  52. console.log("CODE COPIED");
  53. xbutton.click();
  54.  
  55. setTimeout(part2, 500);
  56. });
  57.  
  58. function part2() {
  59. text_area.focus();
  60. }
  61. })();

QingJ © 2025

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