aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/pwa/index.html
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-06-02 14:32:52 -0300
committerSebastian <sebasjm@gmail.com>2023-06-02 14:32:52 -0300
commit81dd559c77908b7805690aa7fa1de54ce3a45580 (patch)
tree84d66deec9cca79e3f44d5b68219f4e928dc5a2a /packages/taler-wallet-webextension/src/pwa/index.html
parent1961f4744ca0db4666a2df4335c768ed86fc4e2f (diff)
downloadwallet-core-81dd559c77908b7805690aa7fa1de54ce3a45580.tar.xz
pretty and suspend/resume option
Diffstat (limited to 'packages/taler-wallet-webextension/src/pwa/index.html')
-rw-r--r--packages/taler-wallet-webextension/src/pwa/index.html75
1 files changed, 37 insertions, 38 deletions
diff --git a/packages/taler-wallet-webextension/src/pwa/index.html b/packages/taler-wallet-webextension/src/pwa/index.html
index abc6f97ba..4ffbe5205 100644
--- a/packages/taler-wallet-webextension/src/pwa/index.html
+++ b/packages/taler-wallet-webextension/src/pwa/index.html
@@ -7,11 +7,11 @@
position: absolute;
top: 0px;
display: none;
-width: 100%;
-height: 100%;
-background-color: rgba(0,0,0,0.5);
-color:white;
-justify-content: center;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ color: white;
+ justify-content: center;
}
.overlay > iframe {
margin: auto;
@@ -21,21 +21,21 @@ justify-content: center;
<body>
<script>
function openPopup() {
- document.getElementById("popup-overlay").style.display = "flex"
+ document.getElementById("popup-overlay").style.display = "flex";
window.frames["popup"].location = "popup.html";
- window.frames["popup"]
+ window.frames["popup"];
}
function closePopup() {
- document.getElementById("popup-overlay").style.display = "none"
+ document.getElementById("popup-overlay").style.display = "none";
}
function redirectWallet(url) {
- window.frames["wallet"].location = url
+ window.frames["wallet"].location = url;
}
function openWallet() {
- redirectWallet("wallet.html")
+ redirectWallet("wallet.html");
}
function closeWallet() {
- redirectWallet("about:blank")
+ redirectWallet("about:blank");
}
function openPage() {
window.frames["other"].location =
@@ -46,7 +46,7 @@ justify-content: center;
<button value="asd" onclick="closeWallet();openWallet()">
reload wallet page
</button>
-<br />
+ <br />
<iframe
id="wallet-window"
name="wallet"
@@ -54,7 +54,7 @@ justify-content: center;
width="1000"
height="100%"
>
- </iframe>
+ </iframe>
<!-- <input id="page-url" type="text" />
<button onclick="openPage()">open</button> -->
<!-- <a
@@ -73,11 +73,11 @@ justify-content: center;
<hr />
<div class="overlay" id="popup-overlay">
<iframe
- id="popup-window"
- name="popup"
- src="about:blank"
- width="500"
- height="325"
+ id="popup-window"
+ name="popup"
+ src="about:blank"
+ width="500"
+ height="325"
>
</iframe>
</div>
@@ -85,25 +85,24 @@ justify-content: center;
<iframe src="tests.html" name="wallet" width="800" height="100%"> </iframe> -->
<!-- <hr />
<iframe src="stories.html" name="wallet" width="800" height="100%"> -->
- <script type="module" src="background.dev.js"></script>
- <script type="module">
- if ("serviceWorker" in navigator) {
- try {
- const registration = await navigator.serviceWorker.register("sw.js", {
- scope: "/app/",
- });
- if (registration.installing) {
- console.log("Service worker installing");
- } else if (registration.waiting) {
- console.log("Service worker installed");
- } else if (registration.active) {
- console.log("Service worker active");
- }
- } catch (error) {
- console.error(`Registration failed with ${error}`);
- }
+ <script type="module" src="background.dev.js"></script>
+ <script type="module">
+ if ("serviceWorker" in navigator) {
+ try {
+ const registration = await navigator.serviceWorker.register("sw.js", {
+ scope: "/app/",
+ });
+ if (registration.installing) {
+ console.log("Service worker installing");
+ } else if (registration.waiting) {
+ console.log("Service worker installed");
+ } else if (registration.active) {
+ console.log("Service worker active");
}
-
- </script>
- </body>
+ } catch (error) {
+ console.error(`Registration failed with ${error}`);
+ }
+ }
+ </script>
+ </body>
</html>