fix: great divide user stats KDR tooltip randomly not registering
This commit is contained in:
parent
2afea6ffb6
commit
0df034c46c
2 changed files with 8 additions and 1 deletions
|
|
@ -200,6 +200,14 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
|
|||
</span>
|
||||
</div>
|
||||
`
|
||||
|
||||
const Script = document.createElement('script');
|
||||
Script.setAttribute('type', 'text/javascript');
|
||||
Script.setAttribute('src', chrome.runtime.getURL('resources/registerTooltips.js'));
|
||||
Script.addEventListener('load', function () {
|
||||
Script.remove();
|
||||
});
|
||||
document.body.appendChild(Script);
|
||||
} else {
|
||||
document.getElementById('p+greatdivide_stats').innerHTML = "<div class=\"mb-3\">This user hasn't participated in The Great Divide.</div>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,5 @@
|
|||
action: "greatdivide_stats",
|
||||
userID: document.querySelector('.dropdown-item.text-danger[href^="/report"]').getAttribute('href').split('?')[0].split('/')[3]
|
||||
});
|
||||
Utilities.InjectResource("registerTooltips")
|
||||
}
|
||||
})();
|
||||
Reference in a new issue