···11name: Deploy static content to Pages
2233on:
44+ # Runs on pushes targeting the default branch
45 push:
55- tags:
66- - "*"
66+ # branches: ["main"]
77+ branches: ["**"]
88+# on:
99+# push:
1010+# tags:
1111+# - "*"
712813 # Allows you to run this workflow manually from the Actions tab
914 workflow_dispatch:
+19-1
oauth-callback.html
···107107 <script>
108108 (function() {
109109 try {
110110+ // Prevent duplicate execution on mobile (when switching back to browser)
111111+ const redirectKey = 'atmosphere_oauth_redirected';
112112+ if (sessionStorage.getItem(redirectKey) === 'true') {
113113+ // Already redirected, show completion message
114114+ document.querySelector('.spinner').style.display = 'none';
115115+ document.querySelector('h1').textContent = '✅ Redirected!';
116116+ document.getElementById('status').textContent = 'Return to Obsidian to complete login.';
117117+ document.getElementById('manual-link').classList.add('show');
118118+ return;
119119+ }
120120+110121 // extract OAuth parameters from URL hash (not search string)
111122 const params = new URLSearchParams(window.location.hash.slice(1));
112123···115126 // store the URI for manual copy
116127 document.getElementById('link-text').textContent = obsidianUri;
117128118118- window.location.href = obsidianUri;
129129+ // Mark as redirected BEFORE the redirect to prevent race conditions
130130+ sessionStorage.setItem(redirectKey, 'true');
131131+132132+ // Small delay to ensure any pending IndexedDB writes complete
133133+ // This is important on mobile where the browser may suspend the tab
134134+ setTimeout(function() {
135135+ window.location.href = obsidianUri;
136136+ }, 100);
119137120138 setTimeout(function() {
121139 const spinner = document.querySelector('.spinner');