Is there a way in chrome extensions to add a div OVER the page view, not to the page. I want that when I switch to another tab, the div is still there. The div should not be a part of the page, but over every page.
When this is possible: How?
No such thing.
You would need to add a div to each tab and then sync its content by exchanging messages with a background page (or make it iframe linked to extension's html page).
Related
I want to implement scrolling to a particular section on click in Liferay, but I have no idea how to add functionalities in Liferay.
I have created a page using multiple fragments and in the top of the page I have headers of the sections and on click of a header the page should be scrolled to that particular section.
Attached page screenshot link below for reference
The easiest way to scroll to some place on the page is to place an anchor there, e.g. with <a name="scrollTarget"/>. In your navigation, you'll just link to this by Scroll to Target and you're set.
Of course, this can be done a lot fancier, with an animated scroll etc, but the basic start is this. There's nothing Liferay-specific hidden here - pick any of the more fancy methods, create fragments with the proper markup, and make sure they're used on your page.
When a user clicks on extension icon I need it to open a page that renders predefined HTML instead of a popup window with this HTML.
For popup window, I know that I need to use browser_action.default_popup in the manifest. What do I need to use for a page?
I want to dynamically generate some buttons on my chrome extension default_popup HTML page and I want on click to open a model in the middle of the screen NOT a new tab, I saw some other extensions having its options like this, and then display some info.
I think the only possibility isto get rid of the defalt_popup and inject all my scripts through the background page straight into the html page.
I need to have a small div like a popup
on my chrome extension.
This div needs to have a simple animation and not to have menu bar at all.
Is it possible to do it with chrome.windows.create
Method ? Is there another way to do it ?
What I need is similar to pocket's extension popup.
https://chrome.google.com/webstore/detail/save-to-pocket/niloccemoadcdkdjlinkgdfekeahmflj?hl=en
You need to use content scripts. If you have made a trigger the content script is able to change the page. By using that to your advantage you can add a div filled with all of the html you want to add. You can find a in depth example here.
I am developing a chrome extension that would like to add a tab at the bottom of the page to manipulate DOM elements. Chrome 'manifest.json' file doesn't provide such feature. So how to do it or rather how does Firebug add a tab at the bottom of the Chrome?
I would suggest inserting a panel in every page through a content script. You can style it in order to appear at the bottom of the page and be always visible.
In order for it to retain its state between navigation from one page to another, you need to persist it some how (example use chrome.storage or a similar mechanism through the background page to persist the content (or whatever you need).
See this answer on how to insert (and style) a toolbar-like div or iframe in a page through a content script. (It is fixed to the top of the page, but you can easily modify the code to fix its position at the bottom.)