正文
增加 17 行删除 17 行
89 行未改动9091929394959697989910010110210310410573 行未改动179180181182183184185186187188189190191192193194195196197198199200201202203204205101 行未改动全部展开307308309310311312313314315105 行未改动全部展开42142242342442542642742842949 行未改动47948048148248348448548648736 行未改动52452552652752852953053153275 行未改动60860961061161261361461561627 行未改动64464564664764864965065165229 行未改动68268368468568668768868969069169249 行未改动74274374474574674774874975075175275375475575675775875919 行未改动89 行未改动//==/UserScript==setTimeout(function(){'use strict';let div=null;let interval=setInterval((function(){let color_AC=GM_getValue("color1","#52C41A");let color_WA=GM_getValue("color2","#E74C3C");let color_CE=GM_getValue("color3","#FADB14");let bkcolor=GM_getValue("color4","#EEEEEE");let divs=document.querySelectorAll('.problems');divs.forEach(d=>{if(d.parentElement.children[0].children[0]!=null&&d.parentElement.children[0].children[0].textContent.includes("NOI/NOI+/CTSC"))div=d;});if(div==null){return;}73 行未改动clearInterval(interval);function draw(x,y,c1,c2){x=Math.floor(x);y=Math.floor(y);div.children[(x-1)*12+y-1].children[0].style.color=c1;div.children[(x-1)*12+y-1].children[0].style.backgroundColor=c2;}function clear(x,y){draw(x,y,"#3498db","#fff");}div.innerHTML="";let i=1;for(;i<=390;i++){let t=Math.floor(Math.random()*len);div.insertAdjacentHTML('beforeend',`<span data-v-45a12318 class="problem-id"><a data-v-12b24cc3 data-v-45a12318 href="/problem/${temp[t][0]}"colorscheme="default"class="color-default"title="${temp[t][1]}"data-v-f9624136="">${temp[t][0]}</a></span>`);}let posx=1,posy=1;draw(posx,posy,"#fff","#000");let ingame=0;function game1(Flag){ingame=1;const ROWS=30;const COLS=12;const GAME_SPEED=150;let snake=[{x:5,y:5}];let direction={x:0,y:1};let food={x:10,y:5};101 行未改动全部展开}function game2(){ingame=1;const ROWS=30;const COLS=12;const GAME_SPEED=500;const SHAPES=[[[1,1,1,1]],[[1,1],[1,1]],105 行未改动全部展开function clearLines() {let linesCleared = 0;for (let row = ROWS - 1; row >= 0; row--) {if (board[row].every(cell => cell === 1)) {board.splice(row, 1);linesCleared++;for (let col = 0; col < COLS; col++) {clear(row + 1, col + 1);}49 行未改动initGame();}function game3(){const ROWS=30;const COLS=12;const GAME_SPEED=100;let playerX=ROWS;let playerY=COLS;let bullets=[];36 行未改动function running(){spawnEnemy();setTimeout(running,1000-time);}running();function moveBullets(){for(let i=bullets.length-1;i>=0;i--){bullets[i].x--;if(bullets[i].x<0){75 行未改动initGame();}function game4() {const ROWS = 30;const COLS = 12;const GAME_SPEED = 100;let birdY = 5;let gravity = 0.4;let velocity = 0;27 行未改动moveBird();moveObstacles();spawnObstacle();checkCollisions();drawGame();}function moveBird() {velocity += gravity;birdY += velocity;29 行未改动for (let i = obstacles.length - 1; i >= 0; i--) {const obstacle = obstacles[i];if (obstacle.x === 0 &&(birdY >= obstacle.y && birdY < obstacle.y + obstacle.height)) {gameOver = true;break;}}}49 行未改动break;case 39:e.preventDefault();clear(posx,posy);if(posy<12)posy++;draw(posx,posy,"#fff","#000");break;case 40:e.preventDefault();clear(posx,posy);if(posx<25)posx++;draw(posx,posy,"#fff","#000");break;case 12:e.preventDefault();if(posx==1&&posy==1){game1(1);}19 行未改动89 行未改动9091929394959697989910010110210310410573 行未改动179180181182183184185186187188189190191192193194195196197198199200201202203204205101 行未改动全部展开307308309310311312313314315105 行未改动全部展开42142242342442542642742842949 行未改动47948048148248348448548648736 行未改动52452552652752852953053153275 行未改动60860961061161261361461561627 行未改动64464564664764864965065165229 行未改动68268368468568668768868969069169249 行未改动74274374474574674774874975075175275375475575675775875919 行未改动89 行未改动//==/UserScript==setTimeout(function(){'use strict';let div=null;let interval=setInterval((function(){let color_AC=GM_getValue("color1","#52C41A");let color_WA=GM_getValue("color2","#E74C3C");let color_CE=GM_getValue("color3","#FADB14");let bkcolor=GM_getValue("color4","#EEEEEE");let divs=document.querySelectorAll("#app > div.main-container.lside-nav > main > div > div.sidebar-container.reverse > div.main > div:nth-child(3) > div");divs.forEach(d=>{if(d.children[0]!=null&&d.children[0].children[0]!=null&&d.children[0].children[0].textContent.includes("NOI/NOI+/CTS"))div=d.children[1];});if(div==null){return;}73 行未改动clearInterval(interval);function draw(x,y,c1,c2){x=Math.floor(x);y=Math.floor(y);div.children[(x-1)*13+y-1].children[0].style.color=c1;div.children[(x-1)*13+y-1].children[0].style.backgroundColor=c2;}function clear(x,y){draw(x,y,"#3498db","#fff");}div.innerHTML="";let i=1;for(;i<=390;i++){let t=Math.floor(Math.random()*len);div.insertAdjacentHTML('beforeend',`<span data-v-2e684a78 class="problem-id"><a data-v-12b24cc3 data-v-45a12318 href="/problem/${temp[t][0]}"colorscheme="default"class="color-default"title="${temp[t][1]}"data-v-f9624136="">${temp[t][0]}</a></span>`);}let posx=1,posy=1;draw(posx,posy,"#fff","#000");let ingame=0;function game1(Flag){ingame=1;const ROWS=30;const COLS=13;const GAME_SPEED=150;let snake=[{x:5,y:5}];let direction={x:0,y:1};let food={x:10,y:5};101 行未改动全部展开}function game2(){ingame=1;const ROWS=30;const COLS=13;const GAME_SPEED=500;const SHAPES=[[[1,1,1,1]],[[1,1],[1,1]],105 行未改动全部展开function clearLines() {let linesCleared = 0;for (let row = ROWS - 1; row >= 0; row--) {if (board[row].every(cell => cell === 1)) {board.splice(row, 1);linesCleared++;for (let col = 0; col < COLS; col++) {clear(row + 1, col + 1);}49 行未改动initGame();}function game3(){const ROWS=30;const COLS=13;const GAME_SPEED=100;let playerX=ROWS;let playerY=COLS;let bullets=[];36 行未改动function running(){spawnEnemy();setTimeout(running,1000-time);}running();function moveBullets(){for(let i=bullets.length-1;i>=0;i--){bullets[i].x--;if(bullets[i].x<0){75 行未改动initGame();}function game4() {const ROWS = 30;const COLS = 13;const GAME_SPEED = 100;let birdY = 5;let gravity = 0.4;let velocity = 0;27 行未改动moveBird();moveObstacles();spawnObstacle();checkCollisions();drawGame();}function moveBird() {velocity += gravity;birdY += velocity;29 行未改动for (let i = obstacles.length - 1; i >= 0; i--) {const obstacle = obstacles[i];if (obstacle.x === 0 &&(birdY >= obstacle.y && birdY < obstacle.y + obstacle.height)) {gameOver = true;break;}}}49 行未改动break;case 39:e.preventDefault();clear(posx,posy);if(posy<13)posy++;draw(posx,posy,"#fff","#000");break;case 40:e.preventDefault();clear(posx,posy);if(posx<25)posx++;draw(posx,posy,"#fff","#000");break;case 13:e.preventDefault();if(posx==1&&posy==1){game1(1);}19 行未改动