no avatars

Hides your score and guesses while playing the game and only shows it at the end

当前为 2024-06-14 提交的版本,查看 最新版本

// ==UserScript==
// @name         no avatars
// @description  Hides your score and guesses while playing the game and only shows it at the end
// @version      1.1
// @author       miraclewhips
// @match        *://*.geoguessr.com/*
// @icon         https://www.google.com/s2/favicons?domain=geoguessr.com
// @grant        GM_addStyle
// @copyright    2024, miraclewhips (https://github.com/miraclewhips)
// @license      MIT
// @namespace https://gf.qytechs.cn/users/1317858
// ==/UserScript==

/* ############################################################################### */
/* ##### DON'T MODIFY ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING ##### */
/* ############################################################################### */

GM_addStyle(`
    body.mwhs-should-hide-scores div[class^="animated-player-item_avatarContainer__"],
    body.mwhs-should-hide-scores div[class^="health-bar_avatarContainer__"],
    body.mwhs-should-hide-scores div[class^="health-bar_playerContainer__"] {
display: none !important;
}
`);

const init = () => {
const observer = new MutationObserver(() => {
const gameRoot = document.querySelector(`div[class^="in-game_root__"]`);
const finalResults = document.querySelector(`div[class^="result-overlay_overlay__"]`);
document.body.classList.toggle(`mwhs-should-hide-scores`, gameRoot && !finalResults);

});

observer.observe(document.body, { subtree: true, childList: true });
}

init();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址