Skip to content

Instantly share code, notes, and snippets.

@schoerg
Forked from Bluscream/client.js
Created November 19, 2022 23:02
Show Gist options
  • Save schoerg/d9ae16f4a403b6723be6710add509c8e to your computer and use it in GitHub Desktop.
Save schoerg/d9ae16f4a403b6723be6710add509c8e to your computer and use it in GitHub Desktop.
/** @type {Array} */
var _gaq = [];
(function() {
/**
* @param {Element} el
* @param {string} selector
* @return {?}
*/
function fn(el, selector) {
return new self.B(el.querySelectorAll(selector));
}
/**
* @param {Element} msg
* @param {Element} error
* @return {undefined}
*/
function fail(msg, error) {
/** @type {string} */
msg.innerHTML = "";
msg.appendChild(error);
}
/**
* @return {undefined}
*/
function create() {
var results = self.h("head");
var b;
if (b = self.u(object.headExtra.i({
ver : mwsaVer
})).firstChild) {
/** @type {Array} */
var j = [b];
for (;b = b.nextSibling;) {
j.push(b);
}
/** @type {Array} */
b = j;
} else {
/** @type {Array} */
b = [];
}
/** @type {number} */
j = 0;
for (;j < b.length;j++) {
results.appendChild(b[j]);
}
}
/**
* @param {string} value
* @return {?}
*/
function compile(value) {
var result = fn(value, "input");
var r = fn(value, "textarea");
value = fn(value, "select");
var data = {};
result.e(function(a) {
if (a.name) {
if ("radio" == a.type) {
if (a.checked) {
data[a.name] = a.value;
}
} else {
if ("checkbox" == a.type) {
if (a.checked) {
data[a.name] = a.value || "on";
}
} else {
data[a.name] = a.value;
}
}
}
});
r.e(function(field) {
if (field.name) {
data[field.name] = field.value;
}
});
value.e(function(field) {
if (field.name) {
data[field.name] = field.value;
}
});
return data;
}
/**
* @param {Object} options
* @return {undefined}
*/
function request(options) {
/** @type {function (): undefined} */
var plus = options.error || null;
/** @type {function (Object): undefined} */
var MAP = options.j || null;
/**
* @return {undefined}
*/
options.error = function() {
if (plus) {
plus({});
}
};
/**
* @param {Object} t
* @return {undefined}
*/
options.j = function(t) {
if (t.success) {
MAP(t);
} else {
plus(t);
}
};
self.D(options);
}
/**
* @return {undefined}
*/
function proxyRequest() {
if (settings.host) {
self.e(settings.players, function(elem) {
if (elem.host) {
ret = elem.steamID;
}
});
}
}
/**
* @return {undefined}
*/
function run() {
request({
url : "/a/state.json?csrf=" + csrf,
timeout : 5,
/**
* @param {Object} a
* @return {undefined}
*/
j : function(a) {
if (a.success) {
/** @type {Object} */
settings = a;
proxyRequest();
out.o("update");
} else {
$.add({
duration : 5,
title : "Error",
message : "Unable to refresh player information.",
type : "error"
});
}
},
/**
* @return {undefined}
*/
error : function() {
$.add({
duration : 5,
title : "Error",
message : "Unable to refresh player information.",
type : "error"
});
}
});
}
/**
* @param {?} data
* @return {undefined}
*/
function _set(data) {
obj.setItem("abusereporter_info", JSON.stringify(data));
value = data;
/** @type {boolean} */
type = "proof" in data && 96 == data.proof.length;
c.o("update");
trigger();
}
/**
* @return {undefined}
*/
function handler() {
var serialized = obj.getItem("abusereporter_info");
if (serialized) {
done();
/** @type {*} */
value = serialized = JSON.parse(serialized);
/** @type {boolean} */
type = "proof" in serialized && 96 == serialized.proof.length;
}
if (obj.getItem("abuse_seen")) {
done();
}
setInterval(trigger, 3E5);
trigger();
}
/**
* @return {?}
*/
function callback() {
return "id=" + value.steamID + "&t=" + value.time + "&proof=" + value.proof;
}
/**
* @return {undefined}
*/
function trigger() {
if (type) {
self.p({
url : "https://mw3sa.xifon.eu/bans/abuse/sync?" + callback() + "&callback=?",
/**
* @param {Object} a
* @return {undefined}
*/
j : function(a) {
if (a.success) {
/** @type {Object} */
waitMsg = a;
c.o("update");
} else {
if ("bad_auth" in a) {
_set({});
}
}
}
});
} else {
c.o("update");
}
}
/**
* @param {string} type
* @return {undefined}
*/
function ondata(type) {
self.p({
url : "https://mw3sa.xifon.eu/bans/abuse/report?" + callback() + "&report=" + type + "&callback=?",
/**
* @param {Object} a
* @return {undefined}
*/
j : function(a) {
if (a.success) {
$.add({
duration : 5,
type : "success",
message : "The report has been successfully uploaded",
title : "Success!"
});
_gaq.push(["_trackEvent", "Abuse", "Report", type]);
} else {
$.add({
duration : 5,
type : "error",
message : "Something went wrong while uploading the report",
title : "Error!"
});
}
}
});
}
/**
* @param {Function} f
* @param {Function} main_callback
* @return {undefined}
*/
function some(f, main_callback) {
self.p({
url : "https://mw3sa.xifon.eu/bans/abuse/friends?" + callback() + "&callback=?",
/**
* @param {Object} t
* @return {undefined}
*/
j : function(t) {
if (t.success) {
f(t.friends);
} else {
main_callback();
}
}
});
}
/**
* @param {string} state
* @return {undefined}
*/
function toggle(state) {
self.p({
url : "https://mw3sa.xifon.eu/bans/abuse/invite?" + callback() + "&friend=" + state + "&callback=?",
/**
* @param {Object} d
* @return {undefined}
*/
j : function(d) {
if (d.success) {
_gaq.push(["_trackEvent", "Abuse", "Invite", state]);
$.add({
type : "success",
message : "Your friend has been invited! Make sure to send them the URL for the invitation page.",
title : "Success!",
duration : 5
});
trigger();
} else {
/** @type {string} */
var output = "An error occurred while trying to invite this person";
if ("reason" in d) {
output += ": " + d.reason;
}
$.add({
type : "error",
message : output,
title : "Error!",
duration : 5
});
}
}
});
}
/**
* @return {undefined}
*/
function done() {
if (!fx) {
/** @type {boolean} */
fx = true;
c.o("update");
obj.setItem("abuse_seen", "1");
}
}
/**
* @param {string} args
* @return {?}
*/
function escape(args) {
if ("string" !== typeof args) {
return "";
}
if ("" == args.replace(/\^[0-9]/g, "").replace(/ /g, "")) {
return "Unnamed player";
}
/** @type {string} */
args = args.replace(/&/g, "&amp;");
/** @type {string} */
args = args.replace(/>/g, "&gt;");
/** @type {string} */
args = args.replace(/</g, "&lt;");
/** @type {string} */
var s = "<span>";
/** @type {number} */
var i = 0;
for (;i < args.length;i++) {
if ("^" == args[i] && args[i + 1]) {
/** @type {number} */
var checked = args.charCodeAt(i + 1);
if (48 <= checked && 57 >= checked) {
s += '</span><span class="color' + args[i + 1] + '">';
i++;
} else {
s += args[i];
}
} else {
s += args[i];
}
}
/** @type {string} */
s = (s + "</span>").replace(/<span><\/span>/g, "");
return s = s.replace(/<span class="color[0-9]"><\/span>/g, "");
}
/**
* @param {?} path
* @return {undefined}
*/
function init(path) {
conf.o("unload");
if (path in cache) {
cache[path]();
} else {
self.e(files, function(q) {
var resolved = q[0].exec(path);
if (null !== resolved) {
return q[1].apply(null, resolved.splice(1, resolved.length - 1)), false;
}
});
}
conf.o("load");
}
/**
* @param {string} value
* @return {undefined}
*/
function onSuccess(value) {
context.go(value);
init(value);
_gaq.push(["_trackPageview"]);
}
/**
* @param {string} str
* @param {Function} camel
* @return {undefined}
*/
function dasherize(str, camel) {
/** @type {Function} */
cache[str] = camel;
}
/**
* @param {RegExp} field
* @param {Function} file
* @return {undefined}
*/
function validate(field, file) {
files.push([field, file]);
}
/**
* @return {undefined}
*/
function test() {
/**
* @return {undefined}
*/
function f() {
/** @type {string} */
self.h("#menu_abuse_report").style.display = type || fx ? "inherit" : "none";
}
create();
self.h("body").innerHTML = object.body.i({
ver : mwsaVer
});
fn(self.h("body"), '[rel="action[refresh]"]').e(function(closeBox) {
/**
* @return {?}
*/
closeBox.onclick = function() {
run();
options.L();
trigger();
return false;
};
});
assert(self.h("body"));
$.w();
c.g("update", f);
f();
}
/**
* @param {Element} tree
* @return {undefined}
*/
function assert(tree) {
fn(tree, "a[rel=link]").e(function(closeBox) {
/**
* @return {?}
*/
closeBox.onclick = function() {
var _this = this.pathname;
if ("/" == _this.substring(0, 1)) {
_this = _this.substring(1);
}
onSuccess(_this);
return false;
};
});
}
var udataCur = {};
(function(value, a) {
/**
* @param {string} attr
* @param {Object} o
* @param {?} element
* @return {?}
*/
function compile(attr, o, element) {
var val;
if (o) {
if ("object" == typeof o) {
if (null != o[attr]) {
val = o[attr];
} else {
if (element) {
if (o.get) {
if ("function" == typeof o.get) {
val = o.get(attr);
}
}
}
}
}
}
return val;
}
/**
* @param {string} callback
* @return {?}
*/
function $(callback) {
return String(null === callback || void 0 === callback ? "" : callback);
}
/**
* @param {Object} r
* @param {string} text
* @param {?} a
* @param {Object} options
* @return {undefined}
*/
value.k = function(r, text, a, options) {
r = r || {};
this.A = r.code || this.A;
this.O = a;
this.options = options || {};
this.text = text || "";
this.l = r.l || {};
this.m = r.m || {};
this.S();
};
value.k.prototype = {
/**
* @return {?}
*/
A : function() {
return "";
},
/**
* @param {string} a
* @return {?}
*/
c : function(a) {
a = $(a);
return escapable.test(a) ? a.replace(rclass, "&amp;").replace(r20, "&lt;").replace(rreturn, "&gt;").replace(rSlash, "&#39;").replace(badChars, "&quot;") : a;
},
/** @type {function (string): ?} */
t : $,
/**
* @param {?} opt_attributes
* @param {Object} a
* @param {string} obj
* @return {?}
*/
i : function(opt_attributes, a, obj) {
return this.$([opt_attributes], a || {}, obj);
},
/**
* @param {?} pending
* @param {boolean} c
* @param {string} doc
* @return {?}
*/
$ : function(pending, c, doc) {
return this.A(pending, c, doc);
},
/**
* @param {Array} args
* @param {boolean} n
* @param {Function} cb
* @return {undefined}
*/
f : function(args, n, cb) {
var list = args[args.length - 1];
if (isArray(list)) {
/** @type {number} */
var p = 0;
for (;p < list.length;p++) {
args.push(list[p]);
cb(args, n, this);
args.pop();
}
} else {
cb(args, n, this);
}
},
/**
* @param {string} value
* @param {Array} args
* @param {boolean} n
* @param {number} recurring
* @param {number} expectedHashCode
* @param {number} opt_attributes
* @param {string} d
* @return {?}
*/
d : function(value, args, n, recurring, expectedHashCode, opt_attributes, d) {
if (isArray(value) && 0 === value.length) {
return false;
}
if ("function" == typeof value) {
value = this.X(value, args, n, recurring, expectedHashCode, opt_attributes, d);
}
/** @type {boolean} */
n = !!value;
if (!recurring) {
if (n) {
if (args) {
args.push("object" == typeof value ? value : args[args.length - 1]);
}
}
}
return n;
},
/**
* @param {string} context
* @param {Array} args
* @param {boolean} callback
* @param {number} recurring
* @return {?}
*/
r : function(context, args, callback, recurring) {
var codeSegments = context.split(".");
var options = this.b(codeSegments[0], args, callback, recurring);
var content = this.options.W;
/** @type {null} */
var handler = null;
if ("." === context && isArray(args[args.length - 2])) {
options = args[args.length - 1];
} else {
/** @type {number} */
var i = 1;
for (;i < codeSegments.length;i++) {
context = compile(codeSegments[i], options, content);
if (null != context) {
handler = options;
/** @type {string} */
options = context;
} else {
/** @type {string} */
options = "";
}
}
}
if (recurring && !options) {
return false;
}
if (!recurring) {
if (!("function" != typeof options)) {
args.push(handler);
options = this.J(options, args, callback);
args.pop();
}
}
return options;
},
/**
* @param {string} name
* @param {Array} args
* @param {boolean} key
* @param {number} recurring
* @return {?}
*/
b : function(name, args, key, recurring) {
/** @type {boolean} */
var result = false;
/** @type {null} */
var cb = null;
/** @type {boolean} */
var r = false;
var data = this.options.W;
/** @type {number} */
var which = args.length - 1;
for (;0 <= which;which--) {
if (cb = args[which], result = compile(name, cb, data), null != result) {
/** @type {boolean} */
r = true;
break;
}
}
if (!r) {
return recurring ? false : "";
}
if (!recurring) {
if (!("function" != typeof result)) {
result = this.J(result, args, key);
}
}
return result;
},
/**
* @param {Function} fn
* @param {Array} elems
* @param {boolean} d
* @param {?} locals
* @param {?} y
* @return {?}
*/
V : function(fn, elems, d, locals, y) {
var val = this.options.G;
this.options.G = y;
this.a(this.F($(fn.call(elems, locals)), elems, d));
this.options.G = val;
return false;
},
/**
* @param {?} o
* @param {Array} callback
* @param {boolean} t
* @return {?}
*/
F : function(o, callback, t) {
if (this.options.da) {
throw Error("Lambda features disabled.");
}
return this.O.compile(o, this.options).i(callback, t);
},
/** @type {function (string): undefined} */
a : a ? function(modId) {
this.q.push(modId);
} : function(dataAndEvents) {
this.q += dataAndEvents;
},
/** @type {function (): ?} */
n : a ? function() {
var segs = this.q.join("");
/** @type {Array} */
this.q = [];
return segs;
} : function() {
var q = this.q;
/** @type {string} */
this.q = "";
return q;
},
/**
* @return {undefined}
*/
S : function() {
/** @type {(Array|string)} */
this.q = a ? [] : "";
},
/**
* @param {Function} fn
* @param {Array} elems
* @param {boolean} t
* @param {(Function|string)} base
* @param {number} e
* @param {number} mod
* @param {string} n
* @return {?}
*/
X : function(fn, elems, t, base, e, mod, n) {
elems = elems[elems.length - 1];
fn = fn.call(elems);
if ("function" == typeof fn) {
if (base) {
return true;
}
base = this.C && this.ba[this.C] ? this.ba[this.C] : this.text;
return this.V(fn, elems, t, base.substring(e, mod), n);
}
return fn;
},
/**
* @param {boolean} fn
* @param {Array} elems
* @param {boolean} k
* @return {?}
*/
J : function(fn, elems, k) {
elems = elems[elems.length - 1];
fn = fn.call(elems);
return "function" == typeof fn ? this.F($(fn.call(elems)), elems, k) : fn;
}
};
/** @type {RegExp} */
var rclass = /&/g;
/** @type {RegExp} */
var r20 = /</g;
/** @type {RegExp} */
var rreturn = />/g;
/** @type {RegExp} */
var rSlash = /\'/g;
/** @type {RegExp} */
var badChars = /\"/g;
/** @type {RegExp} */
var escapable = /[&<>\"\']/;
/** @type {function (*): boolean} */
var isArray = Array.isArray || function(xs) {
return "[object Array]" === Object.prototype.toString.call(xs);
};
})(udataCur, false);
var object = {};
object.abuseReporter_guidelines = new udataCur.k({
/**
* @param {?} options
* @param {boolean} x
* @param {string} a
* @return {?}
*/
code : function(options, x, a) {
this.a(a || "");
this.a('<h2>When is somebody an abuser?</h2>\n<p>\n\tWhen someone kicks without an obvious reason, that does not immediately mean that they are abusing the tool. However, when it happens repeatedly, it might be time to report them. You should follow these guidelines :\n</p>\n<ul>\n\t<li><strong>Abuse:</strong> Kicking someone for using a certain weapon without prior warning. The host <em>must</em> warn before kicking</li>\n\t<li><strong>Abuse:</strong> Kicking for really bad reasons, even <em>with</em> a warning, like not wanting to play \'snipers only\'</li>\n\t<li><strong>Abuse:</strong> Kicking someone for insulting, without giving them a warning</li>\n\t<li><strong>Abuse:</strong> Kicking for having a VAC ban, without them actually cheating</li>\n\t<li><strong>Abuse:</strong> Kicking for having a very new Steam account</li>\n\t<li><strong>Not abuse:</strong> Kicking for using a grenade launcher, after properly giving a warning first</li>\n\t<li><strong>Not abuse:</strong> Kicking someone for hacking/cheating</li>\n\t<li><strong>Not abuse:</strong> Not wanting to kick someone</li>\n</ul>\n<p>\n\tTo summarize: most kicks aren\'t considered abuse, but <em>the host must always warn</em> before kicking for non-cheating reasons. Kicking for terrible reasons ("snipers only", "knife only", "no running", "don\'t shoot me") is considered abuse. Tell these hosts to create a <em>private match</em> instead.\n</p>');
return this.n();
},
l : {},
m : {}
});
object.abuseReporter_home = new udataCur.k({
/**
* @param {Array} options
* @param {boolean} n
* @param {string} response
* @return {?}
*/
code : function(options, n, response) {
this.a(response = response || "");
this.a('<div class="page-header"><h1>Abuse reporting</h1></div>\n<p>\n\tYou are logged in. <a href="/abuse/disable" rel="link">Log out</a>\n</p>\n');
if (!this.d(this.b("invited", options, n, 1), options, n, 1, 0, 0, "")) {
this.a("<p>\n\t<strong>You have not yet received an invite. You must be invited by a friend before you can use the abuse reporter.</strong>\n</p>\n");
}
this.a(this.t(this.b("guidelines", options, n, 0)));
this.a('\n<h2>How do I report?</h2>\n<p>\n\tWhen you find a host who is abusing their privileges, click the little "<em>Host</em>" badge next to their name, which will take you to the abuse reporting page.\n</p>\n');
if (this.d(this.b("invites", options, n, 1), options, n, 0, 521, 679, "{{ }}")) {
this.f(options, n, function(height, scope, object) {
object.a("<h2>Inviting people</h2>\n<p>\n\tYou currently have ");
object.a(object.c(object.b("invites", height, scope, 0)));
object.a(' invites to give away. <a href="/abuse/invite" rel="link">Click here to invite a friend</a>\n</p>\n');
});
options.pop();
}
return this.n();
},
l : {},
m : {}
});
object.abuseReporter_invite = new udataCur.k({
/**
* @param {Array} options
* @param {boolean} n
* @param {string} response
* @return {?}
*/
code : function(options, n, response) {
this.a(response = response || "");
this.a('<table class="table table-hover table-striped table-bordered">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Steam ID</th>\n\t\t\t<th>Name</th>\n\t\t\t<th>Actions</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n');
if (this.d(this.b("friends", options, n, 1), options, n, 0, 176, 427, "{{ }}")) {
this.f(options, n, function(args, password, self) {
self.a('\t\t<tr>\n\t\t\t<td><a href="http://steamcommunity.com/profiles/');
self.a(self.c(self.b("steamID", args, password, 0)));
self.a('" target="_blank">');
self.a(self.c(self.b("steamID_str", args, password, 0)));
self.a('</a></td>\n\t\t\t<td><img src="');
self.a(self.c(self.b("avatar", args, password, 0)));
self.a('"> ');
self.a(self.c(self.b("name", args, password, 0)));
self.a('</td>\n\t\t\t<td><a class="btn" rel="invite" data-steamid="');
self.a(self.c(self.b("steamID", args, password, 0)));
self.a('" href="">Invite</a></td>\n\t\t</tr>\n');
});
options.pop();
}
this.a("\t</tbody>\n</table>");
return this.n();
},
l : {},
m : {}
});
object.abuseReporter_report = new udataCur.k({
/**
* @param {?} options
* @param {boolean} path
* @param {string} a
* @return {?}
*/
code : function(options, path, a) {
this.a(a || "");
this.a('<div class="page-header"><h1>Abuse report</h1></div>\n<p>\n\tYou are about to report the player with SteamID <a href="http://steamcommunity.com/profiles/');
this.a(this.c(this.b("steamID", options, path, 0)));
this.a('" target="_blank">');
this.a(this.c(this.b("steamID", options, path, 0)));
this.a("</a> for abusing this tool. Are you really sure? Please note that you have <nobr><strong>only ");
this.a(this.c(this.b("reportcount", options, path, 0)));
this.a(' report(s) left</strong></nobr> (they regenerate after a while, but use them carefully!)\n</p>\n<p>\n\t<a href="" rel="report_action" class="btn btn-danger">Yes, report</a>\n\t<a href="/" rel="link" class="btn">No, cancel</a>\n</p>');
return this.n();
},
l : {},
m : {}
});
object.abuseReporter_welcome = new udataCur.k({
/**
* @param {?} options
* @param {boolean} path
* @param {string} a
* @return {?}
*/
code : function(options, path, a) {
this.a(a || "");
this.a('<div class="page-header"><h1>Abuse reporting</h1></div>\n<p>\n\tWelcome to the (invite-only) abuse reporting system! To prevent abuse of the tool, there is now a system that will blacklist abusers of the tool. To become a member of the abuse reporters, you must :\n</p>\n<ul>\n\t<li>Not have a VAC ban or Steam Community ban</li>\n\t<li>Not be an abuser of the tool</li>\n\t<li>Have a public Steam profile</li>\n\t<li>Know what is an abuser</li>\n\t<li>Agree to these rules, and the privacy policy</li>\n\t<li>Have an invite</li>\n</ul>\n');
this.a(this.t(this.b("guidelines", options, path, 0)));
this.a('\n<h2>Privacy policy</h2>\n<p>\n\tWhen you report an abuser, a lot of data is sent to the main server (and stored), including your Steam ID and IP address.\n</p>\n<h2>Joining</h2>\n<p>\n\tIf you have received an invite, <a href="#" rel="abuse_join">click here</a> to join.\n</p>');
return this.n();
},
l : {},
m : {}
});
object.addBan = new udataCur.k({
/**
* @param {Array} options
* @param {boolean} n
* @param {string} response
* @return {?}
*/
code : function(options, n, response) {
this.a(response = response || "");
this.a('<div class="row">\n\t<div class="span6 offset3">\n\t\t<form class="form-horizontal" id="banForm">\n\t\t\t<legend>Ban');
if (this.d(this.b("name", options, n, 1), options, n, 0, 116, 127, "{{ }}")) {
this.f(options, n, function(opts, subKey, obj) {
obj.a(' "');
obj.a(obj.c(obj.b("name", opts, subKey, 0)));
obj.a('"');
});
options.pop();
}
this.a('</legend>\n\t\t\t<div class="control-group">\n\t\t\t\t<label class="control-label">Steam ID</label>\n\t\t\t\t<div class="controls">\n\t\t\t\t\t<input type="text" value="');
this.a(this.c(this.b("steamID", options, n, 0)));
this.a('" disabled="disabled">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="control-group">\n\t\t\t\t<label class="control-label">Ban list</label>\n\t\t\t\t<div class="controls">\n\t\t\t\t\t<select name="list">\n');
if (this.d(this.b("banLists", options, n, 1), options, n, 0, 487, 544, "{{ }}")) {
this.f(options, n, function(height, scope, object) {
object.a('\t\t\t\t\t\t<option value="');
object.a(object.c(object.b("listKey", height, scope, 0)));
object.a('">');
object.a(object.c(object.b("listName", height, scope, 0)));
object.a("</option>\n");
});
options.pop();
}
this.a('\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="control-group">\n\t\t\t\t<label class="control-label">Reason</label>\n\t\t\t\t<div class="controls">\n');
if (this.d(this.b("reasons", options, n, 1), options, n, 0, 712, 837, "{{ }}")) {
this.f(options, n, function(height, scope, object) {
object.a('\t\t\t\t\t<label class="radio">\n\t\t\t\t\t\t<input type="radio" name="reason" value="');
object.a(object.c(object.b("reasonID", height, scope, 0)));
object.a('">\n\t\t\t\t\t\t');
object.a(object.c(object.b("reasonText", height, scope, 0)));
object.a("\n\t\t\t\t\t</label>\n");
});
options.pop();
}
this.a('\t\t\t\t\t<label class="radio">\n\t\t\t\t\t\t<input type="radio" name="reason" value="other">\n\t\t\t\t\t\tOther:<br>\n\t\t\t\t\t</label>\n\t\t\t\t\t\n\t\t\t\t\t<label class="text">\n\t\t\t\t\t\t<input type="text" name="reasonText" class="input-large">\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="form-actions">\n\t\t\t\t<button type="submit" class="btn btn-primary">Ban</button>\n\t\t\t\t<a class="btn" href="/" rel="link">Cancel</a>\n\t\t\t</div>\n\t\t</form>\n\t</div>\n</div>');
return this.n();
},
l : {},
m : {}
});
object.banList = new udataCur.k({
/**
* @param {Array} options
* @param {boolean} n
* @param {string} response
* @return {?}
*/
code : function(options, n, response) {
this.a(response = response || "");
this.a('<div class="page-header"><h1>Ban list management <small>');
this.a(this.c(this.r("list.list.name", options, n, 0)));
this.a("</small></h1></div>\n<h3>Sharing</h3>\n<p>The keys below can be used to share this ban list with your friends and others. Be careful about which keys you give away, they're divided into three permission levels.</p>\n<ul>\n\t<li>An owner key is a key that only you should have. It gives full access to the list, plus the option to rename it.</li>\n\t<li>A moderator key can be used to add and remove bans from the list.</li>\n\t<li>A read-only key can only be used to kick players. These users cannot add new bans to the list.</li>\n</ul>\n<p><b>Anyone with a key at a certain permission level can give away keys for that level, or below. So seriously, don't give away your owner key.</b></p>\n\n");
if (this.d(this.r("list.list", options, n, 1), options, n, 0, 770, 1134, "{{ }}")) {
this.f(options, n, function(args, length, exports) {
exports.a("<p>The keys for this list are:</p>\n<ul>\n\t<li>Owner key: ");
if (exports.d(exports.b("ownerkey", args, length, 1), args, length, 0, 840, 852, "{{ }}")) {
exports.f(args, length, function(height, scope, object) {
object.a(object.c(object.b("ownerkey", height, scope, 0)));
});
args.pop();
}
if (!exports.d(exports.b("ownerkey", args, length, 1), args, length, 1, 0, 0, "")) {
exports.a("<em>Not available</em>");
}
exports.a("</li>\n\t<li>Moderator key: ");
if (exports.d(exports.b("modkey", args, length, 1), args, length, 0, 950, 960, "{{ }}")) {
exports.f(args, length, function(height, scope, object) {
object.a(object.c(object.b("modkey", height, scope, 0)));
});
args.pop();
}
if (!exports.d(exports.b("modkey", args, length, 1), args, length, 1, 0, 0, "")) {
exports.a("<em>Not available</em>");
}
exports.a("</li>\n\t<li>Read-only key: ");
if (exports.d(exports.b("readkey", args, length, 1), args, length, 0, 1053, 1064, "{{ }}")) {
exports.f(args, length, function(height, scope, object) {
object.a(object.c(object.b("readkey", height, scope, 0)));
});
args.pop();
}
if (!exports.d(exports.b("readkey", args, length, 1), args, length, 1, 0, 0, "")) {
exports.a("<em>Not available</em>");
}
exports.a("</li>\n</ul>\n");
});
options.pop();
}
this.a('\n<p><a rel="action[delete]" data-key="');
this.a(this.c(this.r("list.list.key", options, n, 0)));
this.a('">Remove this list</a></p>');
return this.n();
},
l : {},
m : {}
});
object.banTable = new udataCur.k({
/**
* @param {Array} options
* @param {boolean} n
* @param {string} response
* @return {?}
*/
code : function(options, n, response) {
this.a(response = response || "");
this.a('<div class="page-header"><h1>Bans</h1></div>\n\n<h3>Import</h3>\n<p>If someone gave you a key for his/her list, you can enter it here. The list will be added as a new list and automatically synchronized.</p>\n<form class="form-inline" id="addForm">\n\t<input type="text" name="key" class="input"> <input type="submit" class="btn" value="Add">\n</form>\n\n<h3>Lists</h3>\n');
if (this.d(this.b("lists", options, n, 1), options, n, 0, 371, 1144, "{{ }}")) {
this.f(options, n, function(args, id, d) {
d.a('<table class="table table-striped table-bordered">\n\t<thead>\n\t\t<tr>\n\t\t\t<th colspan="4">\n\t\t\t\t');
d.a(d.c(d.r("list.name", args, id, 0)));
d.a(" (");
d.a(d.c(d.b("count", args, id, 0)));
d.a(' bans)\n\t\t\t\t<a class="link pull-right" rel="link" href="/list/');
d.a(d.c(d.r("list.key", args, id, 0)));
d.a('">Edit / Share</a>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Steam ID</th>\n\t\t\t<th>Date</th>\n\t\t\t<th>Reason</th>\n\t\t\t<th>Actions</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n');
if (d.d(d.b("bans", args, id, 1), args, id, 0, 716, 1037, "{{ }}")) {
d.f(args, id, function(args, newValue, item) {
item.a('\t\t<tr>\n\t\t\t<td><a href="http://steamcommunity.com/profiles/');
item.a(item.c(item.b("steamID", args, newValue, 0)));
item.a('" target="_blank">');
item.a(item.c(item.b("steamID_str", args, newValue, 0)));
item.a("</a></td>\n\t\t\t<td>");
item.a(item.c(item.b("added_str", args, newValue, 0)));
item.a("</td>\n\t\t\t<td>");
item.a(item.c(item.b("reason", args, newValue, 0)));
item.a("</td>\n\t\t\t<td>");
if (item.d(item.r("list.modkey", args, newValue, 1), args, newValue, 0, 901, 1007, "{{ }}")) {
item.f(args, newValue, function(details, password, self) {
self.a('<a rel="action[unban]" data-listkey="');
self.a(self.c(self.r("list.key", details, password, 0)));
self.a('" data-id="');
self.a(self.c(self.b("steamID", details, password, 0)));
self.a('" class="btn btn-success">Unban</a>');
});
args.pop();
}
item.a("</td>\n\t\t</tr>\n");
});
args.pop();
}
if (!d.d(d.b("bans", args, id, 1), args, id, 1, 0, 0, "")) {
d.a('\t\t<tr>\n\t\t\t<td colspan="4">This list is empty</td>\n\t\t</tr>\n');
}
d.a("\t</tbody>\n</table>\n");
});
options.pop();
}
if (!this.d(this.b("lists", options, n, 1), options, n, 1, 0, 0, "")) {
this.a("<p><em>Whoops, can't find any ban data for you. Probably still loading, hold on!</em></p>\n");
}
return this.n();
},
l : {},
m : {}
});
object.body = new udataCur.k({
/**
* @param {?} options
* @param {boolean} path
* @param {string} a
* @return {?}
*/
code : function(options, path, a) {
this.a(a || "");
this.a('<div class="navbar navbar-inverse navbar-fixed-top">\n\t<div class="navbar-inner">\n\t\t<div class="container">\n\t\t\t<a class="brand" href="/" rel="link">MW');
this.a(this.c(this.b("ver", options, path, 0)));
this.a('sa</a>\n\t\t\t<ul class="nav">\n\t\t\t\t<li><a href="/" rel="link">Home</a></li>\n\t\t\t\t<li><a href="/banned" rel="link">Banned</a></li>\n\t\t\t\t<li id="menu_abuse_report" style="display: none;"><a href="/abuse" rel="link">Report abuse</a></li>\n\t\t\t</ul>\n\t\t\t<ul class="pull-right nav">\n\t\t\t\t<li><a href="/" rel="action[refresh]">Refresh</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>\n\n<div class="container">\n\t<div id="messageList"></div>\n\t<div id="content"></div>\n\t\n\t<footer>\n\t\t<p>&copy; <a href="http://xifon.eu" target="_blank">Xifon.eu</a>, <em>2010-2013</em></p>\n\t\t<p><small><a href="http://steamcommunity.com/groups/MWxsa" target="_blank">MW');
this.a(this.c(this.b("ver", options, path, 0)));
this.a("sa Steam group</a></small></p>\n\t</footer>\n</div>");
return this.n();
},
l : {},
m : {}
});
object.headExtra = new udataCur.k({
/**
* @param {?} options
* @param {boolean} path
* @param {string} a
* @return {?}
*/
code : function(options, path, a) {
this.a(a || "");
this.a("<div>\n\t<title>MW");
this.a(this.c(this.b("ver", options, path, 0)));
this.a('sa</title>\n\t<link rel="stylesheet" type="text/css" href="https://mw3sa.xifon.eu/static/bootstrap.min.css">\n\t<style>\n\t\tbody{padding-top: 60px;}\n\t\t.color1{color:darkred;}.color2{color:darkgreen;}.color3{color:darkorange;}.color4{color:darkblue;}.color5{color:darkcyan;}.color6{color:deeppink;}.color7{color:darkgrey;}.color8{color:darkgrey;}.color9{color:darkgrey;}\n\t</style>\n</div>');
return this.n();
},
l : {},
m : {}
});
object.locationCell = new udataCur.k({
/**
* @param {?} options
* @param {boolean} path
* @param {string} a
* @return {?}
*/
code : function(options, path, a) {
this.a(a || "");
this.a('<img src="');
this.a(this.c(this.b("0", options, path, 0)));
this.a('"> ');
this.a(this.c(this.b("1", options, path, 0)));
return this.n();
},
l : {},
m : {}
});
object.message = new udataCur.k({
/**
* @param {?} options
* @param {boolean} path
* @param {string} a
* @return {?}
*/
code : function(options, path, a) {
this.a(a || "");
this.a('<div class="alert alert-');
this.a(this.c(this.b("type", options, path, 0)));
this.a('" id="message-');
this.a(this.c(this.b("id", options, path, 0)));
this.a('">\n\t<strong>');
this.a(this.c(this.b("title", options, path, 0)));
this.a("</strong> ");
this.a(this.c(this.b("message", options, path, 0)));
this.a("\n</div>");
return this.n();
},
l : {},
m : {}
});
object.playerTable = new udataCur.k({
/**
* @param {Array} options
* @param {boolean} n
* @param {string} response
* @return {?}
*/
code : function(options, n, response) {
this.a(response = response || "");
this.a('<div class="page-header"><h1>Players</h1></div>\n<table class="table table-hover table-striped table-bordered">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Player name</th>\n\t\t\t<th><abbr title="Level / Prestige">L/P</sup></th>\n\t\t\t<th>First seen</th>\n\t\t\t<th>Steam ID</th>\n\t\t\t<th>IP address</th>\n\t\t\t<th>Location</th>\n\t\t\t<th>Actions</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n');
if (this.d(this.b("players", options, n, 1), options, n, 0, 351, 1615, "{{ }}")) {
this.f(options, n, function(args, length, self) {
self.a('\t\t<tr>\n\t\t\t<td style="max-width:20%;word-wrap:break-word;">');
self.a(self.t(self.b("colorName", args, length, 0)));
if (self.d(self.b("host", args, length, 1), args, length, 0, 434, 576, "{{ }}")) {
self.f(args, length, function(args, length, exports) {
exports.a(" ");
if (exports.d(exports.b("iReport", args, length, 1), args, length, 0, 447, 494, "{{ }}")) {
exports.f(args, length, function(height, scope, object) {
object.a('<a href="/abuse/report/');
object.a(object.c(object.b("steamID", height, scope, 0)));
object.a('" rel="link">');
});
args.pop();
}
exports.a('<span class="badge badge-info">Host</span>');
if (exports.d(exports.b("iReport", args, length, 1), args, length, 0, 560, 564, "{{ }}")) {
exports.f(args, length, function(dataAndEvents, deepDataAndEvents, fnc) {
fnc.a("</a>");
});
args.pop();
}
});
args.pop();
}
if (self.d(self.b("banned", args, length, 1), args, length, 0, 596, 665, "{{ }}")) {
self.f(args, length, function(count, subKey, item) {
item.a(' <span class="badge badge-important" title="');
item.a(item.c(item.b("reason", count, subKey, 0)));
item.a('">Banned</span>');
});
args.pop();
}
self.a("</td>\n\t\t\t<td>");
self.a(self.c(self.b("level", args, length, 0)));
self.a(" / <em>");
self.a(self.c(self.b("prestige", args, length, 0)));
self.a("</em></td>\n\t\t\t<td>");
self.a(self.c(self.b("timeFormat", args, length, 0)));
self.a('</td>\n\t\t\t<td><a target="_blank" href="http://steamcommunity.com/profiles/');
self.a(self.c(self.b("steamID", args, length, 0)));
self.a('">');
self.a(self.c(self.b("steamID_str", args, length, 0)));
self.a("</a></td>\n\t\t\t<td>");
self.a(self.c(self.b("ip", args, length, 0)));
self.a("</td>\n\t\t\t<td>");
self.a(self.t(self.b("location", args, length, 0)));
self.a("</td>\n");
if (!self.d(self.b("friend_img", args, length, 1), args, length, 1, 0, 0, "")) {
if (self.d(self.b("iHost", args, length, 1), args, length, 0, 932, 1147, "{{ }}")) {
self.f(args, length, function(args, c, d) {
if (d.d(d.b("host", args, c, 1), args, c, 0, 942, 956, "{{ }}")) {
d.f(args, c, function(dataAndEvents, deepDataAndEvents, fnc) {
fnc.a("\t\t\t<td></td>\n");
});
args.pop();
}
if (!d.d(d.b("host", args, c, 1), args, c, 1, 0, 0, "")) {
d.a('\t\t\t<td><a rel="action[kick]" data-ip="');
d.a(d.c(d.b("ip", args, c, 0)));
d.a('" class="btn btn-small">Kick</a> <a href="/ban/');
d.a(d.c(d.b("steamID", args, c, 0)));
d.a('" rel="link" class="btn btn-small btn-danger">Ban</a></td>\n');
}
});
args.pop();
}
if (!self.d(self.b("iHost", args, length, 1), args, length, 1, 0, 0, "")) {
self.a('\t\t\t<td>\n\t\t\t\t<a href="/ban/');
self.a(self.c(self.b("steamID", args, length, 0)));
self.a('" rel="link" class="btn btn-small">Add to ban list</a>\n');
if (self.d(self.b("has_nohost", args, length, 1), args, length, 0, 1276, 1449, "{{ }}")) {
self.f(args, length, function(args, c, d) {
if (d.d(d.b("host", args, c, 1), args, c, 0, 1286, 1439, "{{ }}")) {
d.f(args, c, function(args, password, self) {
self.a('\t\t\t\t<br><a href="/manban/');
self.a(self.c(self.b("ip", args, password, 0)));
self.a('" rel="link" class="btn btn-small">Manban</a>\n\t\t\t\t<a href="/mankick/');
self.a(self.c(self.b("ip", args, password, 0)));
self.a('" rel="link" class="btn btn-small">Mankick</a>\n');
});
args.pop();
}
});
args.pop();
}
self.a("\t\t\t</td>\n");
}
}
if (self.d(self.b("friend_img", args, length, 1), args, length, 0, 1516, 1591, "{{ }}")) {
self.f(args, length, function(height, scope, object) {
object.a('\t\t\t<td><img src="http://i.imgur.com/');
object.a(object.c(object.b("friend_img", height, scope, 0)));
object.a('"> ');
object.a(object.c(object.b("friend_text", height, scope, 0)));
object.a("</td>\n");
});
args.pop();
}
self.a("\t\t</tr>\n");
});
options.pop();
}
if (!this.d(this.b("players", options, n, 1), options, n, 1, 0, 0, "")) {
this.a('\t\t<tr>\n\t\t\t<td colspan="7">No players found.</td>\n\t\t</tr>\n');
}
this.a("\t</tbody>\n</table>");
return this.n();
},
l : {},
m : {}
});
if (2 == mwsaVer) {
_gaq.push(["_setAccount", "UA-803608-6"]);
} else {
if (3 == mwsaVer) {
_gaq.push(["_setAccount", "UA-803608-4"]);
}
}
_gaq.push(["_setDomainName", "none"]);
_gaq.push(["_setAllowLinker", true]);
_gaq.push(["_trackPageview"]);
/** @type {Element} */
var ga = document.createElement("script");
/** @type {string} */
ga.type = "text/javascript";
/** @type {boolean} */
ga.async = true;
/** @type {string} */
ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
var insertAt = document.getElementsByTagName("script")[0];
insertAt.parentNode.insertBefore(ga, insertAt);
var Canvas = function() {
/**
* @return {undefined}
*/
function $scope() {
this.s = {};
}
$scope.prototype = {
/**
* @param {string} event
* @param {Function} name
* @return {undefined}
*/
g : function(event, name) {
if (!(event in this.s)) {
/** @type {Array} */
this.s[event] = [];
}
this.s[event].push(name);
},
/**
* @param {string} name
* @return {undefined}
*/
o : function(name) {
if (this.s[name]) {
/** @type {number} */
var a = 0;
for (;a < this.s[name].length;a++) {
this.s[name][a]();
}
}
}
};
return $scope;
}();
var self = function() {
/**
* @param {?} selector
* @return {?}
*/
function dom(selector) {
return new dom.B(document.querySelectorAll(selector));
}
/**
* @return {undefined}
*/
function req() {
/** @type {boolean} */
c = true;
/** @type {function (): undefined} */
var prevOnLoad = window.onload;
/**
* @return {undefined}
*/
window.onload = function() {
/** @type {boolean} */
g = true;
if (prevOnLoad) {
prevOnLoad();
}
onload().o("load");
};
}
/**
* @return {?}
*/
function onload() {
return null != hiddenCanvas ? hiddenCanvas : hiddenCanvas = new Canvas;
}
/** @type {null} */
var hiddenCanvas = null;
/** @type {boolean} */
var g = false;
/** @type {boolean} */
var c = false;
/**
* @param {string} s
* @return {?}
*/
dom.h = function(s) {
return document.querySelector(s);
};
/**
* @param {Function} loaded
* @return {undefined}
*/
dom.load = function(loaded) {
if (g) {
loaded();
} else {
if (!c) {
req();
}
onload().g("load", loaded);
}
};
return dom;
}();
self.B = function() {
/**
* @param {Array} items
* @return {undefined}
*/
function Set(items) {
/** @type {Array} */
this.items = items;
}
Set.prototype = {
/**
* @return {?}
*/
P : function() {
return this.items[0];
},
/**
* @param {Function} data
* @return {undefined}
*/
e : function(data) {
self.e(this.items, data);
}
};
return Set;
}();
/**
* @param {Function} data
* @param {Function} f
* @return {undefined}
*/
self.e = function(data, f) {
if ("undefined" !== typeof data) {
if ("undefined" !== typeof data.length) {
/** @type {number} */
var i = 0;
for (;i < data.length && false !== f(data[i]);i++) {
}
} else {
for (i in data) {
if (false === f(data[i], i)) {
break;
}
}
}
}
};
(function() {
/**
* @param {Object} args
* @return {undefined}
*/
self.D = function(args) {
/**
* @return {undefined}
*/
function onerror() {
if (args.error) {
args.error(null);
}
}
var timeout = args.timeout || 30;
/** @type {XMLHttpRequest} */
var xhr = new XMLHttpRequest;
xhr.open(args.method || "GET", args.url, true);
/** @type {number} */
xhr.timeout = 1E3 * timeout;
/**
* @return {undefined}
*/
xhr.onload = function() {
try {
/** @type {*} */
var d = JSON.parse(this.responseText);
if (args.j) {
args.j(d);
} else {
if (args.error) {
args.error(d);
}
}
} catch (e) {
if (args.error) {
args.error(e);
}
}
};
/** @type {function (): undefined} */
xhr.onerror = onerror;
/** @type {function (): undefined} */
xhr.onabort = onerror;
/** @type {function (): undefined} */
xhr.ontimeout = onerror;
xhr.send();
};
/** @type {number} */
var instance = 0;
/**
* @param {?} opt_attributes
* @return {undefined}
*/
self.p = function(opt_attributes) {
instance++;
var TS_JS = opt_attributes.url.replace("=?", "=jsonp" + instance);
/**
* @param {Object} d
* @return {undefined}
*/
window["jsonp" + instance] = function(d) {
opt_attributes.j(d);
if (script.parentNode) {
script.parentNode.removeChild(script);
}
};
/** @type {Element} */
var script = document.createElement("script");
script.src = TS_JS;
self.h("body").appendChild(script);
};
})();
/**
* @param {string} node
* @return {?}
*/
self.u = function(node) {
/** @type {Element} */
var el = document.createElement("div");
/** @type {string} */
el.innerHTML = node;
return el.firstChild;
};
var obj;
obj = "undefined" == typeof localStorage || null == localStorage ? {
/**
* @param {string} key
* @return {?}
*/
getItem : function(key) {
/** @type {Array.<string>} */
var s = document.cookie.split(";");
/** @type {string} */
key = encodeURIComponent(key) + "=";
/** @type {number} */
var i = 0;
for (;i < s.length;i++) {
/** @type {string} */
var v = s[i].trim();
if (v.substring(0, key.length) == key) {
return s = v.split("="), s = decodeURIComponent(s[1]);
}
}
return false;
},
/**
* @param {string} sKey
* @param {string} key
* @return {undefined}
*/
setItem : function(sKey, key) {
/** @type {Date} */
var date = new Date;
date.setTime(date.getTime() + 31536E6);
/** @type {string} */
document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(key) + "; expires=" + date.toGMTString() + "; path=/";
}
} : localStorage;
var p = function() {
/**
* @return {undefined}
*/
function next() {
/** @type {Array} */
var configList = [];
self.e(queue, function(name) {
if (name in timeMap) {
return false;
}
configList.push(name);
/** @type {boolean} */
timeMap[name] = true;
});
/** @type {Array} */
queue = [];
if (0 != configList.length) {
self.p({
url : "https://mw3sa.xifon.eu/flags/lookup?ips=" + configList.join(",") + "&callback=?",
/**
* @param {Function} d
* @return {undefined}
*/
j : function(d) {
self.e(d, function(proxyObj, id) {
done[id] = proxyObj;
});
c.o("update");
},
/**
* @return {undefined}
*/
error : function() {
}
});
}
}
var c = new Canvas;
/** @type {Array} */
var queue = [];
var done = {};
var timeMap = {};
return{
event : c,
/**
* @param {string} id
* @return {?}
*/
get : function(id) {
if (id in done) {
return done[id];
}
queue.push(id);
setTimeout(next, 1);
return null;
}
};
}();
/** @type {null} */
var ret = null;
var settings = {};
var out = new Canvas;
var options = function() {
/**
* @return {undefined}
*/
function func() {
self.p({
url : "https://mw3sa.xifon.eu/bans/sync?lists=" + escape(params.join(",")) + "&callback=?",
/**
* @param {Object} a
* @return {undefined}
*/
j : function(a) {
if (a.success) {
map = a.lists;
if ("blacklist" in a) {
point = {};
/** @type {number} */
var j = 0;
for (;j < a.blacklist.length;j++) {
/** @type {boolean} */
point[a.blacklist[j]] = true;
}
}
if ("ban" in a) {
pdataCur = a.ban;
}
c.o("update");
}
}
});
}
/**
* @param {?} f
* @return {?}
*/
function isFunction(f) {
return/[A-Z0-9]{25}/.test(f) ? true : false;
}
/**
* @return {undefined}
*/
function read() {
var searchParams = {};
/** @type {Array} */
var p = [];
/** @type {number} */
var i = 0;
for (;i < params.length;i++) {
if (params[i]) {
if (isFunction(params[i])) {
if (!searchParams[params[i]]) {
/** @type {boolean} */
searchParams[params[i]] = true;
p.push(params[i]);
}
}
}
}
/** @type {Array} */
params = p;
obj.setItem("banlists", JSON.stringify(params));
}
/**
* @param {?} param
* @return {undefined}
*/
function flow(param) {
/** @type {number} */
var i = 0;
for (;i < params.length;i++) {
if (params[i] == param) {
return;
}
}
params.push(param);
read();
func();
}
/**
* @param {string} pattern
* @return {undefined}
*/
function next(pattern) {
self.p({
url : "https://mw3sa.xifon.eu/bans/createList?name=" + escape(pattern) + "&callback=?",
/**
* @param {Object} d
* @return {undefined}
*/
j : function(d) {
if (d.success) {
if (d.key) {
flow(d.key);
}
}
},
/**
* @return {undefined}
*/
error : function() {
}
});
}
/**
* @param {Object} c
* @return {?}
*/
function print(c) {
if (c in map) {
return map[c];
}
}
/**
* @return {?}
*/
function v() {
/** @type {Array} */
var assigns = [];
/** @type {number} */
var i = 0;
for (;i < params.length;i++) {
var vvar = print(params[i]);
if (vvar) {
assigns.push(vvar);
}
}
return assigns;
}
/** @type {Array} */
var params = [];
var map = {};
var point = {};
/** @type {Array} */
var pdataCur = [];
var c = new Canvas;
var result = {};
c.g("update", function() {
var udataCur = v();
result = {};
self.e(pdataCur, function(axis) {
/** @type {string} */
result[axis] = "Banned";
});
self.e(udataCur, function(cfg) {
self.e(cfg.bans, function(data) {
result[data.steamID] = data.reason;
});
});
});
return{
/**
* @return {undefined}
*/
w : function() {
/** @type {Array} */
var config = [];
var deps = obj.getItem("banlists");
if (deps) {
if (deps = JSON.parse(deps)) {
if (deps.length) {
/** @type {*} */
config = deps;
}
}
}
if (0 == config.length) {
next("Default ban list");
}
/** @type {*} */
params = config;
func();
setInterval(func, 12E4);
},
event : c,
/** @type {function (): undefined} */
L : func,
/** @type {function (?): undefined} */
N : flow,
/** @type {function (string): undefined} */
ca : next,
/**
* @param {?} n
* @return {undefined}
*/
Z : function(n) {
if (n in map) {
delete map[n];
}
/** @type {number} */
var i = 0;
for (;i < params.length;i++) {
if (params[i] == n) {
params.splice(i, 1);
break;
}
}
read();
c.o("update");
},
/**
* @param {?} name
* @param {?} cmd
* @param {?} value
* @param {Function} require
* @return {undefined}
*/
M : function(name, cmd, value, require) {
self.p({
url : "https://mw3sa.xifon.eu/bans/addBan?list=" + escape(cmd) + "&id=" + escape(name) + "&reason=" + escape(value) + "&callback=?",
/**
* @param {Object} a
* @return {undefined}
*/
j : function(a) {
if (a.success) {
func();
require();
}
},
/**
* @return {undefined}
*/
error : function() {
}
});
},
/**
* @param {?} k
* @param {?} input
* @return {undefined}
*/
Y : function(k, input) {
self.p({
url : "https://mw3sa.xifon.eu/bans/removeBan?list=" + escape(k) + "&id=" + escape(input) + "&callback=?",
/**
* @param {Object} t
* @return {undefined}
*/
j : function(t) {
if (t.success && (t = map[k])) {
t = t.bans;
/** @type {number} */
var n = 0;
for (;n < t.length;n++) {
if (t[n].steamID == input) {
t.splice(n, 1);
break;
}
}
c.o("update");
}
},
/**
* @return {undefined}
*/
error : function() {
$.add({
type : "error",
title : "Unban failed",
message : "Failed to unban the player"
});
}
});
},
/**
* @param {?} p
* @return {?}
*/
H : function(p) {
return p in result;
},
/**
* @param {?} status
* @return {?}
*/
R : function(status) {
return result[status];
},
/** @type {function (): ?} */
v : v,
/** @type {function (Object): ?} */
Q : print,
/** @type {function (?): ?} */
T : isFunction,
/**
* @param {boolean} x
* @return {?}
*/
I : function(x) {
return x ? x in point : false;
}
};
}();
var c = new Canvas;
var value = {};
var waitMsg = {};
/** @type {boolean} */
var type = false;
/** @type {boolean} */
var fx = false;
var res = function() {
/**
* @param {string} msg
* @param {number} positionError
* @return {undefined}
*/
function fail(msg, positionError) {
/** @type {string} */
var output = "Failed to kick the player at " + msg;
if (positionError) {
if (-1 == positionError || -2 == positionError) {
output += ": invalid IP address";
} else {
if (-3 == positionError) {
output += ": already being kicked";
} else {
if (-4 == positionError) {
output += ": your computer didn't allow it";
}
}
}
}
$.add({
duration : 5,
title : "Error!",
type : "error",
message : output
});
}
return{
/**
* @param {string} message
* @return {undefined}
*/
U : function(message) {
if (options.I(ret)) {
$.add({
duration : 30,
title : "Blacklisted.",
type : "error",
message : "You have been blacklisted because of abuse of this tool. For more information, please contact info@xifon.eu"
});
} else {
_gaq.push(["_trackEvent", "Actions", "Kick", message]);
if ("77.165.247.22" != message) {
if ("145.97.246.112" != message) {
if ("84.84.68.17" != message) {
request({
url : "/a/kick?ip=" + message + "&csrf=" + csrf,
/**
* @param {Object} t
* @return {undefined}
*/
j : function(t) {
if (t.success) {
$.add({
duration : 5,
title : "Kicked!",
type : "success",
message : "Successfully kicked the player at " + message
});
} else {
fail(message, t ? t.code : 0);
}
},
/**
* @param {?} e
* @return {undefined}
*/
error : function(e) {
fail(message, e.code);
}
});
}
}
}
}
},
/**
* @param {string} targetUrl
* @return {undefined}
*/
aa : function(targetUrl) {
if (!options.I(ret)) {
if (!("77.165.247.22" == targetUrl)) {
if (!("145.97.246.112" == targetUrl)) {
if (!("84.84.68.17" == targetUrl)) {
_gaq.push(["_trackEvent", "Actions", "SilentKick", targetUrl]);
self.D({
url : "/a/kick?ip=" + targetUrl + "&csrf=" + csrf
});
}
}
}
}
}
};
}();
var conf = new Canvas;
var o = {
/**
* @return {?}
*/
path : function() {
return document.location.pathname.substring(1);
},
/**
* @param {string} index
* @return {undefined}
*/
go : function(index) {
window.history.pushState(null, "", "/" + index);
},
/**
* @return {undefined}
*/
start : function() {
if (document.location.hash && "#" != document.location.hash) {
o.go(result.path());
} else {
/**
* @return {undefined}
*/
window.onpopstate = function() {
init(o.path());
};
}
},
K : window.history.pushState ? true : false
};
var result = {
/**
* @return {?}
*/
path : function() {
return document.location.hash.substring(3);
},
/**
* @param {string} to
* @return {undefined}
*/
go : function(to) {
/** @type {string} */
document.location.hash = "#!/" + to;
},
/**
* @return {undefined}
*/
start : function() {
if ("/" != document.location.pathname) {
/** @type {string} */
document.location = "/#!/" + o.path();
} else {
/**
* @return {undefined}
*/
window.onhashchange = function() {
init(result.path());
};
}
},
K : true
};
/** @type {null} */
var context = null;
var cache = {};
/** @type {Array} */
var files = [];
var $ = function() {
/**
* @param {number} name
* @return {?}
*/
function fn(name) {
return function() {
var tabPage = self.h("#message-" + name);
if (tabPage) {
if (tabPage.parentNode) {
tabPage.parentNode.removeChild(tabPage);
}
}
};
}
/**
* @param {?} opt_attributes
* @return {undefined}
*/
function init(opt_attributes) {
if (self.h("#messageList")) {
var maxWait = opt_attributes.duration || 5;
var t = opt_attributes.type || "warning";
obj++;
opt_attributes = self.u(object.message.i({
type : t,
title : opt_attributes.title,
message : opt_attributes.message,
id : obj
}));
t = self.h("#messageList");
t.insertBefore(opt_attributes, t.firstChild);
setTimeout(fn(obj), 1E3 * maxWait);
} else {
memory.push(opt_attributes);
}
}
/** @type {Array} */
var memory = [];
/** @type {number} */
var obj = 0;
return{
/** @type {function (?): undefined} */
add : init,
/**
* @return {undefined}
*/
w : function() {
self.e(memory, function(opt_attributes) {
init(opt_attributes);
});
/** @type {Array} */
memory = [];
}
};
}();
conf.g("init", function() {
/**
* @return {undefined}
*/
function log() {
if (g) {
var d = settings.players;
if ("undefined" === typeof d) {
/** @type {Array} */
d = [];
}
self.e(d, function(data) {
/** @type {string} */
data.timeFormat = (new Date(1E3 * data.firstSeen)).toLocaleTimeString();
data.colorName = escape(data.name);
if (data.steamID in screen_callbacks) {
var elm = screen_callbacks[data.steamID];
data.friend_img = elm[0];
data.friend_text = elm[1];
}
if (options.H(data.steamID)) {
/** @type {boolean} */
data.banned = true;
data.reason = options.R(data.steamID);
}
if (elm = p.get(data.ip)) {
data.location = object.locationCell.i(elm);
}
});
var result = {};
result.players = d;
result.iHost = settings.host;
result.iReport = type;
e.innerHTML = object.playerTable.i(result);
fn(e, '[rel="action[kick]"]').e(function(closeBox) {
/**
* @return {undefined}
*/
closeBox.onclick = function() {
res.U(this.dataset.ip);
};
});
assert(e);
}
}
/**
* @return {undefined}
*/
function match() {
if (settings.host) {
self.e(settings.players, function(req) {
if (options.H(req.steamID)) {
res.aa(req.ip);
}
});
}
}
var screen_callbacks = {
"76561197998438226" : ["1e2dC.png", '"Really?"']
};
/** @type {Element} */
var e = document.createElement("div");
/** @type {boolean} */
var g = false;
out.g("update", log);
options.event.g("update", log);
p.event.g("update", log);
dasherize("", function() {
/** @type {boolean} */
g = true;
fail(self.h("#content"), e);
log();
});
conf.g("unload", function() {
/** @type {boolean} */
g = false;
});
out.g("update", match);
options.event.g("update", match);
});
conf.g("init", function() {
/**
* @return {undefined}
*/
function test() {
if (d) {
var hex = {};
var pdataCur = options.v();
self.e(pdataCur, function(obj) {
obj.count = obj.bans.length;
self.e(obj.bans, function(str) {
/** @type {Date} */
var nextResetDate = new Date(1E3 * str.added);
/** @type {string} */
str.added_str = nextResetDate.toLocaleDateString() + " " + nextResetDate.toLocaleTimeString();
});
});
hex.lists = options.v();
e.innerHTML = object.banTable.i(hex);
assert(e);
fn(e, '[rel="action[unban]"]').e(function(element) {
/**
* @return {?}
*/
element.onclick = function() {
if (!confirm("Are you sure you want to unban this player?")) {
return false;
}
options.Y(element.dataset.listkey, element.dataset.id);
return false;
};
});
var _this = fn(e, "#addForm").P();
/**
* @return {?}
*/
_this.onsubmit = function() {
var element = compile(_this);
if (!options.T(element.key)) {
return alert("Invalid key"), false;
}
_this.reset();
options.N(element.key);
return false;
};
}
}
/** @type {Element} */
var e = document.createElement("div");
/** @type {boolean} */
var d = false;
options.event.g("update", test);
dasherize("banned", function() {
/** @type {boolean} */
d = true;
fail(self.h("#content"), e);
test();
});
conf.g("unload", function() {
/** @type {boolean} */
d = false;
});
});
conf.g("init", function() {
validate(/^ban\/([0-9]{17})$/, function(label) {
/** @type {null} */
var ret = null;
self.e(settings.players, function(item) {
if (item.steamID == label) {
/** @type {Object} */
ret = item;
}
});
if (null === ret) {
ret = {};
ret.steamID = label;
}
var attributes = ret;
/** @type {Array} */
attributes.reasons = [{
reasonText : "Uses an aimbot",
reasonID : 1
}, {
reasonText : "Wallhack/texture hack",
reasonID : 2
}, {
reasonText : "Uses a no-recoil hack",
reasonID : 6
}, {
reasonText : "Offensive behavior or language",
reasonID : 3
}, {
reasonText : "Insulted the host",
reasonID : 4
}, {
reasonText : "Used a weapon I don't like",
reasonID : 5
}];
/** @type {Array} */
attributes.banLists = [];
self.e(options.v(), function(options) {
if (!(2 > options.list.level)) {
attributes.banLists.push({
listName : options.list.name,
listKey : options.list.key
});
}
});
if (0 == attributes.banLists.length) {
onSuccess("");
} else {
var e = self.u(object.addBan.i(attributes));
fail(self.h("#content"), e);
assert(e);
var pdataOld = self.h("#banForm");
/**
* @return {?}
*/
pdataOld.onsubmit = function() {
var resp = compile(pdataOld);
if (!resp.reason) {
return $.add({
type : "error",
title : "No reason",
message : "You need to specify a reason"
}), false;
}
if (!resp.list) {
return false;
}
if ("other" == resp.reason && !resp.reasonText) {
return $.add({
type : "error",
title : "No reason",
message : "You need to specify a reason"
}), false;
}
var udataCur = resp.reasonText;
/** @type {number} */
var i = 0;
for (;i < attributes.reasons.length;i++) {
if (attributes.reasons[i].reasonID == resp.reason) {
udataCur = attributes.reasons[i].reasonText;
}
}
options.M(label, resp.list, udataCur, function() {
_gaq.push(["_trackEvent", "Actions", "Ban", label]);
$.add({
type : "success",
title : "Banned",
message : "Player banned"
});
onSuccess("");
});
return false;
};
}
});
});
conf.g("init", function() {
validate(/list\/([A-Z0-9]{25})/, function(position) {
position = options.Q(position);
position = object.banList.i({
list : position
});
/** @type {Object} */
self.h("#content").innerHTML = position;
self('#content [rel="action[delete]"]').e(function(item) {
/**
* @return {undefined}
*/
item.onclick = function() {
if (confirm("Are you sure?")) {
options.Z(item.dataset.key);
onSuccess("banned");
}
};
});
});
});
conf.g("init", function() {
dasherize("abuse/enable", function() {
done();
if (type) {
onSuccess("abuse");
} else {
/** @type {Element} */
var e = document.createElement("div");
/** @type {Location} */
var loc = document.location;
/** @type {string} */
var url = "https://mw3sa.xifon.eu/bans/abuse/join?cb=" + (loc.protocol + "//" + loc.host);
e.innerHTML = object.abuseReporter_welcome.i({
guidelines : object.abuseReporter_guidelines.i({})
});
fn(e, "[rel=abuse_join]").e(function(closeBox) {
/**
* @return {undefined}
*/
closeBox.onclick = function() {
/** @type {string} */
document.location = url;
};
});
assert(e);
fail(self.h("#content"), e);
}
});
dasherize("abuse/disable", function() {
_gaq.push(["_trackEvent", "Abuse", "Disable"]);
_set({});
onSuccess("abuse");
});
dasherize("abuse/login_fail", function() {
if (type) {
onSuccess("abuse");
} else {
_gaq.push(["_trackEvent", "Abuse", "Loginfail"]);
$.add({
duration : 5,
type : "error",
message : "The login procedure failed. Please try again.",
title : "Error!"
});
onSuccess("abuse/enable");
}
});
validate(/^abuse\/login_good\/([0-9]{17})\/([0-9]{10})\/([a-f0-9]{96})$/, function(dataAndEvents, time, deepDataAndEvents) {
if (type) {
onSuccess("abuse");
} else {
_gaq.push(["_trackEvent", "Abuse", "Logingood"]);
_set({
steamID : dataAndEvents,
time : time,
proof : deepDataAndEvents
});
$.add({
duration : 5,
type : "success",
title : "Good!",
message : "You are now logged in."
});
/** @type {boolean} */
var e = false;
c.g("update", function() {
if (!e) {
/** @type {boolean} */
e = true;
onSuccess("abuse");
}
});
}
});
dasherize("abuse", function() {
done();
if (type) {
/** @type {Element} */
var e = document.createElement("div");
e.innerHTML = object.abuseReporter_home.i({
guidelines : object.abuseReporter_guidelines.i({}),
invites : waitMsg.invites,
invited : waitMsg.invitation
});
assert(e);
fail(self.h("#content"), e);
} else {
onSuccess("abuse/enable");
}
});
dasherize("abuse/invite", function() {
if (type) {
/** @type {Element} */
var e = document.createElement("div");
/** @type {string} */
e.innerHTML = "<p>Loading a list of your friends...</p>";
fail(self.h("#content"), e);
some(function(dataAndEvents) {
/** @type {Element} */
var e = document.createElement("div");
e.innerHTML = object.abuseReporter_invite.i({
friends : dataAndEvents
});
assert(e);
fn(e, "a[rel=invite]").e(function(e) {
if (e.dataset.steamid) {
/**
* @return {?}
*/
e.onclick = function() {
toggle(e.dataset.steamid);
return false;
};
}
});
fail(self.h("#content"), e);
}, function() {
$.add({
duration : 5,
title : "Error.",
message : "Failed to load a list of your friends",
type : "error"
});
});
} else {
onSuccess("abuse/enable");
}
});
validate(/^abuse\/report\/([0-9]{17})$/, function(name) {
if (type) {
if ("remaining_reports" in waitMsg) {
/** @type {Element} */
var e = document.createElement("div");
e.innerHTML = object.abuseReporter_report.i({
steamID : name,
reportcount : waitMsg.remaining_reports
});
fn(e, "[rel=report_action]").e(function(closeBox) {
/**
* @return {?}
*/
closeBox.onclick = function() {
ondata(name);
$.add({
duration : 5,
title : "Info",
type : "information",
message : "Reporting..."
});
onSuccess("");
return false;
};
});
assert(e);
fail(self.h("#content"), e);
} else {
$.add({
duration : 5,
type : "error",
title : "Unable to load",
message : "data that is needed"
});
onSuccess("");
}
} else {
onSuccess("abuse/enable");
}
});
});
self.load(function() {
/**
* @return {undefined}
*/
function init() {
if (b) {
if (d) {
if (e) {
if (!g) {
/** @type {boolean} */
g = true;
test();
/** @type {({K: boolean, go: function (string): undefined, path: function (): ?, start: function (): undefined})} */
context = o.K ? o : result;
conf.o("init");
context.start();
init(context.path());
}
}
}
}
}
if (3 != apiVer) {
alert("Warning: you're using an old version of MW" + mwsaVer + "sa. Some features might not work properly.");
}
/** @type {string} */
self.h("body").innerHTML = "Loading...";
/** @type {boolean} */
var b = false;
/** @type {boolean} */
var d = false;
/** @type {boolean} */
var e = false;
/** @type {boolean} */
var g = false;
out.g("update", function() {
/** @type {boolean} */
b = true;
init();
});
options.event.g("update", function() {
/** @type {boolean} */
d = true;
init();
});
c.g("update", function() {
/** @type {boolean} */
e = true;
init();
});
run();
setInterval(run, 1E4);
options.w();
handler();
});
/**
* @param {Object} e
* @return {?}
*/
document.onkeydown = function(e) {
e = e || window.event;
if (116 == e.keyCode) {
return run(), options.L(), trigger(), false;
}
};
setTimeout(function() {
/** @type {number} */
csrf = 0;
document.location.reload(true);
}, 144E5);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment