Skip to content

Remove MS Teams integration and scope extension styles and scripts #86exa5j3c#9

Merged
navidshad merged 8 commits intodevfrom
CU-86exa5j3c_Fix-extension-load-inconsistency-on-youtube_Navid-Shad
Apr 30, 2026
Merged

Remove MS Teams integration and scope extension styles and scripts #86exa5j3c#9
navidshad merged 8 commits intodevfrom
CU-86exa5j3c_Fix-extension-load-inconsistency-on-youtube_Navid-Shad

Conversation

@navidshad
Copy link
Copy Markdown
Collaborator

@navidshad navidshad commented Apr 30, 2026

📋 Summary

This PR removes the MS Teams integration and tightens the content-script matches. It also improves the classification of the Netflix scope wrapper before insertion and ensures document scoping is applied correctly. CSS and dark mode styling are scoped within the extension wrapper to prevent Tailwind preflight styles from bleeding onto host pages. Additionally, the extension version has been bumped to 1.9.1.

🔗 Related Tasks

#86exa5j3c - Remove MS Teams integration, tighten content-script matches, classify Netflix scope wrapper before insertion, document scoping improvements, apply dark mode inside scoped wrapper, and scope extension CSS to prevent style bleeding.

📝 Additional Details

  • Tailwind preflight global styles are now contained within the extension wrapper to avoid conflicts with host pages.
  • Dark mode styling is applied only inside the scoped extension wrapper.
  • Version bump to 1.9.1 in both package.json and manifest.json.

📜 Commit List

  • 5f25ccc chore: remove MS Teams integration and tighten content-script matches #86exa5j3c
  • 0014974 fix: classify Netflix scope wrapper before insertion and document scoping #86exa5j3c
  • 3562faf fix: apply dark mode inside the scoped extension wrapper #86exa5j3c
  • 451c452 fix: scope extension CSS to prevent Tailwind preflight bleeding onto host pages
  • b6c8818 chore: bump version to 1.9.1 in package.json and manifest.json

navidshad and others added 8 commits July 23, 2025 12:33
…host pages

Tailwind preflight from src/tailwind.css and @codebridger/lib-vue-components was being injected into document.head, where its universal selectors (`*, ::before, ::after`, `button`, `img`, ...) reset host-page styles. On YouTube this broke icon rendering and prevented the profile page video grid from loading.

Add postcss-prefix-selector to scope every selector under `.subturtle-scope` and tag all mount roots (#subturtle-app, #subturtle-popup) and teleport target wrappers with that class. The transform is idempotent (node_modules CSS was visited more than once) and drops `body` rules so the library's page-level background/font do not paint our wrapper.

#86exa5j3c
…ping #86exa5j3c

The Netflix initializer inserted #subturtle-app into the DOM before adding
the `subturtle-scope` class, so the MutationObserver in the settings store
saw an unclassed element and skipped theme application — leaving Netflix
without dark mode and any observer-based scope handling. Reorder so the
id, classes, and inline styles are set before insertion, matching YouTube
and MS Teams.

Add clarifying comments where the WHY is non-obvious:
- postcss.config.js: top-level overview of the scoping strategy plus
  inline notes on the idempotency guard, body/html/:root drops, and the
  .dark compound rewrite.
- settings store: explain why dark/light lives on .subturtle-scope
  elements (compound selector rewrite) instead of <html>, and why the
  MutationObserver is needed for teleport wrappers mounted after init.
- Teleport wrappers (WordSelectionRectangle, YouTube/MS Teams Index.vue):
  flag that the teleport target escapes #subturtle-app.
- _support-template initializer: canonical note describing the role of
  the subturtle-scope class for new surfaces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… #86exa5j3c

The MS Teams surface relied on a Trusted-Types monkey-patch that was
suspected of breaking YouTube but turned out to be a non-issue once the
Tailwind preflight bleed was fixed. With no active MS Teams users on the
extension, drop the integration to reduce surface area.

- Delete src/subtitle/ms-team (Index.vue, components, initializer, static).
- Remove the msTeam initializer import and the trusted-types-polyfill
  side-effect import from src/main.ts.
- Drop https://teams.microsoft.com from manifest content_scripts and
  tighten the YouTube match to https://www.youtube.com/watch?* so the
  bundle only loads on actual watch pages.
- Update src/subtitle/README.md to remove MS Teams references.

Keep src/trusted-types-polyfill.ts in the tree (now unimported) with a
generalized doc comment, since it remains the canonical workaround for
hosts with strict Trusted Types CSP and may be opted into by future
content scripts that need to run on such sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@navidshad
Copy link
Copy Markdown
Collaborator Author

@navidshad navidshad changed the title Cu 86exa5j3c fix extension load inconsistency on youtube navid shad Remove MS Teams integration and scope extension styles and scripts #86exa5j3c Apr 30, 2026
@navidshad navidshad merged commit 98104fd into dev Apr 30, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant