diff --git a/css/polytoria.css b/css/polytoria.css index 059a8f3..07e15d6 100644 --- a/css/polytoria.css +++ b/css/polytoria.css @@ -1,9 +1,7 @@ /* - -I did not create this CSS, this CSS is from Polytoria.com -I was given permission by Alyx to download and use it for the extension: https://imgur.com/a/uJW9f5i -I will remove this at request if neccessary - + I did not create this CSS, this CSS is from Polytoria.com + I was given permission by Alyx to download and use it for the extension: https://imgur.com/a/uJW9f5i + I will remove this at request if neccessary */ @charset "UTF-8"; diff --git a/js/background.js b/js/background.js index d15c5cf..1df4530 100755 --- a/js/background.js +++ b/js/background.js @@ -1,14 +1,6 @@ const Manifest = chrome.runtime.getManifest(); const SettingsURL = chrome.runtime.getURL('settings.html'); -/* -ON INSTALL: - -chrome.runtime.onInstalled.addListener(() => { - chrome.tabs.create({url: 'https://polyplus.vercel.app/app/welcome.html'}) -}); -*/ - // WHEN CLICKING ON EXTENSION ICON OPEN THE SETTINGS PAGE chrome.action.onClicked.addListener((tab) => { chrome.tabs.create({active: true, url: SettingsURL}); @@ -73,12 +65,6 @@ function RunUpdateNotifier() { }); } ); - /* - chrome.action.setBadgeBackgroundColor( - {color: 'red'}, - () => { }, - ); - */ } }) .catch((error) => { @@ -93,7 +79,7 @@ chrome.contextMenus.removeAll(function () { title: 'Run Update Notifier', id: 'PolyPlus-RunUpdateNotifier', contexts: ['all'], - documentUrlPatterns: ['https://polytoria.com/my/settings/polyplus#dev'] + documentUrlPatterns: ['https://polytoria.com/my/settings/polyplus*'] }); // COPY ASSET ID CONTEXT MENU ITEM REGISTRATION diff --git a/js/op-comments.js b/js/op-comments.js index e5e9e82..67a5557 100755 --- a/js/op-comments.js +++ b/js/op-comments.js @@ -1,3 +1,7 @@ +/* + this script will need to be updated when the new profile URLs are fully rolled out +*/ + !(() => { let Comments = document.getElementById('comments'); const Type = window.location.pathname.split('/')[1]; @@ -21,7 +25,7 @@ const Observer = new MutationObserver(function (list) { for (let record of list) { for (let element of record.addedNodes) { - if (element.classList === 'card mb-3') { + if (element.classList.contains('card')) { LoadCreatorTag(element); } } diff --git a/js/settings.js b/js/settings.js index d9bae77..10b2895 100755 --- a/js/settings.js +++ b/js/settings.js @@ -11,8 +11,8 @@ document.addEventListener('DOMContentLoaded', function () { PolyPlusItem.classList = 'nav-link'; PolyPlusItem.href = SettingsURL; PolyPlusItem.innerHTML = ` - Poly+ - `; + Poly+ + `; Nav.insertBefore(PolyPlusItem, Nav.getElementsByTagName('hr')[0]); }); diff --git a/js/store/store.js b/js/store/store.js index 9506367..bfb7feb 100755 --- a/js/store/store.js +++ b/js/store/store.js @@ -22,13 +22,18 @@ chrome.storage.sync.get(['PolyPlus_Settings'], async function (result) { } if (Settings.StoreOwnTagOn === true) { - Inventory = (await (await fetch('https://api.polytoria.com/v1/users/' + UserID + '/inventory?type=hat&limit=100')).json()).inventory; - Inventory.concat(await (await fetch('https://api.polytoria.com/v1/users/' + UserID + '/inventory?type=face&limit=100')).json()).inventory; - Inventory.concat(await (await fetch('https://api.polytoria.com/v1/users/' + UserID + '/inventory?type=tool&limit=100')).json()).inventory; - console.log(Inventory); - Array.from(ItemGrid.children).forEach((element) => { - LoadOwnedTags(element); - }); + Inventory = (await (await fetch('https://api.polytoria.com/v1/users/' + UserID + '/inventory?type=hat&limit=100')).json()); + if (Inventory.errors === undefined) { + Inventory = Inventory.inventory + Inventory.concat(await (await fetch('https://api.polytoria.com/v1/users/' + UserID + '/inventory?type=face&limit=100')).json()).inventory; + Inventory.concat(await (await fetch('https://api.polytoria.com/v1/users/' + UserID + '/inventory?type=tool&limit=100')).json()).inventory; + console.log(Inventory); + Array.from(ItemGrid.children).forEach((element) => { + LoadOwnedTags(element); + }); + } else { + console.log(Inventory) + } } if (Settings.EventItemsCatOn === true) { @@ -153,52 +158,44 @@ function EventItems() { ItemGrid.classList.remove('itemgrid'); ItemGrid.innerHTML = `
- ${Groups[Page].map( - (x, index) => ` -
-
-
${x.date}
-
${x.name}
-
- ${ - x.link !== undefined - ? ` - + `).join('')}
@@ -280,20 +277,27 @@ function EventItems() { const UpdateEventItems = function () { Current.innerText = Page + 1; - Container.innerHTML = Groups[Page].map( - (x, index) => ` -
-
-
${x.date}
-
${x.name}
-
-
+ Container.innerHTML = Groups[Page].map((x, index) => ` +
+
+
${x.date}
+
${x.name}
+
+ ${x.link !== undefined ? ` + + ` + : '' + } +
- ${x.items - .map( - (x) => ` + ${x.items.map((x) => `
@@ -306,9 +310,7 @@ function EventItems() {
- ` - ) - .join('')} + `).join('')}
diff --git a/manifest.json b/manifest.json index c396575..432c1b7 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "version_name": "Pre-Release Build (v1.1.1)", "description": "Power-up your Polytoria experience with Poly+! Created by Index.", "homepage_url": "https://polyplus.vercel.app/", - "permissions": ["storage", "contextMenus", "tabs", "scripting", "alarms", "notifications"], + "permissions": ["storage", "contextMenus", "scripting", "alarms", "notifications"], "content_scripts": [ { "matches": ["https://polytoria.com/*"], diff --git a/resources/currencies.json b/resources/currencies.json deleted file mode 100755 index ffab6f8..0000000 --- a/resources/currencies.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "Date": "2023-7-17", - "Data": [ - { - "USD": 0.009899999999999999, - "EUR": 0.011200000000000002, - "CAD": 0.0123, - "GBP": 0.008100000000000001, - "MXN": 0.1928, - "AUD": 0.014199999999999999, - "TRY": 0.1583 - }, - { - "USD": 0.009072727272727274, - "EUR": 0.010163636363636363, - "CAD": 0.011290909090909091, - "GBP": 0.007363636363636363, - "MXN": 0.17534545454545455, - "AUD": 0.013418181818181819, - "TRY": 0.14616363636363636 - }, - { - "USD": 0.00868695652173913, - "EUR": 0.009721739130434783, - "CAD": 0.010730434782608695, - "GBP": 0.007043478260869565, - "MXN": 0.1676521739130435, - "AUD": 0.012834782608695652, - "TRY": 0.13767826086956522 - }, - { - "USD": 0.009087272727272727, - "EUR": 0.00996, - "CAD": 0.010625454545454546, - "GBP": 0.006981818181818182, - "MXN": 0.17294545454545454, - "AUD": 0.012698181818181819, - "TRY": 0.14424 - }, - { - "USD": 0.008331666666666668, - "EUR": 0.009323333333333333, - "CAD": 0.00974, - "GBP": 0.006066666666666666, - "MXN": 0.15853333333333333, - "AUD": 0.012306666666666667, - "TRY": 0.13222 - }, - { - "USD": 0.0079992, - "EUR": 0.008950399999999999, - "CAD": 0.0093504, - "GBP": 0.005824, - "MXN": 0.152192, - "AUD": 0.011814400000000001, - "TRY": 0.12693120000000002 - } - ] -} diff --git a/settings.html b/settings.html index 8f54f4e..cedda11 100755 --- a/settings.html +++ b/settings.html @@ -390,15 +390,15 @@ + + -->

  @@ -484,17 +484,6 @@
Wishlist that item that you REALLY want!

-