Chess Com Actual Focus Mode

Hides Useless Bull Shit from Chess.com UI in 'focus' Mode

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name          Chess Com Actual Focus Mode
// @namespace     http://userstyles.org
// @description   Hides Useless Bull Shit from Chess.com UI in 'focus' Mode
// @author        707433
// @include       *://*chess.com/live
// @include       *://*chess.com/events/*
// @run-at        document-start
// @version       0.3
// ==/UserScript==

function hide_stuff() {
	var sheet = window.document.styleSheets[ 0 ];
	sheet.insertRule( "div.new-game-component { display: none; !important }" , sheet.cssRules.length );
	sheet.insertRule( "span.focus-mode-icon-badge { display: none; !important }" , sheet.cssRules.length );
	sheet.insertRule( "div[data-clock] { visibility: hidden; !important }" , sheet.cssRules.length );
	sheet.insertRule( "img.user-avatar-img { visibility: hidden; !important }" , sheet.cssRules.length );
	sheet.insertRule( "div.cbChatMessage { visibility: hidden; !important }" , sheet.cssRules.length );
	sheet.insertRule( "a.placeholder-ad-link { visibility: hidden; !important }" , sheet.cssRules.length );
	sheet.insertRule( "span.icon-font-chess.minimize.focus-mode-icon-icon { visibility: hidden; !important }" , sheet.cssRules.length );
	sheet.insertRule( "div.toaster-component.toaster-alert { visibility: hidden; !important }" , sheet.cssRules.length );
	/*
	for ( var i = 0; i < 100; ++i ) {
		sheet.insertRule( "div#cbChatPanelBody" + i.toString() + " { display: none; !important }" , sheet.cssRules.length );
	}
	*/
}
window.addEventListener ( "load" , hide_stuff );