You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Add a profile condition that always uses the base page's URL for regex matching. This is useful for readers that load content into an iframe, where the iframe may not have a URL or uses methods like srcdoc. Currently, Yomitan attempts to match the iframe's URL, even if none exists.
For example, in Calibre's content server (with the hack from #499 applied), the library name is presented in the library_id= component of the URL. A user might want to automatically switch profiles—using the English profile for library_id=eng and the Japanese profile for library_id=jpn, etc. However, this doesn't work because Calibre uses srcdoc to load book content, and Yomitan fails to detect the iframe's URL.
Examples
Below is some HTML that demonstrates this behavior.
Yomitan profiles:
Japanese (default)
English (condition: URL regex: "english")
Description
Add a profile condition that always uses the base page's URL for regex matching. This is useful for readers that load content into an iframe, where the iframe may not have a URL or uses methods like srcdoc. Currently, Yomitan attempts to match the iframe's URL, even if none exists.
For example, in Calibre's content server (with the hack from #499 applied), the library name is presented in the library_id= component of the URL. A user might want to automatically switch profiles—using the English profile for library_id=eng and the Japanese profile for library_id=jpn, etc. However, this doesn't work because Calibre uses srcdoc to load book content, and Yomitan fails to detect the iframe's URL.
Examples
Below is some HTML that demonstrates this behavior.
Yomitan profiles:
english.html
english_content.html
The english profile condition works on the first iframe but not the second (srcdoc), which mirrors how some readers load content.
Browser version
Firefox
Yomitan version
24.10.7.1
The text was updated successfully, but these errors were encountered: