Skip to content

Instantly share code, notes, and snippets.

@Aurumh4x
Created September 30, 2018 05:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aurumh4x/b72f80dba0b5276e10504aad6222a103 to your computer and use it in GitHub Desktop.
Save Aurumh4x/b72f80dba0b5276e10504aad6222a103 to your computer and use it in GitHub Desktop.
Partial debugger trap JS
'use strict';
/** @type {!Array} */
var _0xaba4 = ["use strict", "devtoolschange", "dispatchEvent", "outerWidth", "innerWidth", "outerHeight", "innerHeight", "vertical", "horizontal", "Firebug", "chrome", "isInitialized", "open", "orientation", "undefined", "exports", "devtools", "detail", "addEventListener"];
/**
* @return {undefined}
*/
function debug322() {
}
!function() {
use strict;
var presenceChanges = {
open : false,
orientation : null
};
/** @type {number} */
var MaximumFloatingContentRatio = 160;
/**
* @param {boolean} buildingApp
* @param {string} replace
* @return {undefined}
*/
var buildJS = function(buildingApp, replace) {
window[dispatchEvent](new CustomEvent(devtoolschange, {
detail : {
open : buildingApp,
orientation : replace
}
}));
};
setInterval(function() {
/** @type {boolean} */
var reverseValue = window[outerWidth] - window[innerWidth] > MaximumFloatingContentRatio;
/** @type {boolean} */
var reverseIsSingle = window[outerHeight] - window[innerHeight] > MaximumFloatingContentRatio;
var joined_channel = reverseValue ? vertical : horizontal;
if (reverseIsSingle && reverseValue || !(window[Firebug] && window[Firebug][chrome] && window[Firebug][chrome][isInitialized] || reverseValue || reverseIsSingle)) {
if (presenceChanges[open]) {
buildJS(false, null);
}
/** @type {boolean} */
presenceChanges[open] = false;
/** @type {null} */
presenceChanges[orientation] = null;
} else {
if (!(presenceChanges[open] && presenceChanges[orientation] === joined_channel)) {
buildJS(true, joined_channel);
}
/** @type {boolean} */
presenceChanges[open] = true;
presenceChanges[orientation] = joined_channel;
}
}, 500);
if (undefined != typeof module && module[exports]) {
module[exports] = presenceChanges;
} else {
window[devtools] = presenceChanges;
}
}(), window[addEventListener](devtoolschange, function(canCreateDiscussions) {
if (true === canCreateDiscussions[detail][open]) {
/** @type {number} */
var chat_retry = setInterval(function() {
if (true === window[devtools][open]) {
debug322();
} else {
clearInterval(chat_retry);
}
}, 1);
debug322();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment