This repository has been archived on 2026-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
polyplus/js/places/places.js
Index 948c9b8fae Improved Settings Page and other Improvements
- Improved settings page ("*unsaved" title when not saved yet, redesigned toggle indicators, redesigned toggle buttons, and small changes)

- data-URL property of the body HTML tag is now the pathname rather than the full URL

- Work in progress places integration for Pinned Games (on the actual places page, debating deleting this or not)

- Code cleanup

- Code improvements

- Added .gitignore

- Updated specific.css to use pathnames rather than the full URL

- Updated data_structure.txt reference for developers

- Changed manifest version name to pre-release build so you can tell what build you are using
2024-02-21 21:48:06 -06:00

25 lines
No EOL
720 B
JavaScript

let Settings;
let PinnedGamesData;
chrome.storage.sync.get(['PolyPlus_Settings', 'PolyPlus_PinnedGames'], function(result){
Settings = result.PolyPlus_Settings || {}
PinnedGamesData = result.PolyPlus_PinnedGames || []
if (Settings.PinnedGamesOn === true) {}
})
function PinnedGames() {
for (let game of PinnedGamesData) {
fetch('https://api.polytoria.com/v1/places/' + game)
.then(response => {
if (!response.ok) {
throw new Error('Network not ok')
}
return response.json()
})
.then(data => {
// epic
})
.catch(error => {console.log(error)})
}
}