Skip to content

Conversation

@Kuuuube
Copy link
Member

@Kuuuube Kuuuube commented Oct 15, 2025

Partially a regression introduced by #2132
Fixes #2190

  1. Bring back CSSOM sanitization removed in Fix problems with CSS nesting in Yomitan API and Anki note data #2132 as a fallback for when the offscreen page is not available. (5ef41f2)
  2. CSSOM cannot handle complex CSS and will always fail for some dictionaries on browsers that do not support the offscreen page. Allow users to set yomitanApiAllowCssSanitizationBypass to bypass sanitization.
  3. enableYomitanApi uses data-permissions-setting since it has required permissions to be enabled. For some reason permissions settings were never added to the transformation triggers. This is required to only show yomitanApiAllowCssSanitizationBypass when enableYomitanApi is set to true. (1bef193)

Currently, this issue seems to only appear on Firefox. I've limited the visibility of yomitanApiAllowCssSanitizationBypass to Firefox only since it's not something users should have enabled unless really needed.

@Kuuuube Kuuuube requested a review from a team as a code owner October 15, 2025 02:10
@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug browser/firefox The issue is Firefox-only area/api The issue or PR is related to API between Yomitan and other scripts or applications regression This issue or PR is related to a regression area/settings This issue or PR is related to settings. labels Oct 15, 2025
@Kuuuube Kuuuube added this pull request to the merge queue Oct 21, 2025
Merged via the queue into yomidevs:master with commit 9e44437 Oct 21, 2025
25 of 26 checks passed
@Kuuuube Kuuuube deleted the fix-firefox-css-export-api branch October 21, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api The issue or PR is related to API between Yomitan and other scripts or applications area/settings This issue or PR is related to settings. browser/firefox The issue is Firefox-only kind/bug The issue or PR is regarding a bug regression This issue or PR is related to a regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Yomitan (API?) cant export CSS in card with Firefox browser

2 participants