From 0c88aeab0e15b87bcd2dcdaa11352e311a5d10cd Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Thu, 20 Nov 2014 18:27:27 +0100 Subject: [PATCH] Use strict javascript globally. --- .jshint | 3 ++- src/i18n/helpers/languages.py | 1 + static/js/app.js | 2 ++ static/js/base.js | 5 +++-- static/js/controllers/chatroomcontroller.js | 2 ++ static/js/controllers/contactsmanagercontroller.js | 2 ++ static/js/controllers/contactsmanagereditcontroller.js | 2 ++ static/js/controllers/controllers.js | 2 ++ static/js/controllers/mediastreamcontroller.js | 2 ++ static/js/controllers/roomchangecontroller.js | 2 ++ static/js/controllers/statusmessagecontroller.js | 2 ++ static/js/controllers/usersettingscontroller.js | 2 ++ static/js/directives/audiolevel.js | 2 ++ static/js/directives/audiovideo.js | 2 ++ static/js/directives/bfi.js | 2 ++ static/js/directives/buddylist.js | 2 ++ static/js/directives/buddypicturecapture.js | 2 ++ static/js/directives/buddypictureupload.js | 2 ++ static/js/directives/chat.js | 2 ++ static/js/directives/contactrequest.js | 2 ++ static/js/directives/defaultdialog.js | 2 ++ static/js/directives/directives.js | 2 ++ static/js/directives/fileinfo.js | 2 ++ static/js/directives/odfcanvas.js | 2 ++ static/js/directives/onenter.js | 2 ++ static/js/directives/onescape.js | 2 ++ static/js/directives/page.js | 2 ++ static/js/directives/pdfcanvas.js | 2 ++ static/js/directives/presentation.js | 2 ++ static/js/directives/roombar.js | 2 ++ static/js/directives/screenshare.js | 2 ++ static/js/directives/settings.js | 2 ++ static/js/directives/socialshare.js | 2 ++ static/js/directives/statusmessage.js | 2 ++ static/js/directives/title.js | 2 ++ static/js/directives/usability.js | 2 ++ static/js/directives/youtubevideo.js | 2 ++ static/js/filters/buddyimagesrc.js | 2 ++ static/js/filters/displayconference.js | 2 ++ static/js/filters/displayname.js | 2 ++ static/js/filters/displaynameforsession.js | 2 ++ static/js/filters/displayuserid.js | 2 ++ static/js/filters/filters.js | 2 ++ static/js/filters/formatbase1000.js | 2 ++ static/js/main.js | 2 ++ static/js/mediastream/api.js | 2 ++ static/js/mediastream/connector.js | 2 ++ static/js/mediastream/peercall.js | 2 ++ static/js/mediastream/peerconference.js | 2 ++ static/js/mediastream/peerconnection.js | 2 ++ static/js/mediastream/peerscreenshare.js | 2 ++ static/js/mediastream/peerxfer.js | 2 ++ static/js/mediastream/tokens.js | 2 ++ static/js/mediastream/usermedia.js | 2 ++ static/js/mediastream/utils.js | 2 ++ static/js/mediastream/webrtc.js | 2 ++ static/js/services/alertify.js | 2 ++ static/js/services/animationframe.js | 2 ++ static/js/services/api.js | 2 ++ static/js/services/appdata.js | 2 ++ static/js/services/buddydata.js | 2 ++ static/js/services/buddylist.js | 2 ++ static/js/services/buddypicture.js | 1 + static/js/services/buddysession.js | 2 ++ static/js/services/chromeextension.js | 2 ++ static/js/services/connector.js | 2 ++ static/js/services/constraints.js | 2 ++ static/js/services/contactdata.js | 2 ++ static/js/services/contacts.js | 2 ++ static/js/services/continueconnector.js | 2 ++ static/js/services/desktopnotify.js | 2 ++ static/js/services/dialogs.js | 2 ++ static/js/services/enrichmessage.js | 2 ++ static/js/services/fastscroll.js | 2 ++ static/js/services/filedata.js | 2 ++ static/js/services/filedownload.js | 2 ++ static/js/services/filetransfer.js | 2 ++ static/js/services/fileupload.js | 2 ++ static/js/services/geolocation.js | 2 ++ static/js/services/localstatus.js | 2 ++ static/js/services/localstorage.js | 2 ++ static/js/services/mediasources.js | 2 ++ static/js/services/mediastream.js | 2 ++ static/js/services/playsound.js | 2 ++ static/js/services/randomgen.js | 2 ++ static/js/services/resturl.js | 2 ++ static/js/services/roompin.js | 2 ++ static/js/services/rooms.js | 2 ++ static/js/services/safeapply.js | 2 ++ static/js/services/safedisplayname.js | 2 ++ static/js/services/safemessage.js | 2 ++ static/js/services/screensharing.js | 2 ++ static/js/services/services.js | 2 ++ static/js/services/toastr.js | 2 ++ static/js/services/translation.js | 2 ++ static/js/services/usersettingsdata.js | 2 ++ static/js/services/videolayout.js | 2 ++ static/js/services/videowaiter.js | 2 ++ static/js/services/visibility.js | 2 ++ static/js/services/webrtc.js | 2 ++ static/translation/languages.js | 1 + 101 files changed, 200 insertions(+), 3 deletions(-) diff --git a/.jshint b/.jshint index 17a9f28a..d7d8c42e 100644 --- a/.jshint +++ b/.jshint @@ -22,7 +22,8 @@ "smarttabs": true, "trailing": true, "undef": true, - "unused": false // Disabled for now + "unused": false, // Disabled for now + "globalstrict": true } diff --git a/src/i18n/helpers/languages.py b/src/i18n/helpers/languages.py index 1f870e33..b8c312ff 100644 --- a/src/i18n/helpers/languages.py +++ b/src/i18n/helpers/languages.py @@ -16,6 +16,7 @@ import json def main(): print """// This file is auto generated, do not modify. +"use strict"; define([], function() { return %s; });""" % json.dumps(LANGUAGES) diff --git a/static/js/app.js b/static/js/app.js index a39433cc..488e1ce6 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'require', 'jquery', diff --git a/static/js/base.js b/static/js/base.js index e52e1757..12b524d3 100644 --- a/static/js/base.js +++ b/static/js/base.js @@ -18,8 +18,9 @@ * along with this program. If not, see . * */ -// Helper module to put non dependency base libraries together. -define([ + +"use strict"; +define([ // Helper module to put non dependency base libraries together. 'modernizr', 'moment', 'Howler', diff --git a/static/js/controllers/chatroomcontroller.js b/static/js/controllers/chatroomcontroller.js index f4d16182..dea0d14b 100644 --- a/static/js/controllers/chatroomcontroller.js +++ b/static/js/controllers/chatroomcontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'moment', 'text!partials/fileinfo.html', 'text!partials/contactrequest.html', 'text!partials/geolocation.html'], function($, _, moment, templateFileInfo, templateContactRequest, templateGeolocation) { // ChatroomController diff --git a/static/js/controllers/contactsmanagercontroller.js b/static/js/controllers/contactsmanagercontroller.js index b6ffbf23..c5bae123 100644 --- a/static/js/controllers/contactsmanagercontroller.js +++ b/static/js/controllers/contactsmanagercontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // ContactsmanagerController diff --git a/static/js/controllers/contactsmanagereditcontroller.js b/static/js/controllers/contactsmanagereditcontroller.js index cc4b01bb..214dad69 100644 --- a/static/js/controllers/contactsmanagereditcontroller.js +++ b/static/js/controllers/contactsmanagereditcontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // ContactsmanagereditController diff --git a/static/js/controllers/controllers.js b/static/js/controllers/controllers.js index e0d385d2..099ce823 100644 --- a/static/js/controllers/controllers.js +++ b/static/js/controllers/controllers.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'underscore', diff --git a/static/js/controllers/mediastreamcontroller.js b/static/js/controllers/mediastreamcontroller.js index 0ada8db2..22994fc5 100644 --- a/static/js/controllers/mediastreamcontroller.js +++ b/static/js/controllers/mediastreamcontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'angular', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'webrtc.adapter'], function($, _, angular, BigScreen, moment, sjcl, Modernizr) { return ["$scope", "$rootScope", "$element", "$window", "$timeout", "safeDisplayName", "safeApply", "mediaStream", "appData", "playSound", "desktopNotify", "alertify", "toastr", "translation", "fileDownload", "localStorage", "screensharing", "userSettingsData", "localStatus", "dialogs", "rooms", "constraints", function($scope, $rootScope, $element, $window, $timeout, safeDisplayName, safeApply, mediaStream, appData, playSound, desktopNotify, alertify, toastr, translation, fileDownload, localStorage, screensharing, userSettingsData, localStatus, dialogs, rooms, constraints) { diff --git a/static/js/controllers/roomchangecontroller.js b/static/js/controllers/roomchangecontroller.js index 16943cd4..a1dfc3f5 100644 --- a/static/js/controllers/roomchangecontroller.js +++ b/static/js/controllers/roomchangecontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { return ["$scope", "rooms", function($scope, rooms) { $scope.joinRoomByName = rooms.joinByName; diff --git a/static/js/controllers/statusmessagecontroller.js b/static/js/controllers/statusmessagecontroller.js index 6b7f3c37..b606189e 100644 --- a/static/js/controllers/statusmessagecontroller.js +++ b/static/js/controllers/statusmessagecontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // StatusmessageController diff --git a/static/js/controllers/usersettingscontroller.js b/static/js/controllers/usersettingscontroller.js index 2bbc5c8d..f716db16 100644 --- a/static/js/controllers/usersettingscontroller.js +++ b/static/js/controllers/usersettingscontroller.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // UsersettingsController diff --git a/static/js/directives/audiolevel.js b/static/js/directives/audiolevel.js index 0ab7de42..bfcf22cd 100644 --- a/static/js/directives/audiolevel.js +++ b/static/js/directives/audiolevel.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore'], function($, _) { return ["$window", "mediaStream", "safeApply", "animationFrame", function($window, mediaStream, safeApply, animationFrame) { diff --git a/static/js/directives/audiovideo.js b/static/js/directives/audiovideo.js index 7a3b5f5e..856df9ab 100644 --- a/static/js/directives/audiovideo.js +++ b/static/js/directives/audiovideo.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/audiovideopeer.html', 'bigscreen', 'webrtc.adapter'], function($, _, template, templatePeer, BigScreen) { return ["$window", "$compile", "$filter", "mediaStream", "safeApply", "desktopNotify", "buddyData", "videoWaiter", "videoLayout", "animationFrame", function($window, $compile, $filter, mediaStream, safeApply, desktopNotify, buddyData, videoWaiter, videoLayout, animationFrame) { diff --git a/static/js/directives/bfi.js b/static/js/directives/bfi.js index a0315059..af445851 100644 --- a/static/js/directives/bfi.js +++ b/static/js/directives/bfi.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["bootstrap-file-input"], function() { // bfi diff --git a/static/js/directives/buddylist.js b/static/js/directives/buddylist.js index eb7b523f..4f8bfd41 100644 --- a/static/js/directives/buddylist.js +++ b/static/js/directives/buddylist.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'text!partials/buddylist.html'], function(_, template) { // buddyList diff --git a/static/js/directives/buddypicturecapture.js b/static/js/directives/buddypicturecapture.js index 3a68d0ab..7d09ccce 100644 --- a/static/js/directives/buddypicturecapture.js +++ b/static/js/directives/buddypicturecapture.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/buddypicturecapture.html'], function($, _, template) { // buddyPictureCapture diff --git a/static/js/directives/buddypictureupload.js b/static/js/directives/buddypictureupload.js index a8951b42..744df141 100644 --- a/static/js/directives/buddypictureupload.js +++ b/static/js/directives/buddypictureupload.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/buddypictureupload.html'], function($, _, template) { // buddyPictureUpload diff --git a/static/js/directives/chat.js b/static/js/directives/chat.js index 489b644e..52c773e1 100644 --- a/static/js/directives/chat.js +++ b/static/js/directives/chat.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], function($, _, templateChat, templateChatroom) { return ["$compile", "safeDisplayName", "mediaStream", "safeApply", "desktopNotify", "translation", "playSound", "fileUpload", "randomGen", "buddyData", "appData", "$timeout", "geolocation", function($compile, safeDisplayName, mediaStream, safeApply, desktopNotify, translation, playSound, fileUpload, randomGen, buddyData, appData, $timeout, geolocation) { diff --git a/static/js/directives/contactrequest.js b/static/js/directives/contactrequest.js index ef5358a7..d59ea8c4 100644 --- a/static/js/directives/contactrequest.js +++ b/static/js/directives/contactrequest.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore'], function($, _) { return ["translation", "buddyData", "contacts", function(translation, buddyData, contacts) { diff --git a/static/js/directives/defaultdialog.js b/static/js/directives/defaultdialog.js index dc4379c0..14edda42 100644 --- a/static/js/directives/defaultdialog.js +++ b/static/js/directives/defaultdialog.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['text!partials/defaultdialog.html'], function(defaultDialogTemplate) { // defautlDialog diff --git a/static/js/directives/directives.js b/static/js/directives/directives.js index 5c60c194..d6c8713d 100644 --- a/static/js/directives/directives.js +++ b/static/js/directives/directives.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'underscore', diff --git a/static/js/directives/fileinfo.js b/static/js/directives/fileinfo.js index 8a862f9d..43107a2a 100644 --- a/static/js/directives/fileinfo.js +++ b/static/js/directives/fileinfo.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'moment'], function($, _, moment) { return ["fileData", "fileUpload", "fileDownload", "mediaStream", "$window", "alertify", "translation", function(fileData, fileUpload, fileDownload, mediaStream, $window, alertify, translation) { diff --git a/static/js/directives/odfcanvas.js b/static/js/directives/odfcanvas.js index 3a16fe69..7aa980fb 100644 --- a/static/js/directives/odfcanvas.js +++ b/static/js/directives/odfcanvas.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['require', 'underscore', 'jquery'], function(require, _, $) { return ["$window", "$compile", "translation", "safeApply", function($window, $compile, translation, safeApply) { diff --git a/static/js/directives/onenter.js b/static/js/directives/onenter.js index 81b3aee1..29272ce9 100644 --- a/static/js/directives/onenter.js +++ b/static/js/directives/onenter.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // onEnter diff --git a/static/js/directives/onescape.js b/static/js/directives/onescape.js index 839c75fc..3396a11f 100644 --- a/static/js/directives/onescape.js +++ b/static/js/directives/onescape.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // onEscape diff --git a/static/js/directives/page.js b/static/js/directives/page.js index 8967021a..3af2cb62 100644 --- a/static/js/directives/page.js +++ b/static/js/directives/page.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['text!partials/page.html', 'text!partials/page/welcome.html'], function(template, welcome) { return ["$templateCache", "$timeout", "rooms", function($templateCache, $timeout, rooms) { diff --git a/static/js/directives/pdfcanvas.js b/static/js/directives/pdfcanvas.js index 9e39b925..3ce31134 100644 --- a/static/js/directives/pdfcanvas.js +++ b/static/js/directives/pdfcanvas.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['require', 'underscore', 'jquery'], function(require, _, $) { return ["$window", "$compile", "translation", "safeApply", function($window, $compile, translation, safeApply) { diff --git a/static/js/directives/presentation.js b/static/js/directives/presentation.js index 3e90155d..b89e50de 100644 --- a/static/js/directives/presentation.js +++ b/static/js/directives/presentation.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'], function($, _, template, BigScreen) { return ["$window", "mediaStream", "fileUpload", "fileDownload", "alertify", "translation", "randomGen", "fileData", function($window, mediaStream, fileUpload, fileDownload, alertify, translation, randomGen, fileData) { diff --git a/static/js/directives/roombar.js b/static/js/directives/roombar.js index ebe0f90b..27918f0b 100644 --- a/static/js/directives/roombar.js +++ b/static/js/directives/roombar.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'angular', 'text!partials/roombar.html'], function(_, angular, template) { // roomBar diff --git a/static/js/directives/screenshare.js b/static/js/directives/screenshare.js index e4d2061e..4b6a598e 100644 --- a/static/js/directives/screenshare.js +++ b/static/js/directives/screenshare.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials/screensharepeer.html', 'bigscreen', 'webrtc.adapter'], function($, _, template, templatePeer, BigScreen) { return ["$window", "mediaStream", "$compile", "safeApply", "videoWaiter", "$timeout", "alertify", "translation", "screensharing", function($window, mediaStream, $compile, safeApply, videoWaiter, $timeout, alertify, translation, screensharing) { diff --git a/static/js/directives/settings.js b/static/js/directives/settings.js index 6317cae4..b2994d34 100644 --- a/static/js/directives/settings.js +++ b/static/js/directives/settings.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/settings.html'], function($, _, template) { var videoQualityMap = { diff --git a/static/js/directives/socialshare.js b/static/js/directives/socialshare.js index 9549ae30..30224a37 100644 --- a/static/js/directives/socialshare.js +++ b/static/js/directives/socialshare.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['text!partials/socialshare.html'], function(template) { var urls = { diff --git a/static/js/directives/statusmessage.js b/static/js/directives/statusmessage.js index 06edc847..ed45ee75 100644 --- a/static/js/directives/statusmessage.js +++ b/static/js/directives/statusmessage.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['text!partials/statusmessage.html'], function(template) { // statusMessage diff --git a/static/js/directives/title.js b/static/js/directives/title.js index c35ecc69..a62e5c16 100644 --- a/static/js/directives/title.js +++ b/static/js/directives/title.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { return [function() { var link = function($scope, $element, attrs) { diff --git a/static/js/directives/usability.js b/static/js/directives/usability.js index cd838173..ce6bd434 100644 --- a/static/js/directives/usability.js +++ b/static/js/directives/usability.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/usability.html'], function($, _, template) { var MEDIA_CHECK = "1" // First version of media check flag. diff --git a/static/js/directives/youtubevideo.js b/static/js/directives/youtubevideo.js index d1a767da..8e7d016f 100644 --- a/static/js/directives/youtubevideo.js +++ b/static/js/directives/youtubevideo.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'text!partials/youtubevideo.html', 'bigscreen'], function($, _, template, BigScreen) { return ["$window", "$document", "mediaStream", "alertify", "translation", "safeApply", "appData", "$q", function($window, $document, mediaStream, alertify, translation, safeApply, appData, $q) { diff --git a/static/js/filters/buddyimagesrc.js b/static/js/filters/buddyimagesrc.js index 31426e08..f1ac0d96 100644 --- a/static/js/filters/buddyimagesrc.js +++ b/static/js/filters/buddyimagesrc.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["underscore"], function(_) { // Create URLs for blobs. diff --git a/static/js/filters/displayconference.js b/static/js/filters/displayconference.js index 20dab66b..1979fe19 100644 --- a/static/js/filters/displayconference.js +++ b/static/js/filters/displayconference.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // displayConference diff --git a/static/js/filters/displayname.js b/static/js/filters/displayname.js index a3a7a27f..20003426 100644 --- a/static/js/filters/displayname.js +++ b/static/js/filters/displayname.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // displayName diff --git a/static/js/filters/displaynameforsession.js b/static/js/filters/displaynameforsession.js index 31f3a5df..bde9ebc2 100644 --- a/static/js/filters/displaynameforsession.js +++ b/static/js/filters/displaynameforsession.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery"], function($) { // displayNameForSession diff --git a/static/js/filters/displayuserid.js b/static/js/filters/displayuserid.js index 1de27423..e8c0db61 100644 --- a/static/js/filters/displayuserid.js +++ b/static/js/filters/displayuserid.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // displayUserid diff --git a/static/js/filters/filters.js b/static/js/filters/filters.js index 24c1be30..b84df186 100644 --- a/static/js/filters/filters.js +++ b/static/js/filters/filters.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'underscore', diff --git a/static/js/filters/formatbase1000.js b/static/js/filters/formatbase1000.js index 181fbe16..e675e2a5 100644 --- a/static/js/filters/formatbase1000.js +++ b/static/js/filters/formatbase1000.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // formatBase1000 diff --git a/static/js/main.js b/static/js/main.js index ad416694..92c30759 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; require.config({ waitSeconds: 300, paths: { diff --git a/static/js/mediastream/api.js b/static/js/mediastream/api.js index ca56ddf5..dd210439 100644 --- a/static/js/mediastream/api.js +++ b/static/js/mediastream/api.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'ua-parser'], function($, _, uaparser) { var alive_check_timeout = 5000; diff --git a/static/js/mediastream/connector.js b/static/js/mediastream/connector.js index 8d56c535..8ec1e757 100644 --- a/static/js/mediastream/connector.js +++ b/static/js/mediastream/connector.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore'], function($, _) { var timeout = 5000; diff --git a/static/js/mediastream/peercall.js b/static/js/mediastream/peercall.js index d7f14b38..41b2fa55 100644 --- a/static/js/mediastream/peercall.js +++ b/static/js/mediastream/peercall.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'mediastream/utils', 'mediastream/peerconnection'], function($, _, utils, PeerConnection) { var PeerCall = function(webrtc, id, from, to) { diff --git a/static/js/mediastream/peerconference.js b/static/js/mediastream/peerconference.js index fbf97bb9..0f5aa805 100644 --- a/static/js/mediastream/peerconference.js +++ b/static/js/mediastream/peerconference.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'mediastream/peercall'], function($, _, PeerCall) { //NOTE(longsleep): This id should be changed to something undeterministic. diff --git a/static/js/mediastream/peerconnection.js b/static/js/mediastream/peerconnection.js index 4cf1721f..61df5d12 100644 --- a/static/js/mediastream/peerconnection.js +++ b/static/js/mediastream/peerconnection.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'webrtc.adapter'], function($, _) { var count = 0; diff --git a/static/js/mediastream/peerscreenshare.js b/static/js/mediastream/peerscreenshare.js index 049cd016..e07897d6 100644 --- a/static/js/mediastream/peerscreenshare.js +++ b/static/js/mediastream/peerscreenshare.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'mediastream/peercall', 'mediastream/tokens'], function($, _, PeerCall, tokens) { var screenshareIds = 0; diff --git a/static/js/mediastream/peerxfer.js b/static/js/mediastream/peerxfer.js index 19fb53f9..1050e3b1 100644 --- a/static/js/mediastream/peerxfer.js +++ b/static/js/mediastream/peerxfer.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'mediastream/peercall', 'mediastream/tokens', 'webrtc.adapter'], function($, _, PeerCall, tokens) { var xfersIds = 0; diff --git a/static/js/mediastream/tokens.js b/static/js/mediastream/tokens.js index 914f6fe7..1bf48dfc 100644 --- a/static/js/mediastream/tokens.js +++ b/static/js/mediastream/tokens.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore'], function($, _) { var Token = function(handlerKey) { diff --git a/static/js/mediastream/usermedia.js b/static/js/mediastream/usermedia.js index 47207b2c..ebc7dc17 100644 --- a/static/js/mediastream/usermedia.js +++ b/static/js/mediastream/usermedia.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _, AudioContext) { // Create AudioContext singleton, if supported. diff --git a/static/js/mediastream/utils.js b/static/js/mediastream/utils.js index fa035955..36740466 100644 --- a/static/js/mediastream/utils.js +++ b/static/js/mediastream/utils.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { var Utils = function() {} diff --git a/static/js/mediastream/webrtc.js b/static/js/mediastream/webrtc.js index 7b346397..79daa2e0 100644 --- a/static/js/mediastream/webrtc.js +++ b/static/js/mediastream/webrtc.js @@ -19,6 +19,8 @@ * */ +"use strict"; + // Android detection hack - probably put this someplace else. var webrtcDetectedAndroid = ((window.navigator || {}).userAgent).match(/android (\d+)/i) !== null; diff --git a/static/js/services/alertify.js b/static/js/services/alertify.js index 897a8fe7..64113a42 100644 --- a/static/js/services/alertify.js +++ b/static/js/services/alertify.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["angular"], function(angular) { var modalController = ["$scope", "$modalInstance", "data", function($scope, $modalInstance, data) { diff --git a/static/js/services/animationframe.js b/static/js/services/animationframe.js index 6b0abe12..67b56bfc 100644 --- a/static/js/services/animationframe.js +++ b/static/js/services/animationframe.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["underscore", "rAF"], function(_) { // animationFrame diff --git a/static/js/services/api.js b/static/js/services/api.js index cadd1cb3..a1a581eb 100644 --- a/static/js/services/api.js +++ b/static/js/services/api.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'mediastream/api' ], function(Api) { diff --git a/static/js/services/appdata.js b/static/js/services/appdata.js index cfd16e2d..2f4dc11d 100644 --- a/static/js/services/appdata.js +++ b/static/js/services/appdata.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery"], function($) { // appData.e events: diff --git a/static/js/services/buddydata.js b/static/js/services/buddydata.js index 24438af3..acbecbf6 100644 --- a/static/js/services/buddydata.js +++ b/static/js/services/buddydata.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore'], function(_) { // buddyData diff --git a/static/js/services/buddylist.js b/static/js/services/buddylist.js index ab300619..a19ca9fb 100644 --- a/static/js/services/buddylist.js +++ b/static/js/services/buddylist.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'angular', 'underscore', 'modernizr', 'avltree', 'text!partials/buddy.html', 'text!partials/buddyactions.html', 'text!partials/buddyactionsforaudiomixer.html'], function($, angular, _, Modernizr, AvlTree, templateBuddy, templateBuddyActions, templateBuddyActionsForAudioMixer) { var BuddyTree = function() { diff --git a/static/js/services/buddypicture.js b/static/js/services/buddypicture.js index a4596a4b..e5738a21 100644 --- a/static/js/services/buddypicture.js +++ b/static/js/services/buddypicture.js @@ -19,6 +19,7 @@ * */ +"use strict"; define([], function() { // buddyPicture diff --git a/static/js/services/buddysession.js b/static/js/services/buddysession.js index a903e3e3..32da83d1 100644 --- a/static/js/services/buddysession.js +++ b/static/js/services/buddysession.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["underscore"], function(_) { // buddySession diff --git a/static/js/services/chromeextension.js b/static/js/services/chromeextension.js index f2ff1ec1..ae1308eb 100644 --- a/static/js/services/chromeextension.js +++ b/static/js/services/chromeextension.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["underscore", "jquery", "webrtc.adapter"], function(_, $) { // chromeExtension diff --git a/static/js/services/connector.js b/static/js/services/connector.js index e475b052..91cf5fc7 100644 --- a/static/js/services/connector.js +++ b/static/js/services/connector.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'mediastream/connector' ], function(Connector) { diff --git a/static/js/services/constraints.js b/static/js/services/constraints.js index 86a4331d..c1bbabf5 100644 --- a/static/js/services/constraints.js +++ b/static/js/services/constraints.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery", "underscore"], function($, _) { // constraints diff --git a/static/js/services/contactdata.js b/static/js/services/contactdata.js index 7ebddef2..d6daaf8a 100644 --- a/static/js/services/contactdata.js +++ b/static/js/services/contactdata.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'jquery'], function(_, $) { // contactData diff --git a/static/js/services/contacts.js b/static/js/services/contacts.js index 58c71068..8ba0dc82 100644 --- a/static/js/services/contacts.js +++ b/static/js/services/contacts.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'jquery', 'modernizr', 'sjcl', 'text!partials/contactsmanager.html', 'text!partials/contactsmanageredit.html'], function(_, $, Modernizr, sjcl, templateContactsManager, templateContactsManagerEdit) { var Database = function(name) { diff --git a/static/js/services/continueconnector.js b/static/js/services/continueconnector.js index b6c65a9b..b02b75c8 100644 --- a/static/js/services/continueconnector.js +++ b/static/js/services/continueconnector.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore'], function(_) { // Helper class to kill of old defers. diff --git a/static/js/services/desktopnotify.js b/static/js/services/desktopnotify.js index 72d88ef5..7ccdfb8f 100644 --- a/static/js/services/desktopnotify.js +++ b/static/js/services/desktopnotify.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore', 'desktop-notify'], function($, _, notify) { return ["$window", function($window) { diff --git a/static/js/services/dialogs.js b/static/js/services/dialogs.js index 65fa40fe..2328bbeb 100644 --- a/static/js/services/dialogs.js +++ b/static/js/services/dialogs.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["angular"], function(angular) { // dialogs diff --git a/static/js/services/enrichmessage.js b/static/js/services/enrichmessage.js index 58c51c35..328d394c 100644 --- a/static/js/services/enrichmessage.js +++ b/static/js/services/enrichmessage.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // enrichMessage diff --git a/static/js/services/fastscroll.js b/static/js/services/fastscroll.js index f893d641..e472268b 100644 --- a/static/js/services/fastscroll.js +++ b/static/js/services/fastscroll.js @@ -41,6 +41,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ + +"use strict"; define(["jquery"], function($) { var dispatchClick = function(coords) { diff --git a/static/js/services/filedata.js b/static/js/services/filedata.js index 5d464e22..e31eaa0b 100644 --- a/static/js/services/filedata.js +++ b/static/js/services/filedata.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery", "underscore", "sha", "webrtc.adapter"], function($, _, JsSHA) { var requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem || null; diff --git a/static/js/services/filedownload.js b/static/js/services/filedownload.js index fb2ffdde..d47b7842 100644 --- a/static/js/services/filedownload.js +++ b/static/js/services/filedownload.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery", "underscore"], function($, _) { return ["fileData", "fileTransfer", "$window", "mediaStream", "safeApply", "$timeout", function(fileData, fileTransfer, $window, mediaStream, safeApply, $timeout) { diff --git a/static/js/services/filetransfer.js b/static/js/services/filetransfer.js index cd167b59..91411893 100644 --- a/static/js/services/filetransfer.js +++ b/static/js/services/filetransfer.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["mediastream/webrtc", "webrtc.adapter"], function() { // Simple array buffer join function, to create a third array buffer diff --git a/static/js/services/fileupload.js b/static/js/services/fileupload.js index 885230d7..b593415f 100644 --- a/static/js/services/fileupload.js +++ b/static/js/services/fileupload.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery", "underscore", "webrtc.adapter"], function($, _) { // fileUpload diff --git a/static/js/services/geolocation.js b/static/js/services/geolocation.js index a39c0651..281fbcc4 100644 --- a/static/js/services/geolocation.js +++ b/static/js/services/geolocation.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'modernizr'], function(_, Modernizr) { var supported = Modernizr.geolocation; diff --git a/static/js/services/localstatus.js b/static/js/services/localstatus.js index 0fd379a1..55333972 100644 --- a/static/js/services/localstatus.js +++ b/static/js/services/localstatus.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['angular', 'underscore'], function(angular, _) { // localStatus diff --git a/static/js/services/localstorage.js b/static/js/services/localstorage.js index dbf2332f..b2955087 100644 --- a/static/js/services/localstorage.js +++ b/static/js/services/localstorage.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["modernizr"], function(Modernizr) { // localStorage diff --git a/static/js/services/mediasources.js b/static/js/services/mediasources.js index 85aae1fe..a8f33cf7 100644 --- a/static/js/services/mediasources.js +++ b/static/js/services/mediasources.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['jquery', 'underscore'], function($, _) { return ["$window", function($window) { diff --git a/static/js/services/mediastream.js b/static/js/services/mediastream.js index cef9fde8..f1ddfc5f 100644 --- a/static/js/services/mediastream.js +++ b/static/js/services/mediastream.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'jquery', 'underscore', diff --git a/static/js/services/playsound.js b/static/js/services/playsound.js index dfdb98dd..b6acd876 100644 --- a/static/js/services/playsound.js +++ b/static/js/services/playsound.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'Howler', 'require'], function(_, Howler, require) { var SoundInterval = function(sound, id, time) { diff --git a/static/js/services/randomgen.js b/static/js/services/randomgen.js index 2f4b64a5..647441a0 100644 --- a/static/js/services/randomgen.js +++ b/static/js/services/randomgen.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["underscore"], function(_) { // randomGen diff --git a/static/js/services/resturl.js b/static/js/services/resturl.js index fdc9e22d..381124c1 100644 --- a/static/js/services/resturl.js +++ b/static/js/services/resturl.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ ], function() { diff --git a/static/js/services/roompin.js b/static/js/services/roompin.js index b4490e05..3cea2c9d 100644 --- a/static/js/services/roompin.js +++ b/static/js/services/roompin.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ ], function() { diff --git a/static/js/services/rooms.js b/static/js/services/rooms.js index 5baf3d3d..4548a94f 100644 --- a/static/js/services/rooms.js +++ b/static/js/services/rooms.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'angular', 'jquery' diff --git a/static/js/services/safeapply.js b/static/js/services/safeapply.js index 6e913128..84d313ec 100644 --- a/static/js/services/safeapply.js +++ b/static/js/services/safeapply.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { return ["$rootScope", function($rootScope) { diff --git a/static/js/services/safedisplayname.js b/static/js/services/safedisplayname.js index d6e33780..ff781d95 100644 --- a/static/js/services/safedisplayname.js +++ b/static/js/services/safedisplayname.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // safeDisplayName diff --git a/static/js/services/safemessage.js b/static/js/services/safemessage.js index f5791263..b0a7e2b0 100644 --- a/static/js/services/safemessage.js +++ b/static/js/services/safemessage.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([], function() { // safeMessage diff --git a/static/js/services/screensharing.js b/static/js/services/screensharing.js index 0da8a8b7..515c5a43 100644 --- a/static/js/services/screensharing.js +++ b/static/js/services/screensharing.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['underscore', 'webrtc.adapter'], function(_) { // screensharing diff --git a/static/js/services/services.js b/static/js/services/services.js index f9065458..22569173 100644 --- a/static/js/services/services.js +++ b/static/js/services/services.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'underscore', diff --git a/static/js/services/toastr.js b/static/js/services/toastr.js index bdac009c..ba6c1217 100644 --- a/static/js/services/toastr.js +++ b/static/js/services/toastr.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['toastr'], function(toastr) { // toastr diff --git a/static/js/services/translation.js b/static/js/services/translation.js index 9c96d9ee..2641e85d 100644 --- a/static/js/services/translation.js +++ b/static/js/services/translation.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jed", "underscore"], function(Jed, _) { var TranslationScope = function(service, context, domain) { diff --git a/static/js/services/usersettingsdata.js b/static/js/services/usersettingsdata.js index c104880a..810a44f0 100644 --- a/static/js/services/usersettingsdata.js +++ b/static/js/services/usersettingsdata.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["sjcl"], function(sjcl) { // userSettingsData diff --git a/static/js/services/videolayout.js b/static/js/services/videolayout.js index a84d14cb..2b15efea 100644 --- a/static/js/services/videolayout.js +++ b/static/js/services/videolayout.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["jquery", "underscore", "modernizr", "injectCSS"], function($, _, Modernizr) { var dynamicCSSContainer = "audiovideo-dynamic"; diff --git a/static/js/services/videowaiter.js b/static/js/services/videowaiter.js index a26985a4..bb15c78c 100644 --- a/static/js/services/videowaiter.js +++ b/static/js/services/videowaiter.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(["underscore"], function(_) { return ["$window", function($window) { diff --git a/static/js/services/visibility.js b/static/js/services/visibility.js index f5041183..7296adf1 100644 --- a/static/js/services/visibility.js +++ b/static/js/services/visibility.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define(['visibly'], function(visibly) { // Visibility return [function() { diff --git a/static/js/services/webrtc.js b/static/js/services/webrtc.js index f54742d5..7b8cdd08 100644 --- a/static/js/services/webrtc.js +++ b/static/js/services/webrtc.js @@ -18,6 +18,8 @@ * along with this program. If not, see . * */ + +"use strict"; define([ 'mediastream/webrtc' ], function(WebRTC) { diff --git a/static/translation/languages.js b/static/translation/languages.js index 25aff10c..235cba1e 100644 --- a/static/translation/languages.js +++ b/static/translation/languages.js @@ -1,4 +1,5 @@ // This file is auto generated, do not modify. +"use strict"; define([], function() { return {"en": "English", "zh-tw": "\u7e41\u9ad4\u4e2d\u6587", "de": "Deutsch", "ko": "\ud55c\uad6d\uc5b4", "zh-cn": "\u4e2d\u6587\uff08\u7b80\u4f53\uff09", "ja": "\u65e5\u672c\u8a9e"}; });