Last active
May 25, 2024 03:55
-
-
Save Stirven13/67cc02b2c96486bd86ed54d891732f67 to your computer and use it in GitHub Desktop.
Script for TamperMonkey which remove Rightbar on https://genshin-impact-map.appsample.com/ #RemoveRightbar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Rightbar GenshinImpactMap | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-05-25 | |
// @description Just remove a MapLayout_Rightbar | |
// @author NepNep | |
// @match https://genshin-impact-map.appsample.com/* | |
// @icon https://game-cdn.appsample.com/gim/comments/o508/69635/2404281519-mr7ZWQ93.jpeg | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function checkAndHideElement() { | |
var element = document.getElementsByClassName("MapLayout_Rightbar ")[0]; | |
if (element) { | |
element.style.transition = "opacity 1s"; | |
element.style.opacity = "0"; | |
return true; | |
} | |
return false; | |
} | |
window.addEventListener('load', function() { | |
var intervalId = setInterval(function() { | |
if (checkAndHideElement()) { | |
clearInterval(intervalId); | |
} | |
}, 1000); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment