javascript - Intercept all calls to jQuery -


i intercept calls $ , jquery functions. jquery(), $(), $.fn etc etc otherwise need work unimpeded.

how can this?

it appear after.

(function(){     var oldjq = window.jquery;      window.jquery = function(){         window.jquery.anthony.calls++;         return oldjq.apply(null, arguments);     };      window.jquery.anthony = {         calls: 0     };      (var prop in oldjq)         if (oldjq.hasownproperty(prop))             window.jquery[prop] = oldjq[prop];      window.jquery.prototype = oldjq.prototype;     window.$ = window.jquery; })(); 

note not intercept functions called on jquery objects.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -