2025-04-13 20:18:30 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>TickTick OAuth Callback</title>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<h1>Authorization Complete</h1>
|
|
|
|
|
<p id="message">Processing...</p>
|
2026-05-10 23:41:32 +00:00
|
|
|
<p id="fallback" style="display:none">
|
|
|
|
|
If Obsidian did not open automatically,
|
|
|
|
|
<a id="deeplink" href="#">tap here to return to Obsidian</a>.
|
|
|
|
|
</p>
|
2025-04-13 20:18:30 +00:00
|
|
|
<script>
|
|
|
|
|
const params = new URLSearchParams(window.location.search);
|
|
|
|
|
const code = params.get('code');
|
|
|
|
|
const state = params.get('state');
|
2026-05-10 23:41:32 +00:00
|
|
|
const messageEl = document.getElementById('message');
|
2025-04-13 20:18:30 +00:00
|
|
|
|
|
|
|
|
if (code && state) {
|
2026-05-10 23:41:32 +00:00
|
|
|
const target = 'obsidian://ticktick-callback'
|
|
|
|
|
+ '?code=' + encodeURIComponent(code)
|
|
|
|
|
+ '&state=' + encodeURIComponent(state);
|
|
|
|
|
messageEl.innerText = 'Returning you to Obsidian…';
|
|
|
|
|
const fallback = document.getElementById('fallback');
|
|
|
|
|
const link = document.getElementById('deeplink');
|
|
|
|
|
link.href = target;
|
|
|
|
|
fallback.style.display = 'block';
|
|
|
|
|
window.location.replace(target);
|
2025-04-13 20:18:30 +00:00
|
|
|
} else {
|
2026-05-10 23:41:32 +00:00
|
|
|
messageEl.innerText = 'Authorization failed or was canceled. Please try again.';
|
2025-04-13 20:18:30 +00:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
2026-05-10 23:41:32 +00:00
|
|
|
</html>
|