From 970beadfb87df0c3ff92d7e73a2feb396360f5a0 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:18:59 -0500 Subject: [PATCH 01/12] Update date-display.js --- new-tab/date-display.js | 44 +++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/new-tab/date-display.js b/new-tab/date-display.js index 91e14cf..90ffe92 100644 --- a/new-tab/date-display.js +++ b/new-tab/date-display.js @@ -1,12 +1,22 @@ -const DateStyles = { - DEFAULT: 1, - SWAP_MD: 2 -} - +const DateStyles = ["1", "2", "3"] +// DEFAULT, SWAP_MD, YMD class DateDisplay { constructor(element) { this.element = element this.dateStyle = this.getSavedStyle() + if (typeof this.dateStyle === 'string' || this.dateStyle instanceof String) { + // ok cool + } else { + if (this.dateStyle = DateStyles.DEFAULT) { + this.dateStyle = "1" + } + else if (this.dateStyle = DateStyles.SWAP_MD) { + this.dateStyle = "2" + } + else if (this.dateStyle = DateStyles.YMD) { + this.dateStyle = "3" + } + } this.render() this.startInterval() } @@ -25,24 +35,28 @@ class DateDisplay { year: date.getFullYear() } - if (this.dateStyle == 2) { + if (this.dateStyle == "1") { + this.element.textContent = [ + parts.day, parts.month, parts.year + ].join('/') + } + else if (this.dateStyle == "2") { this.element.textContent = [ parts.month, parts.day, parts.year ].join('/') - } else { + } + else if (this.dateStyle == "3") { this.element.textContent = [ - parts.day, parts.month, parts.year + parts.year, parts.month, parts.day ].join('/') } } onClickedDate() { - if (this.dateStyle === DateStyles.DEFAULT) { - this.dateStyle = DateStyles.SWAP_MD - } else { - this.dateStyle = DateStyles.DEFAULT - } // TODO: fix this middery - + this.dateStyle = parseInt(this.dateStyle)+1 + if (parseInt(this.dateStyle) > 3) { + this.dateStyle = 1 + } this.setSavedStyle(this.dateStyle) } @@ -51,7 +65,7 @@ class DateDisplay { } getSavedStyle() { - return Number(localStorage.dateStyle) || DateStyles.DEFAULT + return localStorage.dateStyle || "1" } } From e701c7038c7507631752baaf4f3961e72adc52a9 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:40:00 -0500 Subject: [PATCH 02/12] Update main.html --- new-tab/main.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/new-tab/main.html b/new-tab/main.html index 4533722..e88bcc4 100644 --- a/new-tab/main.html +++ b/new-tab/main.html @@ -10,7 +10,7 @@
-
Skiovox Helper
+
Skiovox Helper
@@ -38,8 +38,8 @@
-
-
+
+
@@ -75,4 +75,4 @@
- \ No newline at end of file + From b088e32ebd701bf351b539e1ea825b16f3d06c86 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:41:17 -0500 Subject: [PATCH 03/12] Update date-display.js --- new-tab/date-display.js | 1 + 1 file changed, 1 insertion(+) diff --git a/new-tab/date-display.js b/new-tab/date-display.js index 90ffe92..4027ac8 100644 --- a/new-tab/date-display.js +++ b/new-tab/date-display.js @@ -17,6 +17,7 @@ class DateDisplay { this.dateStyle = "3" } } + this.setSavedStyle(this.dateStyle) this.render() this.startInterval() } From 61ba367f7792e18f6085682253c3b59757dc55d9 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:43:59 -0500 Subject: [PATCH 04/12] Update date-display.js --- new-tab/date-display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-tab/date-display.js b/new-tab/date-display.js index 4027ac8..76f89da 100644 --- a/new-tab/date-display.js +++ b/new-tab/date-display.js @@ -55,7 +55,7 @@ class DateDisplay { onClickedDate() { this.dateStyle = parseInt(this.dateStyle)+1 - if (parseInt(this.dateStyle) > 3) { + if (parseInt(this.dateStyle) > DateStyles.length) { this.dateStyle = 1 } this.setSavedStyle(this.dateStyle) From 1acefbc5a35724d60a1e86d7459e7b9ccf407e30 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 18:29:43 -0500 Subject: [PATCH 05/12] Update date-display.js --- new-tab/date-display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-tab/date-display.js b/new-tab/date-display.js index 76f89da..cb3ca60 100644 --- a/new-tab/date-display.js +++ b/new-tab/date-display.js @@ -1,4 +1,4 @@ -const DateStyles = ["1", "2", "3"] +const DateStyles = ["DEFAULT", "SWAP_MD", "YMD"] // DEFAULT, SWAP_MD, YMD class DateDisplay { constructor(element) { From 2e2fbf63c6755effe3d7da1ec8161baa6126f005 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 18:29:53 -0500 Subject: [PATCH 06/12] Update date-display.js --- new-tab/date-display.js | 1 - 1 file changed, 1 deletion(-) diff --git a/new-tab/date-display.js b/new-tab/date-display.js index cb3ca60..bf7e682 100644 --- a/new-tab/date-display.js +++ b/new-tab/date-display.js @@ -1,5 +1,4 @@ const DateStyles = ["DEFAULT", "SWAP_MD", "YMD"] -// DEFAULT, SWAP_MD, YMD class DateDisplay { constructor(element) { this.element = element From e042e404558bf79ee8284ff8e192109d90cdddb7 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:29:32 -0500 Subject: [PATCH 07/12] Update date-display.js --- new-tab/date-display.js | 57 +++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/new-tab/date-display.js b/new-tab/date-display.js index bf7e682..6dbe2b0 100644 --- a/new-tab/date-display.js +++ b/new-tab/date-display.js @@ -3,20 +3,7 @@ class DateDisplay { constructor(element) { this.element = element this.dateStyle = this.getSavedStyle() - if (typeof this.dateStyle === 'string' || this.dateStyle instanceof String) { - // ok cool - } else { - if (this.dateStyle = DateStyles.DEFAULT) { - this.dateStyle = "1" - } - else if (this.dateStyle = DateStyles.SWAP_MD) { - this.dateStyle = "2" - } - else if (this.dateStyle = DateStyles.YMD) { - this.dateStyle = "3" - } - } - this.setSavedStyle(this.dateStyle) + this.validityCheck() this.render() this.startInterval() } @@ -65,8 +52,50 @@ class DateDisplay { } getSavedStyle() { + if (localStorage.dateStyle == null) { + autoDetect(chrome.i18n.getUILanguage()) + } return localStorage.dateStyle || "1" } + + validityCheck() { + if (parseInt(this.dateStyle) < 1) { + //this.autoDetect(chrome.i18n.getUILanguage()) + this.dateStyle = "1"; + } + if (typeof this.dateStyle === 'string' || this.dateStyle instanceof String) { + // ok cool + } else { + if (this.dateStyle = DateStyles.DEFAULT) { + this.dateStyle = "1" + } + else if (this.dateStyle = DateStyles.SWAP_MD) { + this.dateStyle = "2" + } + else if (this.dateStyle = DateStyles.YMD) { + this.dateStyle = "3" + } + } + this.setSavedStyle(this.dateStyle) + } } export { DateDisplay } +/*const dmyLangs = ["el", "ml", "en-GB", "en-AU", "ca", "es", "es-419", "pt-BR", "pt-PT", "ro", "ru", "th", "kn", "mr", "uk", "pl", "ar", "fil", "he"] +const mdyLangs = ["en-US"] +const ymdLangs = ["ko", "vi", "zh-CN", "zh-TW", "sv", "sw"]*/ + /*autoDetect(lang) { + if (this.dmyLangs.find(lang) > 0) { + this.dateStyle = "1" + } else if (this.mdyLangs.find(lang) > 0) { + this.dateStyle = "2" + } else if (this.ymdLangs.find(lang) > 0) { + this.dateStyle = "3" + } else { + this.dateStyle = "1" + } + this.setSavedStyle(this.dateStyle) + this.getSavedStyle() + this.render() + } +}*/ From 6bebb9e5e33cdd362406dbc393c5ce5d63473d15 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Wed, 24 Jan 2024 07:38:07 -0500 Subject: [PATCH 08/12] Update style.css --- new-tab/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/new-tab/style.css b/new-tab/style.css index 5bc8d65..71c068d 100644 --- a/new-tab/style.css +++ b/new-tab/style.css @@ -67,6 +67,7 @@ body { .battery { font-size: 15px; + margin-top: -10px; } svg { From 08f436490ce6bc3d08ef8dc2416931639bb70794 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Wed, 6 Mar 2024 08:24:28 -0500 Subject: [PATCH 09/12] Update main.js --- new-tab/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/new-tab/main.js b/new-tab/main.js index 33056f6..63f73d0 100644 --- a/new-tab/main.js +++ b/new-tab/main.js @@ -13,6 +13,7 @@ const FILES_URL = "chrome://file-manager"; const HELP_URL = "https://github.com/bypassiwastaken/skiovox-helper"; const WEBSTORE_URL = "https://chromewebstore.google.com"; const ADDSESSION_URL = "https://accounts.google.com/signin/v2/identifier?hl=en&continue=https%3A%2F%2Fwww.google.com%2F&ec=GAlAmgQ&flowName=GlifWebSignIn&flowEntry=AddSession"; +const DOWNLOADS_URL = "chrome://downloads"; let [ help, @@ -26,7 +27,8 @@ let [ wifi, bluetooth, files, - settings + settings, + downloads ] = document.querySelectorAll('svg') let version = document.querySelector('.version') @@ -48,6 +50,10 @@ settings.addEventListener('click', () => { chrome.tabs.create({ url: SETTINGS_URL }) }) +downloads.addEventListener('click', () => { + chrome.tabs.create({ url: DOWNLOADS_URL }) +}) + theme.addEventListener('click', () => { alert("The original New Tab page will now open. On that page, click the edit icon in the bottom right corner to edit your browser theme.") chrome.tabs.create({ url: NEW_TAB_URL }) From 329afa9cf0ad9c5c86ac9a989f601400751c206b Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Wed, 6 Mar 2024 08:24:45 -0500 Subject: [PATCH 10/12] Update main.html --- new-tab/main.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/new-tab/main.html b/new-tab/main.html index e88bcc4..1800464 100644 --- a/new-tab/main.html +++ b/new-tab/main.html @@ -72,6 +72,10 @@ + + + From 8095f41d097fb8e1a97b6a3ece38d10e869be99b Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Wed, 6 Mar 2024 08:30:15 -0500 Subject: [PATCH 11/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf82bb3..9d32408 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,6 @@ Once installed, open a new tab to see the extension's homepage. *Note: You can exit fullscreen by pressing ctrl+T after you've set up the shortcuts.* -![image](https://github.com/zkayns/skiovox-helper/assets/80561998/4c09893a-65a5-45da-b70b-5f3d20c27d54) +![image](https://github.com/zkayns/skiovox-helper/assets/80561998/33681af5-7115-4499-b82c-4760d1f468e3) If you need to install extensions with chromewebstore.google.com blocked, try [Skebstore.](https://github.com/bypassiwastaken/skebstore) From cef47b28a254a46a4c3d4666f71887eeb3ea3fb5 Mon Sep 17 00:00:00 2001 From: zkayns <80561998+zkayns@users.noreply.github.com> Date: Sun, 14 Apr 2024 17:56:00 -0400 Subject: [PATCH 12/12] Update manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index a1a0d5d..34b43e7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "manifest_version": 2, - "version": "2.4.1", + "version": "2.4.2", "name": "Skiovox Helper", "description": "A helper for the Skiovox exploit -- read more at skiovox.com", "icons": { @@ -100,4 +100,4 @@ "run-at": "document_start" } ] -} \ No newline at end of file +}