mirror of
https://github.com/SinTan1729/userscripts.git
synced 2025-02-05 14:12:32 -06:00
new: Added squabbles-hide-username
This commit is contained in:
parent
69636966e2
commit
35a82c52db
1 changed files with 30 additions and 0 deletions
30
squabbles-hide-username.user.js
Normal file
30
squabbles-hide-username.user.js
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// ==UserScript==
|
||||||
|
// @name Squabbles Hide Username
|
||||||
|
// @namespace Squabbles
|
||||||
|
// @license GNU GPLv3
|
||||||
|
// @match https://squabbles.io/*
|
||||||
|
// @grant none
|
||||||
|
// @version 1.0
|
||||||
|
// @author SinTan
|
||||||
|
// @description 18/6/2023, 11:50:07 pm
|
||||||
|
// ==/UserScript==
|
||||||
|
|
||||||
|
// Change this to whatever you want
|
||||||
|
const new_username = 'username'
|
||||||
|
|
||||||
|
const checkElement = async selector => {
|
||||||
|
while (document.querySelector(selector) === null) {
|
||||||
|
await new Promise(resolve => requestAnimationFrame(resolve))
|
||||||
|
}
|
||||||
|
return document.querySelector(selector);
|
||||||
|
};
|
||||||
|
|
||||||
|
checkElement('div.ms-2').then((div) => {
|
||||||
|
const img = div.getElementsByTagName('img')[0];
|
||||||
|
const username = div.getElementsByTagName('span')[0];
|
||||||
|
|
||||||
|
img.src = 'https://i.imgur.com/b08hxPY.png';
|
||||||
|
img.alt = new_username;
|
||||||
|
username.innerHTML = new_username;
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue