Skip to content

Commit

Permalink
Save a few lines of unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSmith-LT committed May 2, 2022
1 parent 4dd72a5 commit 7f02e67
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -4495,17 +4495,14 @@ return parent; })(jQuery, XENITH || {});
var XENITH = (function ($, parent) { var self = parent.GLOBALVARS = {};

var replaceGlobalVars = function (tempText) {
var regExp = new RegExp('\\{(.*?)\\}', 'g');

var matches = tempText.match(regExp);
var matches = tempText.match(/\{(.*?)\}/g);
if (matches != null) {
for (var m=0; m<matches.length; m++) {
try {
tempText = tempText.replace(matches[m], '<span class="x_globalVar">' + eval(matches[m]) + '</span>');
} catch (e){}
}
}

return tempText;
};

Expand Down

0 comments on commit 7f02e67

Please sign in to comment.