From ebfd00956f609c45a5715e7e4dc62b8954c46da8 Mon Sep 17 00:00:00 2001 From: Jake Volynko Date: Sat, 9 Nov 2019 13:36:08 +0200 Subject: [PATCH] use strict mode --- js/about.js | 2 ++ js/browser.js | 2 ++ js/overlay.js | 2 ++ js/settings.js | 2 ++ js/webview.js | 2 ++ main.js | 2 ++ modules/BookmarkManager/Bookmark.js | 2 ++ modules/BookmarkManager/BookmarkManager.js | 2 ++ modules/BookmarkManager/Folder.js | 2 ++ modules/DownloadManager/Download.js | 2 ++ modules/DownloadManager/DownloadManager.js | 4 +--- modules/HistoryManager/HistoryItem.js | 2 ++ modules/HistoryManager/HistoryManager.js | 2 ++ modules/NotificationManager/NotificationManager.js | 4 +--- .../NotificationManager/Notifications/BlankNotification.js | 2 ++ .../NotificationManager/Notifications/QuestNotification.js | 2 ++ .../NotificationManager/Notifications/StatusNotification.js | 2 ++ modules/NotificationManager/Notifications/TextNotification.js | 2 ++ modules/NotificationManager/Notifications/ZoomNotification.js | 2 ++ modules/Overlay/Overlay.js | 4 +++- modules/SearchManager/SearchManager.js | 2 ++ modules/TabManager/Tab.js | 2 ++ modules/TabManager/TabManager.js | 2 ++ modules/TabManager/TabRenderer.js | 4 +--- 24 files changed, 46 insertions(+), 10 deletions(-) diff --git a/js/about.js b/js/about.js index 11fc029..fdcb0f0 100755 --- a/js/about.js +++ b/js/about.js @@ -1,3 +1,5 @@ +"use strict"; + /* ##### ###### #### # # # ##### ###### # # # # # # # # # # # diff --git a/js/browser.js b/js/browser.js index fc3b4b4..c002c73 100755 --- a/js/browser.js +++ b/js/browser.js @@ -1,3 +1,5 @@ +"use strict"; + /* ##### ###### #### # # # ##### ###### # # # # # # # # # # # diff --git a/js/overlay.js b/js/overlay.js index 7b0acbf..5679a3a 100755 --- a/js/overlay.js +++ b/js/overlay.js @@ -1,3 +1,5 @@ +"use strict"; + /* #### #### # # #### ##### # # # # ## # # # diff --git a/js/settings.js b/js/settings.js index ad4f3fb..7a19572 100644 --- a/js/settings.js +++ b/js/settings.js @@ -1,3 +1,5 @@ +"use strict"; + /* ##### ###### #### # # # ##### ###### # # # # # # # # # # # diff --git a/js/webview.js b/js/webview.js index c36ff01..db87d1f 100755 --- a/js/webview.js +++ b/js/webview.js @@ -1,3 +1,5 @@ +"use strict"; + const { ipcRenderer } = require("electron"); document.addEventListener("wheel", webviewMouseWheel); diff --git a/main.js b/main.js index f69972f..3d34362 100755 --- a/main.js +++ b/main.js @@ -1,3 +1,5 @@ +"use strict"; + /* ##### ###### #### # # # ##### ###### # # # # # # # # # # # diff --git a/modules/BookmarkManager/Bookmark.js b/modules/BookmarkManager/Bookmark.js index a017128..ec85d26 100755 --- a/modules/BookmarkManager/Bookmark.js +++ b/modules/BookmarkManager/Bookmark.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const { ipcRenderer, clipboard } = require("electron"); const GetAvColor = require("color.js"); diff --git a/modules/BookmarkManager/BookmarkManager.js b/modules/BookmarkManager/BookmarkManager.js index baf16f3..84b62b8 100755 --- a/modules/BookmarkManager/BookmarkManager.js +++ b/modules/BookmarkManager/BookmarkManager.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const Isotope = require("isotope-layout"); const Dragula = require("dragula"); diff --git a/modules/BookmarkManager/Folder.js b/modules/BookmarkManager/Folder.js index 23a860b..e62c9c4 100755 --- a/modules/BookmarkManager/Folder.js +++ b/modules/BookmarkManager/Folder.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); class Folder extends EventEmitter { diff --git a/modules/DownloadManager/Download.js b/modules/DownloadManager/Download.js index 4126990..2e9c319 100644 --- a/modules/DownloadManager/Download.js +++ b/modules/DownloadManager/Download.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const fileExtension = require("file-extension"); const GetAvColor = require("color.js"); diff --git a/modules/DownloadManager/DownloadManager.js b/modules/DownloadManager/DownloadManager.js index 4d9cf26..41602c3 100644 --- a/modules/DownloadManager/DownloadManager.js +++ b/modules/DownloadManager/DownloadManager.js @@ -1,6 +1,4 @@ -if (!document) { - throw Error("DownloadManager module must be called in renderer process"); -} +"use strict"; const EventEmitter = require("events"); const ppath = require("persist-path")("Ferny"); diff --git a/modules/HistoryManager/HistoryItem.js b/modules/HistoryManager/HistoryItem.js index c35e9fc..01aae46 100644 --- a/modules/HistoryManager/HistoryItem.js +++ b/modules/HistoryManager/HistoryItem.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const jquery = require("jquery"); const GetAvColor = require("color.js"); diff --git a/modules/HistoryManager/HistoryManager.js b/modules/HistoryManager/HistoryManager.js index 6a4fcf2..644c268 100644 --- a/modules/HistoryManager/HistoryManager.js +++ b/modules/HistoryManager/HistoryManager.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const prependFile = require("prepend-file"); const ppath = require("persist-path")("Ferny"); diff --git a/modules/NotificationManager/NotificationManager.js b/modules/NotificationManager/NotificationManager.js index f00775b..090dd3b 100755 --- a/modules/NotificationManager/NotificationManager.js +++ b/modules/NotificationManager/NotificationManager.js @@ -1,6 +1,4 @@ -if (!document) { - throw Error("NotificationManager module must be called in renderer process"); -} +"use strict"; const EventEmitter = require("events"); diff --git a/modules/NotificationManager/Notifications/BlankNotification.js b/modules/NotificationManager/Notifications/BlankNotification.js index 23f98f3..7df7060 100755 --- a/modules/NotificationManager/Notifications/BlankNotification.js +++ b/modules/NotificationManager/Notifications/BlankNotification.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); class BlankNotification extends EventEmitter { diff --git a/modules/NotificationManager/Notifications/QuestNotification.js b/modules/NotificationManager/Notifications/QuestNotification.js index a6335f1..835d17a 100755 --- a/modules/NotificationManager/Notifications/QuestNotification.js +++ b/modules/NotificationManager/Notifications/QuestNotification.js @@ -1,3 +1,5 @@ +"use strict"; + const rgbToRgbaString = require(__dirname + "/../../rgbToRgbaString.js"); const TextNotification = require(__dirname + "/TextNotification.js"); diff --git a/modules/NotificationManager/Notifications/StatusNotification.js b/modules/NotificationManager/Notifications/StatusNotification.js index 1a63652..3aa4c5e 100755 --- a/modules/NotificationManager/Notifications/StatusNotification.js +++ b/modules/NotificationManager/Notifications/StatusNotification.js @@ -1,3 +1,5 @@ +"use strict"; + const rgbToRgbaString = require(__dirname + "/../../rgbToRgbaString.js"); const TextNotification = require(__dirname + "/TextNotification.js"); diff --git a/modules/NotificationManager/Notifications/TextNotification.js b/modules/NotificationManager/Notifications/TextNotification.js index ce7776f..0619fda 100755 --- a/modules/NotificationManager/Notifications/TextNotification.js +++ b/modules/NotificationManager/Notifications/TextNotification.js @@ -1,3 +1,5 @@ +"use strict"; + const BlankNotification = require(__dirname + "/BlankNotification.js"); class TextNotification extends BlankNotification { diff --git a/modules/NotificationManager/Notifications/ZoomNotification.js b/modules/NotificationManager/Notifications/ZoomNotification.js index 6bc1b78..28f97b9 100755 --- a/modules/NotificationManager/Notifications/ZoomNotification.js +++ b/modules/NotificationManager/Notifications/ZoomNotification.js @@ -1,3 +1,5 @@ +"use strict"; + const rgbToRgbaString = require(__dirname + "/../../rgbToRgbaString.js"); const TextNotification = require(__dirname + "/TextNotification.js"); diff --git a/modules/Overlay/Overlay.js b/modules/Overlay/Overlay.js index 0ec43d1..962bead 100755 --- a/modules/Overlay/Overlay.js +++ b/modules/Overlay/Overlay.js @@ -1,5 +1,7 @@ +"use strict"; + const EventEmitter = require("events"); -const { BrowserView, Menu, MenuItem, clipboard } = require('electron'); +const { BrowserView, Menu, MenuItem, clipboard } = require("electron"); class Overlay extends EventEmitter { window = null; diff --git a/modules/SearchManager/SearchManager.js b/modules/SearchManager/SearchManager.js index 67ea811..9848469 100755 --- a/modules/SearchManager/SearchManager.js +++ b/modules/SearchManager/SearchManager.js @@ -1,3 +1,5 @@ +"use strict"; + /* #### #### # # #### ##### # # # # ## # # # diff --git a/modules/TabManager/Tab.js b/modules/TabManager/Tab.js index 15ebb3d..a305c2a 100755 --- a/modules/TabManager/Tab.js +++ b/modules/TabManager/Tab.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const { BrowserView, Menu, MenuItem, clipboard } = require("electron"); const fileExtension = require("file-extension"); diff --git a/modules/TabManager/TabManager.js b/modules/TabManager/TabManager.js index cf5f5b5..c284228 100755 --- a/modules/TabManager/TabManager.js +++ b/modules/TabManager/TabManager.js @@ -1,3 +1,5 @@ +"use strict"; + const EventEmitter = require("events"); const { Menu, MenuItem } = require('electron'); diff --git a/modules/TabManager/TabRenderer.js b/modules/TabManager/TabRenderer.js index 4dce5ec..bb91cc4 100755 --- a/modules/TabManager/TabRenderer.js +++ b/modules/TabManager/TabRenderer.js @@ -1,6 +1,4 @@ -if (!document) { - throw Error("TabRenderer module must be called in renderer process"); -} +"use strict"; const EventEmitter = require("events"); const { ipcRenderer } = require("electron");