Upland Improver

Enables clicked outside dialogs to close them

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

Advertisement:

// ==UserScript==
// @name         Upland Improver
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Enables clicked outside dialogs to close them
// @author       nljuggler
// @match        https://play.upland.me/*
// @icon         https://www.google.com/s2/favicons?domain=upland.me
// @grant        none
// @require      https://code.jquery.com/jquery-2.2.4.js
// ==/UserScript==

$(function(){
    // Property dialog
    $(document).on("click", ".sc-cBOTKl.kfrDeA", function() {
        console.log("clicked");
        $(".show .close-section button").click();
    });

    // Messages, Treasures or Rrofile dialog
    $(document).on("click", ".sc-iwsKbI.gHlBcE", function() {
        console.log("clicked messages, treasures or profile");
        if ($(".card .card .with-left-side-btn button")[1] !== undefined){
            $(".card .card .with-left-side-btn button")[1].click();
        }
        else {
            $(".card .card .card .sc-bdVaJa.jvDJOL button")[0].click();
        }
    });

    $(document).on("click", ".sc-dnqmqq.hbnEBx.card,.sc-dnqmqq.hbnEBx.large_modal,.sc-ifAKCX.fnJSSS", function(e) {
        e.stopPropagation();
    });

    $(document).on("click", ".sc-iwsKbI.gHlBcE", function(e) {
        e.preventDefault();
        e.stopPropagation();
        console.log("clicked");
        $(".card .card .card button")[0].click();
    });

    //sc-dnqmqq hbnEBx card
});