mirror of
https://github.com/lil-org/tokenary.git
synced 2024-11-30 13:02:49 +03:00
Know in content script if inpage is available
This commit is contained in:
parent
b0d8987889
commit
a2974e34e9
@ -182,6 +182,8 @@ window.addEventListener("message", function(event) {
|
||||
const cancelRequest = event.data;
|
||||
document.pendingRequestsIds.delete(cancelRequest.id);
|
||||
browser.runtime.sendMessage(cancelRequest);
|
||||
} else if (event.data.inpageAvailable) {
|
||||
document.inpageAvailable = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -107,6 +107,8 @@ function deliverResponseToSpecificProvider(id, response, provider) {
|
||||
|
||||
// MARK: - Tokenary overlay for iOS
|
||||
|
||||
window.postMessage({inpageAvailable: true}, "*");
|
||||
|
||||
window.tokenary.overlayTapped = () => {
|
||||
const request = window.tokenary.overlayConfigurations[0].request;
|
||||
window.tokenary.overlayConfigurations.shift();
|
||||
|
Loading…
Reference in New Issue
Block a user