add local scope wrappers to new default scripts

This commit is contained in:
Andrew Meadows 2016-08-25 09:04:06 -07:00
parent fefe5e30ec
commit a0911d2b9d
2 changed files with 9 additions and 0 deletions
scripts/system

View file

@ -8,6 +8,8 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function() { // BEGIN LOCAL_SCOPE
/* global WebTablet */
Script.include("../libraries/WebTablet.js");
@ -100,3 +102,5 @@ Script.scriptEnding.connect(function () {
browseExamplesButton.clicked.disconnect(onClick);
marketplaceWindow.visibleChanged.disconnect(onMarketplaceWindowVisibilityChanged);
});
}()); // END LOCAL_SCOPE

View file

@ -7,6 +7,9 @@
// Distributed under the Apache License, Version 2.0
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
(function() { // BEGIN LOCAL_SCOPE
var SNAPSHOT_DELAY = 500; // 500ms
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
var resetOverlays;
@ -152,3 +155,5 @@ Script.scriptEnding.connect(function () {
button.clicked.disconnect(onClicked);
Window.snapshotShared.disconnect(snapshotShared);
});
}()); // END LOCAL_SCOPE