daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const originalTimout = window.setTimeout;
  2. window.setTimeout = function () {
  3.     if (arguments.callee.caller) {
  4.         console.log("setTimeout", arguments.callee.caller.toString());
  5.     }
  6.     return originalTimout.apply(window, arguments);
  7. }
  8. const originalInterval = window.setInterval;
  9. window.setInterval = function () {
  10.     if (arguments.callee.caller) {
  11.         console.log("setInterval", arguments.callee.caller.toString());
  12.     }
  13.     return originalInterval.apply(window, arguments);
  14. }
  15. const originalRaF = window.requestAnimationFrame;
  16. window.requestAnimationFrame = function (callback) {
  17.     if (arguments.callee.caller) {
  18.         console.log("requestAnimationFrame", arguments.callee.caller.toString());
  19.     }
  20.     return originalRaF(callback);
  21. }
RAW Paste Data
Top