Add files via upload
Signed-off-by: AvaLilac <amyshimplays@gmail.com>
This commit is contained in:
parent
a848275ec8
commit
d6932130c4
1 changed files with 41 additions and 0 deletions
41
src/aviaversion.js
Normal file
41
src/aviaversion.js
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
if (window.__AVIA_VERSION_PATCH__) return;
|
||||||
|
window.__AVIA_VERSION_PATCH__ = true;
|
||||||
|
|
||||||
|
function patchVersion() {
|
||||||
|
|
||||||
|
document
|
||||||
|
.querySelectorAll("span.lh_1rem.fs_0\\.75rem.ls_0\\.03125rem.fw_500")
|
||||||
|
.forEach(el => {
|
||||||
|
|
||||||
|
if (el.dataset.aviaPatched) return;
|
||||||
|
|
||||||
|
const match = el.textContent.match(/Stoat for Desktop\s+([0-9.]+)/);
|
||||||
|
|
||||||
|
if (!match) return;
|
||||||
|
|
||||||
|
const stoatVersion = match[1];
|
||||||
|
|
||||||
|
el.dataset.aviaPatched = "true";
|
||||||
|
|
||||||
|
el.innerHTML = `
|
||||||
|
Avia Client Desktop<br>
|
||||||
|
<span style="font-size:10px;opacity:0.7;">
|
||||||
|
Based on Stoat ${stoatVersion}
|
||||||
|
</span>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const observer = new MutationObserver(patchVersion);
|
||||||
|
|
||||||
|
observer.observe(document.body, {
|
||||||
|
childList: true,
|
||||||
|
subtree: true
|
||||||
|
});
|
||||||
|
|
||||||
|
patchVersion();
|
||||||
|
|
||||||
|
})();
|
||||||
Loading…
Add table
Reference in a new issue