minor: add avatar sandbox outfits to debug page
This commit is contained in:
parent
35fe13d6a2
commit
0774558d7d
1 changed files with 19 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ if (window.location.pathname.split('/')[3] === 'polyplus' && window.location.has
|
||||||
});
|
});
|
||||||
} else if (window.location.pathname.split('/')[3] === 'polyplus' && window.location.hash === '#debug') {
|
} else if (window.location.pathname.split('/')[3] === 'polyplus' && window.location.hash === '#debug') {
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
chrome.storage.sync.get(['PolyPlus_Settings', 'PolyPlus_PinnedGames', 'PolyPlus_BestFriends', 'PolyPlus_ItemWishlist'], function(sync) {
|
chrome.storage.sync.get(['PolyPlus_Settings', 'PolyPlus_PinnedGames', 'PolyPlus_BestFriends', 'PolyPlus_ItemWishlist', 'PolyPlus_AvatarSandboxOutfits'], function(sync) {
|
||||||
chrome.storage.local.get(['PolyPlus_InventoryCache'], function(local){
|
chrome.storage.local.get(['PolyPlus_InventoryCache'], function(local){
|
||||||
document.querySelector('#main-content .container').innerHTML = `
|
document.querySelector('#main-content .container').innerHTML = `
|
||||||
<style>
|
<style>
|
||||||
|
|
@ -339,6 +339,24 @@ if (window.location.pathname.split('/')[3] === 'polyplus' && window.location.has
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card mb-3">
|
||||||
|
<a class="text-reset" data-bs-toggle="collapse" href="#avatar-sandbox-outfits" role="button" aria-expanded="false" aria-controls="item-wishlist">
|
||||||
|
<div class="card-header">
|
||||||
|
<span class="badge bg-primary" style="margin-right: 5px; vertical-align: text-bottom;">Sync</span>
|
||||||
|
Avatar Sandbox Outfits
|
||||||
|
<small class="text-muted" style="font-size: 0.7rem;">(${(sync.PolyPlus_AvatarSandboxOutfits|| []).length})</small>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="card-body collapse" id="avatar-sandbox-outfits">
|
||||||
|
<div style="padding: 10px; background: #171717; font-family: monospace; color: orange; font-size: 0.8rem; border-radius: 10px; position: relative;">
|
||||||
|
${JSON.stringify((sync.PolyPlus_AvatarSandboxOutfits || []), null, 2)
|
||||||
|
.replaceAll('\n','<br>')
|
||||||
|
.replaceAll(' ', ' ')
|
||||||
|
.replaceAll('\t', ' ')}
|
||||||
|
<button class="btn btn-warning btn-sm" style="position: absolute; top: 0; right: 0; margin: 10px;" onclick="navigator.clipboard.writeText('${JSON.stringify((sync.PolyPlus_AvatarSandboxOutfits || []))}') .then(() => {alert('copied')}) .catch(() => {});">copy</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<a class="text-reset" data-bs-toggle="collapse" href="#inventory-cache" role="button" aria-expanded="false" aria-controls="inventory-cache">
|
<a class="text-reset" data-bs-toggle="collapse" href="#inventory-cache" role="button" aria-expanded="false" aria-controls="inventory-cache">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|
|
||||||
Reference in a new issue