minor: KDR great divide user stats tooltip
This commit is contained in:
parent
0f7aea03b2
commit
57e4130ede
2 changed files with 92 additions and 85 deletions
|
|
@ -160,7 +160,7 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
||||||
Kill Death Ratio
|
Kill Death Ratio
|
||||||
</b>
|
</b>
|
||||||
<span class="float-end">
|
<span class="float-end">
|
||||||
${KDR}
|
${KDR} <i class="fa-solid fa-circle-info" data-bs-toggle="tooltip" data-bs-title="KDR is a user's kills divided by the amount of times they have died. If their KDR is above 1, they are making a positive contribution. If their KDR is less than 1, that means they die more than they kill."></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-1">
|
<div class="mb-1">
|
||||||
|
|
@ -204,6 +204,7 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
||||||
document.getElementById('p+greatdivide_stats').innerHTML = "<div class=\"mb-3\">This user hasn't participated in The Great Divide.</div>"
|
document.getElementById('p+greatdivide_stats').innerHTML = "<div class=\"mb-3\">This user hasn't participated in The Great Divide.</div>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
(async () => {
|
||||||
|
Utilities = await import(chrome.runtime.getURL('resources/utils.js'))
|
||||||
|
.default
|
||||||
|
|
||||||
chrome.storage.sync.get(['PolyPlus_Settings'], function(result) {
|
chrome.storage.sync.get(['PolyPlus_Settings'], function(result) {
|
||||||
Settings = result.PolyPlus_Settings || {};
|
Settings = result.PolyPlus_Settings || {};
|
||||||
|
|
||||||
|
|
@ -83,8 +87,10 @@ async function UserStatsTab() {
|
||||||
</small>
|
</small>
|
||||||
<lottie-player id="avatar-loading" src="https://c0.ptacdn.com/static/images/lottie/poly-brick-loading.2b51aa85.json" background="transparent" speed="1" style="width: 20%;height: auto;margin: -16px auto 50px;margin-top: 0px;" loop="" autoplay=""></lottie-player>
|
<lottie-player id="avatar-loading" src="https://c0.ptacdn.com/static/images/lottie/poly-brick-loading.2b51aa85.json" background="transparent" speed="1" style="width: 20%;height: auto;margin: -16px auto 50px;margin-top: 0px;" loop="" autoplay=""></lottie-player>
|
||||||
`
|
`
|
||||||
chrome.runtime.sendMessage({
|
await chrome.runtime.sendMessage({
|
||||||
action: "greatdivide_stats",
|
action: "greatdivide_stats",
|
||||||
userID: document.querySelector('.dropdown-item.text-danger[href^="/report"]').getAttribute('href').split('?')[0].split('/')[3]
|
userID: document.querySelector('.dropdown-item.text-danger[href^="/report"]').getAttribute('href').split('?')[0].split('/')[3]
|
||||||
});
|
});
|
||||||
|
Utilities.InjectResource("registerTooltips")
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
Reference in a new issue