1
0
mirror of https://github.com/nileshtrivedi/better synced 2025-06-27 09:03:11 +02:00

Fix remote list loading

This commit is contained in:
Nilesh
2020-08-02 23:30:38 +05:30
parent e284d5c6ad
commit 2d5d6a2f4d
5 changed files with 23 additions and 8 deletions

View File

@ -11,6 +11,9 @@ TODO
- Pop-up should be dismissable (per URL / per domain).
- Once dismissed, popup should not be shown on the same url/domain. Use cookies or localStorage for this.
- Since we're replacing innerHTML, we should protect against XSS attacks.
- Fix and test the options UI
- Test and fix for Chrome, Brave & Firefox
*/
function showBetter(alternative) {
@ -29,8 +32,6 @@ function showBetter(alternative) {
document.body.appendChild(betterdiv);
}
showBetter(findBetter(document.location.href));
chrome.runtime.sendMessage({type: 'getMatch', url: document.location.href}, (response) => {
if (response) {
showBetter(response);