// loadSupportApp.js // // Copyright 2018 High Fidelity Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // (function(){ var url = Script.resolvePath("./support.js"); var SupportItem = function() { }; SupportItem.prototype = { preload: function(entityID) { var scriptList = ScriptDiscoveryService.getRunning(); var index = scriptList.indexOf(url); if (index === -1) { ScriptDiscoveryService.loadScript(url); } }, unload: function() { ScriptDiscoveryService.stopScript(url); } }; return new SupportItem(); });