-/**
-* Suppresses console.log
-* @param {Boolean} debug Whether to re-enable console.log or not
-*/
-function manageDebug(debug) {
- var log, consoleBackUp;
- if (window.console) {
- consoleBackUp = window.console.log;
- window.console.log = function () {
- if (debug) {
- consoleBackUp.apply(console, arguments);
- }
- };
- } else {
- log = window.opera ? window.opera.postError : alert;
- window.console = {};
- window.console.log = function (str) {
- if (debug) {
- log(str);
- }
- };
- }
-}
-
/**
* Generate a random string of given length
* @param {Number} string_length The length of the random string
// Did we find anything or does the word it refers to non-existant?
if (!num || !words[num[1]]) continue;
-
+
if (num[2] === '+' && num[3]) {
// Add X number of words
compiled = compiled.concat(words.slice(parseInt(num[1], 10), parseInt(num[1], 10) + parseInt(num[3], 10)));
if (this.aliases[words[0]]) {
words = this.processInput(words);
-
+
if (this.aliases[words[0]]) {
words = this.process(words.join(' ')).split(' ');
}
\r
\r
\r
- \r
+\r
<script type="text/html" id="tmpl_userbox">\r
<div class="userbox">\r
<a class="if_op op"><i class="icon-star"></i><%= op %></a>\r
<a class="slap"><i class="icon-user-md"></i><%= slap %></a>\r
</div>\r
</script>\r
- \r
+\r
<script type="text/html" id="tmpl_nickchange">\r
<form class="nickchange">\r
<label for="nickchange"><%= new_nick %>:</label> <input type="text" mozactionhint="done" autocomplete="off" spellcheck="false"/> <button><%= change %></button> <a class="cancel"><%= cancel %></a>\r
(function(a,b,c){typeof c["module"]!="undefined"&&c.module.exports?c.module.exports=b():typeof c["define"]!="undefined"&&c["define"]=="function"&&c.define.amd?define(a,b):c[a]=b()})("$script",function(){function p(a,b){for(var c=0,d=a.length;c<d;++c)if(!b(a[c]))return j;return 1}function q(a,b){p(a,function(a){return!b(a)})}function r(a,b,i){function o(a){return a.call?a():d[a]}function t(){if(!--n){d[m]=1,l&&l();for(var a in f)p(a.split("|"),o)&&!q(f[a],o)&&(f[a]=[])}}a=a[k]?a:[a];var j=b&&b.call,l=j?b:i,m=j?a.join(""):b,n=a.length;return setTimeout(function(){q(a,function(a){if(h[a])return m&&(e[m]=1),h[a]==2&&t();h[a]=1,m&&(e[m]=1),s(!c.test(a)&&g?g+a+".js":a,t)})},0),r}function s(c,d){var e=a.createElement("script"),f=j;e.onload=e.onerror=e[o]=function(){if(e[m]&&!/^c|loade/.test(e[m])||f)return;e.onload=e[o]=null,f=1,h[c]=2,d()},e.async=1,e.src=c,b.insertBefore(e,b.firstChild)}var a=document,b=a.getElementsByTagName("head")[0],c=/^https?:\/\//,d={},e={},f={},g,h={},i="string",j=!1,k="push",l="DOMContentLoaded",m="readyState",n="addEventListener",o="onreadystatechange";return!a[m]&&a[n]&&(a[n](l,function t(){a.removeEventListener(l,t,j),a[m]="complete"},j),a[m]="loading"),r.get=s,r.order=function(a,b,c){(function d(e){e=a.shift(),a.length?r(e,d):r(e,b,c)})()},r.path=function(a){g=a},r.ready=function(a,b,c){a=a[k]?a:[a];var e=[];return!q(a,function(a){d[a]||e[k](a)})&&p(a,function(a){return d[a]})?b():!function(a){f[a]=f[a]||[],f[a][k](b),c&&c(e)}(a.join("|")),r},r},this)\r
\r
\r
+ // Avoid `console` errors in browsers that lack a console. (https://github.com/h5bp/html5-boilerplate)\r
+ function normalizeConsole() {\r
+ var method;\r
+ var noop = function () {};\r
+ var methods = [\r
+ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',\r
+ 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',\r
+ 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',\r
+ 'timeStamp', 'trace', 'warn'\r
+ ];\r
+ var length = methods.length;\r
+ var console = (window.console = window.console || {});\r
+\r
+ while (length--) {\r
+ method = methods[length];\r
+\r
+ // Only stub undefined methods.\r
+ if (!console[method]) {\r
+ console[method] = noop;\r
+ }\r
+ }\r
+ };\r
+\r
function getQueryVariable(variable) {\r
var query = window.location.search.substring(1);\r
var vars = query.split('&');\r
base_path: base_path\r
};\r
\r
+ normalizeConsole();\r
+\r
// Run after all dependancies have been loaded\r
function startApp () {\r
// Start the app\r
to_load.push(base + scripts[cur_script][idx]);\r
}\r
}\r
- \r
+\r
$script(to_load, loadNextScript);\r
\r
cur_script++;\r