From cfc197038ff9709cca3708e71f5d291ae7d54b0a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 8 Mar 2018 16:47:50 +0300 Subject: js: enable strict mode --- js/common.js | 2 ++ js/dict.js | 2 ++ js/index.js | 2 ++ js/offline.js | 2 ++ js/read.js | 2 ++ js/reader.js | 2 ++ 6 files changed, 12 insertions(+) (limited to 'js') diff --git a/js/common.js b/js/common.js index 9843c59..8367034 100644 --- a/js/common.js +++ b/js/common.js @@ -1,3 +1,5 @@ +'use strict'; + $.urlParam = function(name){ try { var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); diff --git a/js/dict.js b/js/dict.js index 22bbf98..8db1718 100644 --- a/js/dict.js +++ b/js/dict.js @@ -1,3 +1,5 @@ +'use strict'; + $(document).ready(function() { $(window).on("mouseup touchend", function() { if (!navigator.onLine) return; diff --git a/js/index.js b/js/index.js index 785dc32..b6ec4ee 100644 --- a/js/index.js +++ b/js/index.js @@ -1,3 +1,5 @@ +'use strict'; + function cache_refresh(force) { if ('serviceWorker' in navigator) { localforage.getItem("epube.cache-timestamp").then(function(stamp) { diff --git a/js/offline.js b/js/offline.js index 40e230b..749b3ff 100644 --- a/js/offline.js +++ b/js/offline.js @@ -1,3 +1,5 @@ +'use strict'; + function offline_search(form) { var query = $(".search_query").val(); diff --git a/js/read.js b/js/read.js index 295a530..61fa44e 100644 --- a/js/read.js +++ b/js/read.js @@ -1,3 +1,5 @@ +'use strict'; + var _store_position = 0; var _enable_fullscreen = 0; diff --git a/js/reader.js b/js/reader.js index 453c925..34c5e06 100644 --- a/js/reader.js +++ b/js/reader.js @@ -1,3 +1,5 @@ +'use strict'; + $(document).ready(function() { $(window).on("click tap", function() { if (parent.$(".header").is(":visible")) { -- cgit v1.2.3