Debug events tagCo

Debug TC events

目前为 2018-11-16 提交的版本,查看 最新版本

// ==UserScript==
// @name         Debug events tagCo
// @namespace    http://leroymerlin.fr/
// @version      0.4
// @description  Debug TC events
// @author       BAMF Consulting
// @match        *://*/*
// @grant        none
// @noframes
// ==/UserScript==

function overrideTcEvents(){
    if(typeof window.tc_events_global !='undefined'){
        window.old_tc_events_global = window.tc_events_global;
        window.tc_events_global = function(){
            console.log("%c------ TC EVENT ------","color:#FF4444;background-color:#000000;");
            console.log(arguments);
            window.old_tc_events_global.apply(this,arguments);
        }
        console.log("%c------ OVERRIDE TC EVENT ------","color:#44FF44;background-color:#000000;");
        window.clearInterval(window.orinterval);
    }
}

window.orinterval = window.setInterval(overrideTcEvents,100);
window.setTimeout(function(){window.clearInterval(window.orinterval);},5000);