Debug events tagCo

Debug TC events

目前為 2018-11-16 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Debug events tagCo
  3. // @namespace http://leroymerlin.fr/
  4. // @version 0.4
  5. // @description Debug TC events
  6. // @author BAMF Consulting
  7. // @match *://*/*
  8. // @grant none
  9. // @noframes
  10. // ==/UserScript==
  11.  
  12. function overrideTcEvents(){
  13. if(typeof window.tc_events_global !='undefined'){
  14. window.old_tc_events_global = window.tc_events_global;
  15. window.tc_events_global = function(){
  16. console.log("%c------ TC EVENT ------","color:#FF4444;background-color:#000000;");
  17. console.log(arguments);
  18. window.old_tc_events_global.apply(this,arguments);
  19. }
  20. console.log("%c------ OVERRIDE TC EVENT ------","color:#44FF44;background-color:#000000;");
  21. window.clearInterval(window.orinterval);
  22. }
  23. }
  24.  
  25. window.orinterval = window.setInterval(overrideTcEvents,100);
  26. window.setTimeout(function(){window.clearInterval(window.orinterval);},5000);