diff --git a/js/HuesCanvas.js b/js/HuesCanvas.js index 5f593dd..e155ade 100644 --- a/js/HuesCanvas.js +++ b/js/HuesCanvas.js @@ -20,10 +20,12 @@ * THE SOFTWARE. */ +(function(window, document) { +"use strict"; + /* Takes an element name to attach to, and an audio context element for getting the current time with reasonable accuracy */ function HuesCanvas(element, audioContext, core) { - 'use strict'; this.audio = audioContext; core.addEventListener("newimage", this.setImage.bind(this)); core.addEventListener("newcolour", this.setColour.bind(this)); @@ -549,4 +551,8 @@ HuesCanvas.prototype.drawSnow = function() { } } this.lastSnow = this.audio.currentTime; -}; \ No newline at end of file +}; + +window.HuesCanvas = HuesCanvas; + +})(window, document); \ No newline at end of file diff --git a/js/HuesCore.js b/js/HuesCore.js index 06d7b5f..f153642 100644 --- a/js/HuesCore.js +++ b/js/HuesCore.js @@ -22,6 +22,9 @@ /* We don't want localstorage variables 'optimised' to different identifiers*/ /*jshint -W069 */ +(function(window, document) { +"use strict"; + function HuesCore(defaults) { // Bunch-o-initialisers this.version = "0x0B"; @@ -1061,4 +1064,8 @@ HuesCore.prototype.weedColours = {'c': 0x8B008B, 'n': 'Darkmagenta'}, {'c': 0xB62084, 'n': "Harold's Crayon"}, {'c': 0x694489, 'n': 'Purple Rain'}, - {'c': 0xFFD700, 'n': 'Gold'}]; \ No newline at end of file + {'c': 0xFFD700, 'n': 'Gold'}]; + +window.HuesCore = HuesCore; + +})(window, document); \ No newline at end of file diff --git a/js/HuesInfo.js b/js/HuesInfo.js index 33f732b..81b69fc 100644 --- a/js/HuesInfo.js +++ b/js/HuesInfo.js @@ -19,8 +19,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ - - + +(function(window, document) { +"use strict"; + /* HuesInfo.js populates the beat glossary, shortcut list, and version string. * This means the HTML should rarely need to be updated. * If the element IDs are not present, the DOM is not modified. If you would @@ -99,4 +101,8 @@ var addInfo = function(titleText, list) { listElem.appendChild(item); }); info.appendChild(listElem); -}; \ No newline at end of file +}; + +window.populateHuesInfo = populateHuesInfo; + +})(window, document); \ No newline at end of file diff --git a/js/HuesSettings.js b/js/HuesSettings.js index b7093fb..c1fcfb4 100644 --- a/js/HuesSettings.js +++ b/js/HuesSettings.js @@ -20,6 +20,9 @@ * THE SOFTWARE. */ + (function(window, document) { +"use strict"; + /* If you're modifying settings for your hues, DON'T EDIT THIS - Go to the HTML and edit the `defaults` object instead! */ @@ -404,4 +407,8 @@ HuesSettings.prototype.setDefaults = function() { localStorage[attr] = this.defaults[attr]; } } -}; \ No newline at end of file +}; + +window.HuesSettings = HuesSettings; + +})(window, document); \ No newline at end of file diff --git a/js/HuesUI.js b/js/HuesUI.js index 146d617..a844cab 100644 --- a/js/HuesUI.js +++ b/js/HuesUI.js @@ -19,6 +19,9 @@ * THE SOFTWARE. */ + (function(window, document) { +"use strict"; + /* Base UI Class for Hues display. Parent is an element to put all your own elements under, but make a div @@ -1133,4 +1136,12 @@ var xbottom = [ {"angle": 17.6989154099, "x": 2540.2, "y": 28.5}, {"angle": -18.378894807, "x": 2627.55, "y": 24.9}, {"angle": -4.561224264, "x": 2710.4, "y": 14.4} -]; \ No newline at end of file +]; + +window.RetroUI = RetroUI; +window.WeedUI = WeedUI; +window.ModernUI = ModernUI; +window.XmasUI = XmasUI; +window.HalloweenUI = HalloweenUI; + +})(window, document); \ No newline at end of file diff --git a/js/ResourceManager.js b/js/ResourceManager.js index e2b95d9..f68bf09 100644 --- a/js/ResourceManager.js +++ b/js/ResourceManager.js @@ -19,6 +19,9 @@ * THE SOFTWARE. */ + (function(window, document) { +"use strict"; + // NOTE: Any packs referenced need CORS enabled or loads fail var packsURL = "http://cdn.0x40hu.es/getRespacks.php"; @@ -842,4 +845,8 @@ Resources.prototype.appendSimpleListItem = function(value, root, onclick) { div.appendChild(label); root.appendChild(div); return label; -}; \ No newline at end of file +}; + +window.Resources = Resources; + +})(window, document); \ No newline at end of file diff --git a/js/SoundManager.js b/js/SoundManager.js index e8f26f0..adb125c 100644 --- a/js/SoundManager.js +++ b/js/SoundManager.js @@ -19,6 +19,9 @@ * THE SOFTWARE. */ +(function(window, document) { +"use strict"; + // Flash value var LAME_DELAY_START = 2258; var LAME_DELAY_END = 0; @@ -485,3 +488,7 @@ SoundManager.prototype.fadeOut = function(callback) { } setTimeout(callback, 2000); } + +window.SoundManager = SoundManager; + +})(window, document); \ No newline at end of file