mirror of
https://github.com/lil-org/tokenary.git
synced 2024-11-22 21:49:51 +03:00
add todos
This commit is contained in:
parent
eb0362c909
commit
c015e5e1a4
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user