songl.io multiplayer player name style patch

A script to prevent funny people from spamming with their player player names.

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        songl.io multiplayer player name style patch
// @namespace   Freebee1693
// @match       https://songl.io/*
// @grant       none
// @version     1.0.0-GitHub
// @author      Freebee1693
// @license     Apache License 2.0
// @description A script to prevent funny people from spamming with their player player names.
// ==/UserScript==

setInterval(() => {
  existingStylePatch = document.querySelector("#songlio_style_patch");
  stylePatch = existingStylePatch ?? document.createElement('style');
  stylePatch.innerHTML = `
  .solo-game__rankings__item__name {
      max-width: 15rem;
  }
  `;
  stylePatch.id = "songlio_style_patch";
  if( !existingStylePatch ) document.head.appendChild(stylePatch);
}, 5);