Map Progress Focus

Allows you to view maprogress maps on a second monitor without it pausing

// ==UserScript==
// @name         Map Progress Focus
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Allows you to view maprogress maps on a second monitor without it pausing
// @author       Alex Cohen
// @match        https://*.maprogress.com/
// @grant        none

// ==/UserScript==


(function() {
    var observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutationRecord) {
            var parent = target.parentNode;
            if(parent.offsetParent != null)
            {
                var button = target.getElementsByClassName('btn')[0];
                button.click();
            }
        });
    });

    var target = document.getElementById('lostFocusDialog');
    observer.observe(target, { attributes : true, attributeFilter : ['style'] });

})();
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元