diff options
author | Andrew Dolgov <[email protected]> | 2018-03-08 16:47:50 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-03-08 16:47:50 +0300 |
commit | cfc197038ff9709cca3708e71f5d291ae7d54b0a (patch) | |
tree | 676962dd0c1bf642f97bb0ba11b21094815ad1fb | |
parent | 59ddd75559d9a31b9870fcda06fbb8d1abe4627b (diff) |
js: enable strict mode
-rw-r--r-- | js/common.js | 2 | ||||
-rw-r--r-- | js/dict.js | 2 | ||||
-rw-r--r-- | js/index.js | 2 | ||||
-rw-r--r-- | js/offline.js | 2 | ||||
-rw-r--r-- | js/read.js | 2 | ||||
-rw-r--r-- | js/reader.js | 2 | ||||
-rw-r--r-- | offline.html | 2 | ||||
-rw-r--r-- | read.html | 6 |
8 files changed, 18 insertions, 2 deletions
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); @@ -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(); @@ -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")) { diff --git a/offline.html b/offline.html index 84ec672..30f30fa 100644 --- a/offline.html +++ b/offline.html @@ -60,6 +60,8 @@ </div> <script type="text/javascript"> + 'use strict'; + $(document).ready(function() { if ('serviceWorker' in navigator) { @@ -241,7 +241,9 @@ </div> </div> -<script> +<script type='text/javascript'> + 'use strict'; + var _pagination_stored = 0; var _last_position_sync = 0; @@ -451,7 +453,7 @@ }); window.book = book; - rendered = book.renderTo("reader"); + var rendered = book.renderTo("reader"); $('#settings-modal').on('shown.bs.modal', function() { |