sspnote javaer

刷题网页调整

当前为 2024-08-14 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name sspnote javaer
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024年8月14日22点34分
  5. // @description 刷题网页调整
  6. // @author onionycs
  7. // @license MIT
  8. // @match https://www.sspnote.com/oj/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=sspnote.com
  10. // @grant none
  11. // @require http://code.jquery.com/jquery-3.x-git.min.js
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. /* globals jQuery, $, waitForKeyElements */
  18. console.log('sspnote javaer start');
  19. setTimeout(function() {
  20. console.log('延迟1000ms...');
  21. adjust();
  22. }, 500);
  23.  
  24.  
  25. function adjust() {
  26.  
  27. console.log("start");
  28. $('div[role="combobox"]')[0].click();
  29. var id=$('div[role="combobox"]')[0].id+'-option-2';
  30. setTimeout(function() {
  31. // 这里写你希望延迟执行的代码
  32. console.log('执行了延迟300ms的代码');
  33. $('#'+id)[0].click();
  34. }, 500);
  35. document.getElementsByClassName("left-content")[0].style.width = "40%";
  36. document.getElementsByClassName("right-content")[0].style.width = "60%";
  37. console.log("end");
  38. $('img[alt="image"]')[0].style.maxWidth="30%";
  39.  
  40. }
  41.  
  42. var fbutton= $('#semiTabdetail');
  43. $('<button class="open-answer">打开题解</button>').insertBefore(fbutton);
  44.  
  45. $('.open-answer').click(function() {
  46. $('#semiTabanswer')[0].click();
  47. $('.answer-note').find('a')[3].click();
  48. fbutton[0].click();
  49. });
  50. })();

QingJ © 2025

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