Greasy Fork

Tribalwars Premium Exchange Flasher

try to take over the world!

当前为 2019-05-16 提交的版本,查看 最新版本

// ==UserScript==
// @name         Tribalwars Premium Exchange Flasher
// @namespace    minecraft.net( ͡° ͜ʖ ͡°)
// @version      0.1
// @description  try to take over the world!
// @author       Mathias
// @match        https://*.tribalwars.net/game.php?village=*&screen=market&mode=exchange*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    $("body").after("<div class=\"notice\"></div>");
    $(".notice").hide().css("position", "fixed").css("top", "0").css("left", "0").css("width", "100%").css("height", "100%").css("background-color", "#fff");

    function splash() {
     $(".notice").show().animate({opacity:0.5}, 300).fadeOut(300).css({"opacity": 1});
    }

    $("body").on('DOMSubtreeModified', "#premium_exchange_stock_wood", () => {
        splash();
    });

    $("#premium_exchange_stock_stone").change(() => {
        splash();
    });

    $("#premium_exchange_stock_iron").change(() => {
        splash();
    });
})();