diff --git a/bower.json b/bower.json index fe3c9c6a30..ad1dbf82ea 100644 --- a/bower.json +++ b/bower.json @@ -25,7 +25,7 @@ "font-awesome": "~4.3.0", "moment": "~2.10.2", "angular-bootstrap": "~0.13.0", - "jshint": "~2.7.0", + "jshint": "~2.9.0", "lightbox2": "~2.8.1", "rxjs": "~4.0.6", "CodeMirror": "~5.8.0", diff --git a/client/commonFramework.js b/client/commonFramework.js index b5a80bc2f0..e717d4d012 100644 --- a/client/commonFramework.js +++ b/client/commonFramework.js @@ -1,371 +1,5 @@ -var common = (function() { - // common namespace - // all classes should be stored here - var common = window.common || { - // init is an array of functions that are - // called at the beginning of dom ready - init: [] - }; +var common = window.common || { init: [] }; - common.challengeName = common.challengeName || window.challenge_Name || ''; - - common.challengeType = common.challengeType || window.challengeType || 0; - - common.challengeId = common.challengeId || window.challenge_Id; - - common.challengeSeed = common.challengeSeed || window.challengeSeed || []; - - common.head = common.head || ''; - common.tail = common.tail || ''; - - common.arrayToNewLineString = function arrayToNewLineString(seedData) { - seedData = Array.isArray(seedData) ? seedData : [seedData]; - return seedData.reduce(function(seed, line) { - return '' + seed + line + '\n'; - }, ''); - }; - - common.seed = common.arrayToNewLineString(common.challengeSeed); - - common.replaceScriptTags = function replaceScriptTags(value) { - return value - .replace(/'); - }; - - common.replaceFormActionAttr = function replaceFormAction(value) { - return value.replace(/