summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-04-05 07:51:16 +0200
committerJo-Philipp Wich <jo@mein.io>2019-07-07 15:36:24 +0200
commit8a8e8e0aac356d03273caf20df80736a2daa339e (patch)
tree90fbf3e78754ed01cfcbf91481fdc10f695d07cc /modules/luci-base/htdocs/luci-static
parent74ccea6fa2205dd9d329f3df125ea8ba23b0ed50 (diff)
luci-base: luci.js: enable strict mode
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/luci.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js
index bf7f65a7d1..19f4a54c76 100644
--- a/modules/luci-base/htdocs/luci-static/resources/luci.js
+++ b/modules/luci-base/htdocs/luci-static/resources/luci.js
@@ -1,4 +1,6 @@
(function(window, document, undefined) {
+ 'use strict';
+
/* Object.assign polyfill for IE */
if (typeof Object.assign !== 'function') {
Object.defineProperty(Object, 'assign', {
@@ -136,7 +138,7 @@
* HTTP Request helper
*/
- Headers = Class.extend({
+ var Headers = Class.extend({
__name__: 'LuCI.XHR.Headers',
__init__: function(xhr) {
var hdrs = this.headers = {};
@@ -157,7 +159,7 @@
}
});
- Response = Class.extend({
+ var Response = Class.extend({
__name__: 'LuCI.XHR.Response',
__init__: function(xhr, url, duration) {
this.ok = (xhr.status >= 200 && xhr.status <= 299);
@@ -179,7 +181,7 @@
}
});
- Request = Class.singleton({
+ var Request = Class.singleton({
__name__: 'LuCI.Request',
interceptors: [],
@@ -428,7 +430,7 @@
originalCBIInit = null,
classes = {};
- LuCI = Class.extend({
+ var LuCI = Class.extend({
__name__: 'LuCI',
__init__: function(env) {
@@ -582,6 +584,8 @@
/* load dependencies and instantiate class */
return Promise.all(depends).then(function(instances) {
+ var _factory, _class;
+
try {
_factory = eval(
'(function(window, document, L%s) { %s })\n\n//# sourceURL=%s\n'
@@ -1045,7 +1049,7 @@
})
});
- XHR = Class.extend({
+ var XHR = Class.extend({
__name__: 'LuCI.XHR',
__init__: function() {
if (window.console && console.debug)