// ==UserScript== // @license MIT // @name Auto Brilliant Move! // @namespace http://tampermonkey.net/ // @version 0.2 Beta // @description Makes brilliant move in chess.com/analysis brilliant whenever you want // @author mrozio // @match https://www.chess.com/* // @icon https://www.chess.com/bundles/web/favicons/favicon-32x32.c2a8280d.png // @grant none // @downloadURL none // ==/UserScript== document.querySelectorAll('.board-tab-item-v5-component.board-tab-item-v5-active.sidebar-tab.undefined')[0].addEventListener("click", function(){ document.getElementById('analysis-vml-scroll-container').innerHTML+=`
` }) window.addEventListener('keydown', keydown); function keydown(event) { if (event.key == 'b') { makeItBrilliant(); } } function makeItBrilliant(){ document.querySelectorAll('.effect')[0].innerHTML=`` document.querySelectorAll('.highlight')[1].style=`background-color: rgb(27, 172, 166); opacity: 0.5;`; document.querySelectorAll('.highlight')[0].style=`background-color: rgb(27, 172, 166); opacity: 0.5;`; document.querySelectorAll('.move-san-highlight')[0].classList.add('analysis-brilliant') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.add('analysis-brilliant') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-good') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-best') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-forced') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-blunder') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-mistake') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-excellent') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-inaccuracy') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-greatFind') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-missedWin') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored')[0].classList.remove('analysis-best') document.querySelectorAll('div.move-feedback-row-description.move-feedback-row-colored.analysis-brilliant')[0].innerText="is brilliant"; document.querySelectorAll('.move-feedback-row-icon')[0].innerHTML=`` }