Watch page description below the video with proper open/close toggle, instead of a side bar.
< Feedback on YouTube - Proper Description
this code might work for spa navigation issues, will apply it every time a tab is opened, no need to refresh. just a suggestion
async function runInitialization() {
if (!window.location.pathname.startsWith('/watch')) {
if(debug_mode) console.log("[YTPD] Not a watch page, skipping.");
return;
}
let watch_metadata = await findElement("ytd-watch-metadata");
if (watch_metadata.hasAttribute('data-ytpd-processed')) {
if(debug_mode) console.log("[YTPD] Page already processed, skipping.");
return;
}
watch_metadata.setAttribute('data-ytpd-processed', 'true');
if(debug_mode) console.log("[YTPD] Starting initialization for new video page.");
//
// ...
}
document.addEventListener('yt-navigate-finish', runInitialization);
if (document.body) {
runInitialization();
} else {
document.addEventListener('DOMContentLoaded', runInitialization);
}
code works, sub/button are now right aligned. but needs a fix on the spa navigation, i don't want to refresh every single time when opening a new tab on a youtube video for the proper description to change effect.