show popup on ios

This commit is contained in:
ivan grachev 2023-10-18 20:25:05 +03:00
parent ffc7dec640
commit 677c7aee6d
4 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,40 @@
:root {
color-scheme: light dark;
}
body {
width: 100%;
height: 100%;
font-family: system-ui;
text-align: center;
align-content: center;
justify-content: center;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: 0;
margin-top: 40px;
}
#tokenary-button {
font-size: min(6vw, 6vh);
font-weight: bold;
color: white;
background-color: #0093FF;
width: min(78vw, 78vh);
height: min(34vw, 34vh);
border: none;
border-radius: min(17vw, 17vh);
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
padding: 0px;
line-height: 1.2em;
text-align: center;
margin: 0;
}
@media (prefers-color-scheme: dark) {
}

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="popup.css">
<script type="module" src="popup.js"></script>
</head>
<body>
<button id="tokenary-button">Proceed in Tokenary</button>
</body>
</html>

View File

@ -0,0 +1,13 @@
// Copyright © 2023 Tokenary. All rights reserved.
document.getElementById('tokenary-button').addEventListener('click', () => {
browser.tabs.executeScript({
code: 'window.location.href = "https://tokenary.io/extension";'
});
// TODO: how to get a request body here?
setTimeout( function() {
window.close();
}, 200);
});

View File

@ -110,6 +110,9 @@
2C773F63274523DC007B04E7 /* ResponseToExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C773F61274523DC007B04E7 /* ResponseToExtension.swift */; };
2C78F8282683BDCC00C10670 /* Alert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C78F8272683BDCC00C10670 /* Alert.swift */; };
2C797E7E267BB88800F2CE2D /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C797E7D267BB88800F2CE2D /* WelcomeViewController.swift */; };
2C8155682ADFC7A700F4559B /* popup.css in Resources */ = {isa = PBXBuildFile; fileRef = 2C8155662ADFC7A700F4559B /* popup.css */; };
2C81556B2ADFC7B900F4559B /* popup.js in Resources */ = {isa = PBXBuildFile; fileRef = 2C8155692ADFC7B900F4559B /* popup.js */; };
2C81556E2ADFC7C400F4559B /* popup.html in Resources */ = {isa = PBXBuildFile; fileRef = 2C81556C2ADFC7C400F4559B /* popup.html */; };
2C86A262282D1F090028EA11 /* NearSafariRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C86A261282D1F090028EA11 /* NearSafariRequest.swift */; };
2C86A263282D1F090028EA11 /* NearSafariRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C86A261282D1F090028EA11 /* NearSafariRequest.swift */; };
2C86A264282D1F090028EA11 /* NearSafariRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C86A261282D1F090028EA11 /* NearSafariRequest.swift */; };
@ -334,6 +337,9 @@
2C773F61274523DC007B04E7 /* ResponseToExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResponseToExtension.swift; sourceTree = "<group>"; };
2C78F8272683BDCC00C10670 /* Alert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Alert.swift; sourceTree = "<group>"; };
2C797E7D267BB88800F2CE2D /* WelcomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = "<group>"; };
2C8155662ADFC7A700F4559B /* popup.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = popup.css; sourceTree = "<group>"; };
2C8155692ADFC7B900F4559B /* popup.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = popup.js; sourceTree = "<group>"; };
2C81556C2ADFC7C400F4559B /* popup.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = popup.html; sourceTree = "<group>"; };
2C86A261282D1F090028EA11 /* NearSafariRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearSafariRequest.swift; sourceTree = "<group>"; };
2C86A266282D1F220028EA11 /* NearResponseToExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearResponseToExtension.swift; sourceTree = "<group>"; };
2C89D26727BADCA9006C0C8D /* DappRequestAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DappRequestAction.swift; sourceTree = "<group>"; };
@ -819,6 +825,9 @@
isa = PBXGroup;
children = (
2CCEB83627594E2A00768473 /* manifest.json */,
2C8155662ADFC7A700F4559B /* popup.css */,
2C8155692ADFC7B900F4559B /* popup.js */,
2C81556C2ADFC7C400F4559B /* popup.html */,
2CFDDF4D2765417D00F89019 /* ios-specific-content.js */,
2CC8C5A4276A52670083FB1B /* ios-specific-background.js */,
);
@ -1125,7 +1134,10 @@
2CB3845B27654EA900A189B9 /* images in Resources */,
2CE0594027640E8E0042D844 /* background.js in Resources */,
2CE0594227640E8E0042D844 /* inpage.js in Resources */,
2C81556E2ADFC7C400F4559B /* popup.html in Resources */,
2C8155682ADFC7A700F4559B /* popup.css in Resources */,
2CCEB83727594E2A00768473 /* manifest.json in Resources */,
2C81556B2ADFC7B900F4559B /* popup.js in Resources */,
2CE0594127640E8E0042D844 /* content.js in Resources */,
2CFDDF4E2765417E00F89019 /* ios-specific-content.js in Resources */,
);