Skip to content

Commit

Permalink
v4.34.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfung1031 committed Sep 24, 2023
1 parent 339da87 commit a4bb115
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions js/injection_script_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -2395,16 +2395,21 @@ function injection_script_1() {

const ytdFlexyElm = document.querySelector('ytd-watch-flexy[tyt-tab]');
if (!ytdFlexyElm) return null;
const ytdFlexyCnt = ytdFlexyElm.inst || ytdFlexyElm;

/** @type {HTMLElement} */
let newPanel = ytdFlexyElm.createComponent_({
const newPanel = ytdFlexyCnt.createComponent_({
"component": "ytd-engagement-panel-section-list-renderer",
"params": {
"isWatch": true
}
}, "ytd-engagement-panel-section-list-renderer", true);

const newPanelHostElement = (newPanel || 0).hostElement || newPanel;
const newPanelCnt = (newPanelHostElement || 0).inst || newPanelHostElement;


newPanel.data = {
newPanelCnt.data = {
"panelIdentifier": "engagement-panel-genius-transcript",
"header": {
"engagementPanelTitleHeaderRenderer": {
Expand Down Expand Up @@ -2454,11 +2459,11 @@ function injection_script_1() {
}
};

newPanel.classList.add('style-scope', 'ytd-watch-flexy');
newPanelHostElement.classList.add('style-scope', 'ytd-watch-flexy');

elementAppend.call(querySelectorFromAnchor.call(ytdFlexyElm, '#panels'), newPanel);
elementAppend.call(querySelectorFromAnchor.call(ytdFlexyElm, '#panels'), newPanelHostElement);

return newPanel;
return newPanelHostElement;

}

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"host_permissions": [
"https://www.youtube.com/*"
],
"version": "4.34.0",
"version": "4.34.1",
"web_accessible_resources": [{
"resources": ["images/*.png", "js/injection*.js", "js/content.js"],
"matches": ["<all_urls>"]
Expand Down
2 changes: 1 addition & 1 deletion version.ini
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.34.0
4.34.1

0 comments on commit a4bb115

Please sign in to comment.