Maytas Monsereenusorn
Maytas Monsereenusorn

Reputation: 111

Extending github-highlight-selected chrome extension to every webpage

I found a chrome extension called github-highlight-selected at https://github.com/Nuclides/github-highlight-selected I am trying to extend this function to every webpages not just Github. I thought it would be simply changing the manifest.json for "matches": [ "https://github.com/*" ] to "matches": ["<all_urls>"] However, the extension does not work outside of Github. Nothing is highlighted when text is selected. Can anyone guide me in the right direction? Thanks!

Upvotes: 1

Views: 130

Answers (1)

Haibara Ai
Haibara Ai

Reputation: 10897

You should know the previous extension is targeted at github source view, so the hightlight-selected.js contains many DOM operations which is bound to github source view, and will not be fit in other webpages, because their DOM info are not the same.

You should analyze the page you want to highlight, and summarize if there are the same part you can make use of.

Upvotes: 1

Related Questions