fix hugo callback
This commit is contained in:
@ -253,6 +253,24 @@ function setupAskAIEventListeners() {
|
||||
handleAIResponse(event.detail);
|
||||
});
|
||||
|
||||
// Listen for OAuth callback completion from iframe
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.type === 'oauth_success') {
|
||||
console.log('Received OAuth success message:', event.data);
|
||||
|
||||
// Close any OAuth popups/iframes
|
||||
const oauthFrame = document.getElementById('oauth-frame');
|
||||
if (oauthFrame) {
|
||||
oauthFrame.remove();
|
||||
}
|
||||
|
||||
// Reload the page to refresh OAuth app state
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
// Track IME composition state
|
||||
let isComposing = false;
|
||||
const aiQuestionInput = document.getElementById('aiQuestion');
|
||||
|
147
my-blog/static/oauth/assets/comment-atproto-BQKPMV57.js
Normal file
147
my-blog/static/oauth/assets/comment-atproto-BQKPMV57.js
Normal file
File diff suppressed because one or more lines are too long
1
my-blog/static/oauth/assets/comment-atproto-BUFiApUA.css
Normal file
1
my-blog/static/oauth/assets/comment-atproto-BUFiApUA.css
Normal file
File diff suppressed because one or more lines are too long
3
my-blog/static/oauth/index.html
Normal file
3
my-blog/static/oauth/index.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!-- OAuth Comment System - Load globally for session management -->
|
||||
<script type="module" crossorigin src="/assets/comment-atproto-BQKPMV57.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-BUFiApUA.css">
|
Reference in New Issue
Block a user