Improvements
- Added "load example data" section to debug page so you can quickly load example data for "Pinned Games", "Best Friends", and "Item Wishlist" - Fixed IRL price on the store main page saying "NaN" (meaning "Not a Number") when there is a time limit on an item - Changed font size and color of the likes/dislikes text on the gradient overlay of Pinned Games.
This commit is contained in:
parent
7cd6fb578b
commit
1b93ed22ad
3 changed files with 28 additions and 6 deletions
|
|
@ -25,7 +25,7 @@ let GameContainerElement = `
|
|||
<div class="card-body">
|
||||
<div class="ratings-header">
|
||||
<img src=":Thumbnail" class="place-card-image" style="position: relative;">
|
||||
<div style="position: absolute;background: linear-gradient(to bottom, black, transparent, transparent, transparent);width: 100%;height: 100%;top: 0;left: 0;border-radius: 10px;padding-top: 5px;">
|
||||
<div style="position: absolute;background: linear-gradient(to bottom, black, transparent, transparent, transparent);width: 100%;height: 100%;top: 0;left: 0;border-radius: 10px;padding-top: 5px;color: gray;font-size: 0.8rem;">
|
||||
<span>
|
||||
<i id="thumbup-icn" class="thumb-icon far fa-thumbs-up"></i>
|
||||
:Likes
|
||||
|
|
|
|||
30
js/debug.js
30
js/debug.js
|
|
@ -21,10 +21,6 @@ document.querySelector('#main-content .container').innerHTML = `
|
|||
<p class="text-muted mb-1">Data Size: <span id="data-size">Loading</span> byte(s)</p>
|
||||
<button class="btn btn-primary btn-sm w-100" id="check-for-updates">Check for Updates</button>
|
||||
<a href="https://github.com/IndexingGitHub/PolyPlus" class="btn btn-dark btn-sm w-100 mt-2" target="_blank">Open GitHub</a>
|
||||
<!--
|
||||
<a href="https://github.com/IndexingGitHub/PolyPlus/issues" class="btn btn-dark btn-sm w-100 mt-2" target="_blank">Open GitHub Issues</a>
|
||||
<a href="https://github.com/IndexingGitHub/PolyPlus/pulls" class="btn btn-dark btn-sm w-100 mt-2" target="_blank">Open GitHub PRs</a>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
@ -47,6 +43,14 @@ document.querySelector('#main-content .container').innerHTML = `
|
|||
<button class="btn btn-success" id="edit-setting">Submit</button>
|
||||
</div>
|
||||
|
||||
<label>Load Example Data</label>
|
||||
<p>Quickly clear specific parts of the extension's local data</p>
|
||||
<div role="group" class="btn-group w-100 mb-3">
|
||||
<button class="btn btn-secondary" id="example-pinnedgames">Load Example Pinned Games</button>
|
||||
<button class="btn btn-secondary" id="example-bestfriends">Load Example Best Friends</button>
|
||||
<button class="btn btn-secondary" id="example-itemwishlist">Load Example Item Wishlist</button>
|
||||
</div>
|
||||
|
||||
<label>Clear Specific Local Data</label>
|
||||
<p>Quickly clear specific parts of the extension's local data</p>
|
||||
<div role="group" class="btn-group w-100 mb-3">
|
||||
|
|
@ -136,6 +140,24 @@ document.getElementById('reset-settings').addEventListener('click', async functi
|
|||
});
|
||||
});
|
||||
|
||||
document.getElementById('example-pinnedgames').addEventListener('click', function(){
|
||||
chrome.storage.sync.set({ 'PolyPlus_PinnedGames': [6012, 3857, 2537] }, function() {
|
||||
alert('Successfully loaded example for Pinned Games!')
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById('example-bestfriends').addEventListener('click', function(){
|
||||
chrome.storage.sync.set({ 'PolyPlus_BestFriends': [1, 2, 3] }, function() {
|
||||
alert('Successfully loaded example for Best Friends!')
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById('example-itemwishlist').addEventListener('click', function(){
|
||||
chrome.storage.sync.set({ 'PolyPlus_ItemWishlist': [31495, 31493, 31492] }, function() {
|
||||
alert('Successfully loaded example for Item Wishlist!')
|
||||
});
|
||||
});
|
||||
|
||||
document.getElementById('clear-pinnedgames').addEventListener('click', function(){
|
||||
chrome.storage.sync.set({ 'PolyPlus_PinnedGames': [] }, function() {
|
||||
alert('Successfully cleared Pinned Games!')
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ async function LoadIRLPrices(element) {
|
|||
const Span = document.createElement('span')
|
||||
Span.classList = 'text-muted polyplus-price-tag'
|
||||
Span.style.fontSize = '0.7rem'
|
||||
const Price = Parent.innerText
|
||||
const Price = Parent.innerText.split(' ')[1]
|
||||
const Result = await Utilities.CalculateIRL(Price, Settings.IRLPriceWithCurrencyCurrency)
|
||||
Span.innerText = "($" + Result.bricks + " " + Result.display + ")"
|
||||
Parent.appendChild(Span)
|
||||
|
|
|
|||
Reference in a new issue