Skip to content

Commit

Permalink
v4.70.49
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfung1031 committed May 2, 2024
1 parent 60953a4 commit 303e916
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -3913,7 +3913,7 @@ yt-update-unseen-notification-count yt-viewport-scanned yt-visibility-refresh
const iframe = querySelectorFromAnchor.call(chatBlock, 'body iframe.style-scope.ytd-live-chat-frame#chatframe');
// console.log("iframe.xx",501,iframe)
// showMessages_IframeLoaded && console.debug('[tyt.iframe] loaded 0B');
if (iframe && iframeLoadProcessWR.has(iframe)) Promise.resolve(iframe).then(iframeToVisible); // fix empty
if (iframe) Promise.resolve(iframe).then(iframeToVisible); // fix empty


/*
Expand Down Expand Up @@ -6051,12 +6051,13 @@ yt-update-unseen-notification-count yt-viewport-scanned yt-visibility-refresh
// };

let ix93 = 0;
const iframeLoadProcessWR = new WeakSet;
const iframeLoadStatusWM = new WeakMap;
const iframeLoadProcess = async function (_iframe) {

const iframe = _iframe;

const t93 = ++ix93;
iframeLoadStatusWM.set(iframe, t93*2);

await scriptletDeferred.d();
// iframe.dispatchEvent(new CustomEvent('yt-live-chat-iframe-fix-polymer'));
Expand Down Expand Up @@ -6180,7 +6181,7 @@ yt-update-unseen-notification-count yt-viewport-scanned yt-visibility-refresh
showMessages_IframeLoaded && console.debug('[tyt.iframe] loaded 22');
// chatFrame.setAttribute('tyt-iframe-loaded', '');
dpeIframeReady(chatFrame);
iframeLoadProcessWR.add(iframe);
iframeLoadStatusWM.set(iframe, t93*2+1);
}
}

Expand All @@ -6205,6 +6206,7 @@ yt-update-unseen-notification-count yt-viewport-scanned yt-visibility-refresh
const iframeToVisible = async function (_iframe) {
const iframe = _iframe;
if (iframe.isConnected !== true || !(iframe instanceof HTMLIFrameElement)) return;
if (((iframeLoadStatusWM.get(iframe) || 0) % 2) !== 1) return;
const chat = closestDOM.call(iframe, 'ytd-live-chat-frame#chat');
if (!chat) return;
if (chat.hasAttribute('collapsed') || iframe.isConnected !== true) {
Expand Down Expand Up @@ -7816,7 +7818,7 @@ yt-update-unseen-notification-count yt-viewport-scanned yt-visibility-refresh
const iframe = querySelectorFromAnchor.call(chat, 'body iframe.style-scope.ytd-live-chat-frame#chatframe');
// console.log("iframe.xx",501,iframe)
// showMessages_IframeLoaded && console.debug('[tyt.iframe] loaded 0D');
if (iframe && iframeLoadProcessWR.has(iframe)) Promise.resolve(iframe).then(iframeToVisible); // fix empty
if (iframe) Promise.resolve(iframe).then(iframeToVisible); // fix empty

}
}, 67);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"host_permissions": [
"https://www.youtube.com/*"
],
"version": "4.70.48",
"version": "4.70.49",
"web_accessible_resources": [{
"resources": ["images/*.png", "js/injection*.js", "js/content.js", "css/style_*.css"],
"matches": ["https://www.youtube.com/*"]
Expand Down
2 changes: 1 addition & 1 deletion version.ini
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.70.48
4.70.49

0 comments on commit 303e916

Please sign in to comment.