Created
May 11, 2019 11:09
-
-
Save ddrpa/7451d182c79477dc3e700a2e3978ca9c to your computer and use it in GitHub Desktop.
remove netease modal while browsing minecraft.net in chinese
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 minecraft.net netease modal remover | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description remove netease modal while browsing minecraft.net in chinese | |
// @author amethystek | |
// @match https://*.minecraft.net/zh-hans/* | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
// Your code here... | |
const wappers = document.querySelectorAll('div.geo-location-wrapper.aem-GridColumn.aem-GridColumn--default--12, div.modal.fade.in.show, div.modal-backdrop.fade.show'); | |
[].forEach.call(wappers, i => { | |
i.parentElement.removeChild(i); | |
}); | |
const body = document.getElementsByTagName('body')[0]; | |
if (body) { | |
body.classList.remove('modal-open'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment