// ==UserScript== // @name 力扣自动全屏 // @namespace Chalkim // @version 0.1 // @description 自动为每一个题目展开成全屏模式 // @author Chalkim // @match https://leetcode-cn.com/problems/* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; var i = 0; var full = null; var interval = setInterval(function() { if(i > 5 * 30) { clearInterval(interval) console.log("载不出来就算了吧憋肝了_(:з」∠)_"); } if(full = document.querySelector("path[d='M6 15H4v5h5v-2H6v-3zM4 9h2V6h3V4H4v5zm14 9h-3v2h5v-5h-2v3zM15 4v2h3v3h2V4h-5z']")){ full.parentNode.parentNode.click(); clearInterval(interval); } ++i; }, 200); })();