Skip to content

Instantly share code, notes, and snippets.

@ddrpa
Created May 11, 2019 11:09
Show Gist options
  • Save ddrpa/7451d182c79477dc3e700a2e3978ca9c to your computer and use it in GitHub Desktop.
Save ddrpa/7451d182c79477dc3e700a2e3978ca9c to your computer and use it in GitHub Desktop.
remove netease modal while browsing minecraft.net in chinese
// ==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