1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-30 19:56:10 +00:00
FairEmail/oauth/index.html

60 lines
2.5 KiB
HTML
Raw Normal View History

2020-07-30 06:47:44 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
2020-12-02 07:06:51 +00:00
<title>FairEmail - OAuth</title>
<link rel="shortcut icon" href="https://raw.githubusercontent.com/M66B/FairEmail/master/app/src/main/ic_launcher-web.png" />
2020-07-30 06:47:44 +00:00
<meta name="theme-color" content="#006db3">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="description" content="FairEmail - OAuth">
<meta name="author" content="M66B">
2020-12-02 07:06:51 +00:00
<meta name="robots" content="noindex">
2020-08-02 18:39:23 +00:00
<style>
* { font-family: Arial, Helvetica, sans-serif; }
body { padding-left: 10px; padding-right: 10px; }
2022-07-12 09:10:16 +00:00
.error { color: red; font-weight: bold; }
2020-12-02 07:06:51 +00:00
.button-large { width: 120px; height: 30px; font-weight: bold; }
2020-08-02 18:39:23 +00:00
</style>
2020-07-30 06:47:44 +00:00
<script>
2020-08-06 18:29:10 +00:00
window.addEventListener('load', load);
function load() {
document.getElementById('oauth').addEventListener('click', oauth);
document.getElementById('year').textContent= new Date().getFullYear();
2022-07-12 09:10:16 +00:00
try {
var url = new URL(window.location.href);
var error = url.searchParams.get('error');
if (error) {
2022-08-12 19:56:54 +00:00
document.getElementById('errmsg').innerText = error;
2022-07-12 09:10:16 +00:00
document.getElementById('error').style.display = 'block';
}
} catch (error) {
console.error(error);
}
2022-08-12 19:56:54 +00:00
document.getElementById('debug').innerText = window.location.search;
document.getElementById('debug').style.display = 'none';
2020-08-06 18:29:10 +00:00
}
2020-07-30 06:47:44 +00:00
function oauth() {
2020-08-06 20:23:20 +00:00
document.location.href = 'eu.faircode.email://oauth' + window.location.search;
2020-07-30 06:47:44 +00:00
}
</script>
</head>
<body>
<h1>FairEmail</h1>
2020-12-02 07:06:51 +00:00
<p><img src="https://raw.githubusercontent.com/M66B/FairEmail/master/app/src/main/ic_launcher-web.png" alt="FairEmail" height="72" width="72" /></p>
2021-10-16 14:30:06 +00:00
<h2>&#x1F6E1; OAuth</h2>
2022-08-12 19:56:54 +00:00
<p id="error" style="display: none;"><span>The email server said: <span id="errmsg" class="error"></span></span></p>
2022-03-24 19:51:23 +00:00
<p><button id="oauth" class="button-large">Continue</button> to the app</p>
2022-08-12 19:56:54 +00:00
<p id="debug" style="display: none; font-size: x-small;"></p>
2020-08-06 18:29:10 +00:00
<noscript><h2>Please enable JavaScript or disable your ad blocker</h2></noscript>
2020-08-06 20:23:20 +00:00
<br>
2021-02-14 13:54:18 +00:00
<p style="font-size: smaller;"><a href="https://en.wikipedia.org/wiki/OAuth" target="_blank">What is OAuth?</a></p>
2020-12-09 20:25:36 +00:00
<p><a href="https://github.com/M66B/open-source-email/blob/master/PRIVACY.md" target="_blank">Privacy policy</a></p>
2022-03-24 19:51:23 +00:00
<p>Copyright &copy; 2018&ndash;<span id="year">2022</span> by Marcel Bokhorst (M66B)</p>
2021-02-14 13:54:18 +00:00
<p style="font-size: smaller;">This page is <a href="https://github.com/M66B/FairEmail/blob/master/oauth/index.html" target="_blank">open source</a>.</p>
2020-07-30 06:47:44 +00:00
</body>
</html>