Skip to content

Fix video owner channel link after SPA navigation#3867

Draft
OnlyYu1996 wants to merge 2 commits into
code-charity:masterfrom
OnlyYu1996:codex/fix-video-owner-channel-link
Draft

Fix video owner channel link after SPA navigation#3867
OnlyYu1996 wants to merge 2 commits into
code-charity:masterfrom
OnlyYu1996:codex/fix-video-owner-channel-link

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • refresh the cached watch-page owner channel elements during video page updates
  • restore the current owner link from YouTube renderer endpoint data before applying the default channel tab rewrite
  • add a regression test for reused owner link nodes retaining a previous channel URL

Fixes #1485

Tests

  • npm ci
  • npx jest tests/unit/video-owner-channel-link.test.js --runInBand
  • npx jest tests/unit/watch-later-buttons.test.js tests/unit/popup-preview-button.test.js tests/unit/remaining-duration.test.js tests/unit/video-owner-channel-link.test.js --runInBand
  • ESLINT_USE_FLAT_CONFIG=true npx eslint --config tests/eslint_rules.config.mjs tests/unit/video-owner-channel-link.test.js
  • node --check js&css/web-accessible/functions.js && node --check tests/unit/video-owner-channel-link.test.js
  • git diff --check

Note: running ESLint over the full existing js&css/web-accessible/functions.js still reports pre-existing style issues outside this patch.

@improvedtube-backup
Copy link
Copy Markdown
Collaborator

  1. Why was this added (years ago) without depending on a feature being enabled?
    (should probably not. Did it fix a Youtube Bug before ?)

else if (name === 'YTD-VIDEO-SECONDARY-INFO-RENDERER') {
this.elements.yt_channel_name = node.querySelector('ytd-channel-name');
this.elements.yt_channel_link = node.querySelector('ytd-channel-name a');

  1. How did Link to Video Owner's Channel not updating when switching videos #1485 happen?

@improvedtube-backup improvedtube-backup marked this pull request as draft May 18, 2026 04:40
@OnlyYu1996
Copy link
Copy Markdown
Author

因项目不接受 AI 辅助贡献,主动关闭此 PR。抱歉打扰。

@OnlyYu1996 OnlyYu1996 closed this May 18, 2026
@improvedtube-backup
Copy link
Copy Markdown
Collaborator

hi @OnlyYu1996 didn't say so.
You can add disclosure.
And tune your system or make it semi-automated in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link to Video Owner's Channel not updating when switching videos

2 participants