Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Stirven13/67cc02b2c96486bd86ed54d891732f67 to your computer and use it in GitHub Desktop.
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
// ==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