Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update manifest.json to allow rikaikun to work in srcdoc iframes. #411

Merged
merged 2 commits into from
Apr 28, 2021

Conversation

melink14
Copy link
Owner

@melink14 melink14 commented Apr 28, 2021

Documented here: https://developer.chrome.com/docs/extensions/mv3/content_scripts/ but that page doesn't mention srcdoc. Essentially srcdoc is a way to inject html into an iframe and as such it doesn't have a src attribute. In this case, chrome treats the src attribute as about:blank which means without this option these types of frames won't have rikaikun injected into them.

This stackoverflow is a great overview and also implies that the documentation used to be better:
https://stackoverflow.com/questions/41408936/can-anyone-explain-that-what-is-the-use-of-match-about-blank-in-chrome-extensi

Inspired by birchill/10ten-ja-reader@946b3aa

Fixes #410

@melink14 melink14 changed the title fix: Updates manifest.json to allow rikaikun to work in srcdoc iframes. fix: Update manifest.json to allow rikaikun to work in srcdoc iframes. Apr 28, 2021
Copy link
Collaborator

@Stephie Stephie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable!

@mergify mergify bot merged commit 093824b into master Apr 28, 2021
@mergify mergify bot deleted the issue-410 branch April 28, 2021 04:50
melink14 pushed a commit that referenced this pull request May 10, 2021
## [1.1.0](v1.0.0...v1.1.0) (2021-05-10)

### Features

* **dict:** Update dictionaries ([#451](#451)) ([97e6306](97e6306))
* **dict:** Update dictionaries to latest versions. ([#469](#469)) ([96a6032](96a6032))

### Bug Fixes

* Change manifest.json description to be more descriptive. ([#268](#268)) ([5fb116c](5fb116c)), closes [#245](#245)
* Falsy setting values now correctly initialize. ([#408](#408)) ([327eecd](327eecd)), closes [#346](#346)
* Migrate `onSelectionChanged` to `onActivated` ([#461](#461)) ([d8a0a9d](d8a0a9d)), closes [#153](#153)
* Remove unneeded tabs permission from manifest. ([#266](#266)) ([d529e62](d529e62)), closes [#152](#152)
* Reset badge text to empty on extension startup ([#462](#462)) ([b4afd3f](b4afd3f)), closes [#82](#82)
* Update manifest.json to allow rikaikun to work in srcdoc iframes. ([#411](#411)) ([093824b](093824b)), closes [#410](#410)
melink14 pushed a commit that referenced this pull request May 11, 2021
## [1.1.0](v1.0.0...v1.1.0) (2021-05-11)

### Features

* **dict:** Update dictionaries ([#451](#451)) ([97e6306](97e6306))
* **dict:** Update dictionaries to latest versions. ([#469](#469)) ([96a6032](96a6032))

### Bug Fixes

* Change manifest.json description to be more descriptive. ([#268](#268)) ([5fb116c](5fb116c)), closes [#245](#245)
* Falsy setting values now correctly initialize. ([#408](#408)) ([327eecd](327eecd)), closes [#346](#346)
* Migrate `onSelectionChanged` to `onActivated` ([#461](#461)) ([d8a0a9d](d8a0a9d)), closes [#153](#153)
* Remove unneeded tabs permission from manifest. ([#266](#266)) ([d529e62](d529e62)), closes [#152](#152)
* Reset badge text to empty on extension startup ([#462](#462)) ([b4afd3f](b4afd3f)), closes [#82](#82)
* Update manifest.json to allow rikaikun to work in srcdoc iframes. ([#411](#411)) ([093824b](093824b)), closes [#410](#410)
melink14 pushed a commit that referenced this pull request May 11, 2021
## [1.1.0](v1.0.0...v1.1.0) (2021-05-11)

### Features

* **dict:** Update dictionaries ([#451](#451)) ([97e6306](97e6306))
* **dict:** Update dictionaries to latest versions. ([#469](#469)) ([96a6032](96a6032))

### Bug Fixes

* Change manifest.json description to be more descriptive. ([#268](#268)) ([5fb116c](5fb116c)), closes [#245](#245)
* Falsy setting values now correctly initialize. ([#408](#408)) ([327eecd](327eecd)), closes [#346](#346)
* Migrate `onSelectionChanged` to `onActivated` ([#461](#461)) ([d8a0a9d](d8a0a9d)), closes [#153](#153)
* Remove unneeded tabs permission from manifest. ([#266](#266)) ([d529e62](d529e62)), closes [#152](#152)
* Reset badge text to empty on extension startup ([#462](#462)) ([b4afd3f](b4afd3f)), closes [#82](#82)
* Update manifest.json to allow rikaikun to work in srcdoc iframes. ([#411](#411)) ([093824b](093824b)), closes [#410](#410)
melink14 pushed a commit that referenced this pull request May 11, 2021
## [1.1.0](v1.0.0...v1.1.0) (2021-05-11)

### Features

* **dict:** Update dictionaries ([#451](#451)) ([97e6306](97e6306))
* **dict:** Update dictionaries to latest versions. ([#469](#469)) ([96a6032](96a6032))

### Bug Fixes

* **manifest:** Edit the manifest description to fit under the character limit ([de5a21a](de5a21a))
* Change manifest.json description to be more descriptive. ([#268](#268)) ([5fb116c](5fb116c)), closes [#245](#245)
* Falsy setting values now correctly initialize. ([#408](#408)) ([327eecd](327eecd)), closes [#346](#346)
* Migrate `onSelectionChanged` to `onActivated` ([#461](#461)) ([d8a0a9d](d8a0a9d)), closes [#153](#153)
* Remove unneeded tabs permission from manifest. ([#266](#266)) ([d529e62](d529e62)), closes [#152](#152)
* Reset badge text to empty on extension startup ([#462](#462)) ([b4afd3f](b4afd3f)), closes [#82](#82)
* Update manifest.json to allow rikaikun to work in srcdoc iframes. ([#411](#411)) ([093824b](093824b)), closes [#410](#410)
@melink14
Copy link
Owner Author

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rikaikun doesn't work with documents loaded via iframe's srcdoc
2 participants