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

Run the extension as a page_action not browser_action #12

Open
follesoe opened this issue Nov 15, 2013 · 0 comments
Open

Run the extension as a page_action not browser_action #12

follesoe opened this issue Nov 15, 2013 · 0 comments

Comments

@follesoe
Copy link
Owner

Chrome supports different types of extensions - two of them are browser_action and page_action.

Currently we use a browser_action- meaning the extension will add a button that is visible on all pages. A page_action is an extension that is only active on certain pages - for instance an extension that shows an RSS icon in the address bar if the current page has RSS on it.

Map Replace should probably be a page_action extension. Page Actions can be activated by URL or by content. See list of examples on Chrome Extension documentation page. If we do it by content, the extension can check the content of the current page, and see if Google Maps is loaded on the page or not - and if so, light up the extension.

Next - we can relax the permissions requested in the manifest file - and instead use the permission API and explicitly ask for permissions on a pr. domain basis, as well as allowing to turn map replace on/off on a pr domain basis.

Even if we don't use the permission API - making it a page action would make sense, as it would allow for pr. page settings of both enabling/disabling the extension, as well as selecting with type of layer you want to use for each page.

This feature should be implemented on a feature branch so that we can easily test it and see if a page_action would work better than a browser_action.

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

No branches or pull requests

1 participant