src/override.js
// log_cb = callback if logging is enabled, send alerts in that logging block
log_cb = callback if logging is enabled, send alerts in that logging block
log_cb = callback if logging is enabled send alerts in that logging block
function replaceProperty(label, block, logCallback) {
    var functions = overrides[label];
    for (var i = 0; i < functions.length; i++) {
      var parent = functions[i].parent;
      var propertyStr = functions[i].propertyStr;
      if (logCallback || block) {
        (function () {
          var proxied = parent[propertyStr];
          var backToNative = false;
          parent.__defineGetter__(propertyStr, function () {
            if (backToNative === true) {
              return null;
            }
            var stackTrace = getStackTrace();
            if (String(stackTrace) === 'native') {
              backToNative = true;
              return null;
            }
            if (logCallback) {
              logCallback(propertyStr, stackTrace);
              console.debug('Property ' + propertyStr + ' caught being accessed. ' + stackTrace + ' tag ' + document.currentScript);
            }
            if (block) {
              if (isFunction(proxied)) {
                return function () {
                };
              } else {
                return null;
              }
            }
            return proxied;
          });
        })();
      }
    }
  }
function replaceProperty ( label , block , logCallback ) { var functions = overrides [ label ] ; for ( var i = 0 ; i < functions . length ; i ++ ) { var parent = functions [ i ] . parent ; var propertyStr = functions [ i ] . propertyStr ; if ( logCallback || block ) { ( function ( ) { var proxied = parent [ propertyStr ] ; var backToNative = false ; parent . __defineGetter__ ( propertyStr , function ( ) { if ( backToNative === true ) { return null ; } var stackTrace = getStackTrace ( ) ; if ( String ( stackTrace ) === 'native' ) { backToNative = true ; return null ; } if ( logCallback ) { logCallback ( propertyStr , stackTrace ) ; console . debug ( 'Property ' + propertyStr + ' caught being accessed. ' + stackTrace + ' tag ' + document . currentScript ) ; } if ( block ) { if ( isFunction ( proxied ) ) { return function ( ) { } ; } else { return null ; } } return proxied ; } ) ; } ) ( ) ; } } }
log_cb = callback if logging is enabled, send alerts in that logging block
log_cb = callback if logging is enabled send alerts in that logging block