add todos

This commit is contained in:
ivan grachev 2023-12-05 22:19:57 +03:00
parent eb0362c909
commit c015e5e1a4
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ function injectScript() {
const container = document.head || document.documentElement;
const scriptTag = document.createElement('script');
scriptTag.setAttribute('async', 'false');
var request = new XMLHttpRequest();
var request = new XMLHttpRequest(); // TODO: fix for v3
request.open('GET', browser.extension.getURL('inpage.js'), false);
request.send();
scriptTag.textContent = request.responseText;

View File

@ -20,12 +20,12 @@ button.addEventListener('click', () => {
request = fresh;
}
const query = encodeURIComponent(JSON.stringify(request)) + '";';
browser.tabs.executeScript({
browser.tabs.executeScript({ // TODO: fix for v3 https://developer.chrome.com/docs/extensions/develop/migrate/api-calls#replace-executescript
code: 'window.location.href = "https://tokenary.io/extension?query=' + query
});
setTimeout( function() {
window.close();
window.close(); // TODO: fix for v3
}, 420);
browser.runtime.sendMessage({subject: 'POPUP_DID_PROCEED', id: request.id});
@ -64,7 +64,7 @@ function setupButton() {
}
function getPendingRequest() {
const bg = browser.extension.getBackgroundPage();
const bg = browser.extension.getBackgroundPage(); // TODO: fix for v3
if (bg != null) {
return bg.pendingPopupRequest;
} else {