Enlighten Nexus code decoded and unpacked
See here: http://www.codeproject.com/Articles/63366/Decoder-for-Dean-Edwards-JavaScript-Packer http://nexus.ensighten.com/rac/Bootstrap.js
by junto
JavaScript
window[ensightenOptions.ns] = function (options) {
var _private = {}, _public = {};
_private.version = '2.0.3';
_private.nexus = options.nexus || 'nexus.ensighten.com';
_private.options = {
interval: options.interval || 100,
erLoc: options.errorLocation || _private.nexus + '/error/e.gif',
scLoc: options.serverComponentLocation || _private.nexus + '/' + options.client + '/serverComponent.php',
sjPath: options.staticJavscriptPath || _private.nexus + '/' + options.client + '/code/',
alLoc: options.alertLocation || _private.nexus + '/alerts/a.gif',
client: options.client,
clientId: options.clientId
};
_private.ruleList = [];
_private.exceptionList = [];
_private.ensightenVariables = {};
_private.test = function (rule) {
if (rule.executionData.hasRun) {
return
}
for (var i = 0; i < rule.dependencies.length; i++) {
if (rule.dependencies[i]() === false) {
return
}
}
rule.execute()
};
_public.currentRuleId = -1;
_public.reportedErrors = [];
_public.reportedAlerts = [];
_public.getServerComponent = function (addData) {
_public.insertScript(window.location.protocol + '//' + _private.options.scLoc, false, (addData || true))
};
_public.setVariable = function (name, value) {
_private.ensightenVariables[name] = value
};
_public.getVariable = function (name) {
if (name in _private.ensightenVariables) {
return _private.ensightenVariables[name]
} else {
return null
}
};
_public.testAll = function () {
for (var i = 0; i < _private.ruleList.length; i++) {
_private.test(_private.ruleList[i])
}
};
_public.executionState = {
DOMParsed: false,
DOMLoaded: false,
conditionalRules: false
};
_public.Rule = function (params) {
...