GMM MMPage show marketline

顯示MMPage的marketline id

Version vom 15.05.2019. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         GMM MMPage show marketline
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  顯示MMPage的marketline id
// @author       You
// @include       *://localhost:8899/MarketManagement/*
// @include       *://gmmweb.avabet.com/MarketManagement/*
// @include       *://adcontrol.sb.com/MarketManagement/*
// @grant        none
// @run-at        document-end
// ==/UserScript==

(function() {
    $('.search-panel >ul').prepend('<li><input type="button" id="ShowAllMarketLine" value="ML ID" class="btn_release" ></li>');

    $( "#ShowAllMarketLine" ).click(function() {

        var enable = $(".showMlId").length == 0;
        
        //將marketline id加到html中
        if(enable === "True"){
            var pauseDiv = $(".pause").filter(function() {
                return $(this).attr("actionsrc") === "MarketLineStatusControl.js" ;
            });
            pauseDiv.each(function(i, obj) {
                $(this).parent().prepend("<span class='showMlId' style = 'background:#c9e1f6'>"+$(obj).attr("id").match(/\d+/)[0]+"</span>");
            });
        }else{
            $(".showMlId").remove();
        }

    });
})();