From 2e146391b1855312547254814b479f23198128f0 Mon Sep 17 00:00:00 2001 From: Index Date: Thu, 7 Mar 2024 14:59:37 -0600 Subject: [PATCH] Improvements - "Run Update Notifier" context menu item now only runs on the developer debug page and nowhere else - Settings are automatically saved whenever you edit the value of a select field - Added accurate names for element IDs on the settings page so I can link to them - If there is a hash/anchor URL specified in the settings page redirect URL it will carry the hash/anchor URL over to the local page URL --- js/background.js | 3 +-- js/settings.js | 4 +++- settings.html | 36 ++++++++++++++++++------------------ settings.js | 1 + 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/js/background.js b/js/background.js index fd214a5..462b459 100755 --- a/js/background.js +++ b/js/background.js @@ -76,8 +76,7 @@ chrome.contextMenus.create({ id: 'PolyPlus-RunUpdateNotifier', contexts: ['all'], documentUrlPatterns: [ - "https://polytoria.com/*", - SettingsURL + "https://polytoria.com/my/settings/polyplus-debug", ] }); diff --git a/js/settings.js b/js/settings.js index 3ebce70..e9f72fe 100755 --- a/js/settings.js +++ b/js/settings.js @@ -1,5 +1,7 @@ const InExtensionSettings = (window.location.pathname.split('/')[3] === "polyplus") -if (InExtensionSettings === true) { window.location.href = chrome.runtime.getURL('settings.html') } +if (InExtensionSettings === true) { + window.location.href = chrome.runtime.getURL('settings.html') + window.location.hash +} document.addEventListener('DOMContentLoaded', function(){ const Nav = document.getElementsByClassName('nav nav-pills')[0] diff --git a/settings.html b/settings.html index cdf83ce..ed41045 100755 --- a/settings.html +++ b/settings.html @@ -320,7 +320,7 @@

Poly+ Settings

-

+

  Pinned Games @@ -329,7 +329,7 @@
Pin your favorite places to the top of the homepage! (limit: 5 places)

-

+

  Forum Mentions @@ -340,7 +340,7 @@
* Forum Mentions do not notify the user.

-

+

  Best Friends @@ -349,7 +349,7 @@
Prioritize the bestest of friends on applicable friend lists! (limit: 7 best friends)

-

+

  Improved Friend Lists @@ -362,7 +362,7 @@ * You can only remove up to 25 friends at once.

-

+

  Show IRL price with Brick Count @@ -397,7 +397,7 @@ -->

-

+

  Hide Notification Badges @@ -406,7 +406,7 @@
Hide the annoying red circles on the sidebar!

-

+

  Show "OWNED" Tag on Store Main Page @@ -415,7 +415,7 @@
Quickly see if you own the item at a glance with a little tag in the top left corner of item cards on the main store page!

-

+

  Theme Creator @@ -425,7 +425,7 @@
Unleash your creativity and customize the Polytoria website to your liking! (this feature is still in development)

-

+

  More Search Filters @@ -434,7 +434,7 @@
Easily find what you're looking for with more search filters side-wide! (this does not affect the main site search on the navbar)

-

+

  Apply Membership Theme for Free @@ -447,7 +447,7 @@

-

+

  Multi-Cancel Outbound Trades @@ -460,7 +460,7 @@ * You can only cancel up to 10 trades at once.

-

+

  Modify Navbar @@ -472,7 +472,7 @@ Customize the navbar to your liking!

-

+

  Item Wishlist @@ -483,7 +483,7 @@ Wishlist that item that you REALLY want!

-

+

  Hide Upgrade Button @@ -492,7 +492,7 @@
Hide the ugly blue "Upgrade" button on the sidebar!

-

+

  Show Outfit Cost on Profiles @@ -507,7 +507,7 @@

These features are a work in progress.


-

+

  Inline Editing @@ -534,7 +534,7 @@
* This feature is not finished or polished.

-

+

  Forum Unix Timestamps diff --git a/settings.js b/settings.js index 6790df2..f46b4a5 100755 --- a/settings.js +++ b/settings.js @@ -161,6 +161,7 @@ Elements.forEach(element => { Array.from(Select).forEach(element => { element.addEventListener('change', function() { SetSetting(element.getAttribute('data-setting'), element, element.selectedIndex) + Save() }); }); }