UTOL helpers

enhance UTOL

目前为 2024-10-03 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name UTOL helpers
  3. // @namespace https://fuwa.dev/
  4. // @version 0.1
  5. // @description enhance UTOL
  6. // @author fuwa
  7. // @match https://itc-lms.ecc.u-tokyo.ac.jp/*
  8. // @match https://utol.ecc.u-tokyo.ac.jp/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=u-tokyo.ac.jp
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. window.onbeforeunload = undefined;
  17.  
  18. if (location.pathname == '/robots.txt') location.pathname = '/';
  19.  
  20. // vimium hint
  21. document.querySelectorAll('div.divTableCellHeader.timetable-course-top-btn').forEach(a=>a.setAttribute('role', 'button'));
  22. document.querySelectorAll('label.link-txt').forEach(a=>a.setAttribute('role', 'button'));
  23.  
  24.  
  25. const stylenode = document.createElement("style");
  26. stylenode.innerHTML = `
  27. .sidemenu_hide .sidemenu_link.sidemenu_link_lms { display: none !important; }
  28. `;
  29. document.querySelector("head").appendChild(stylenode);
  30.  
  31.  
  32. })();