Is it possible to resize the width of the tabs for a tab opened with chrome.tabs.create, something like
chrome.tabs.create({url: url});
chrome.resizetab(width); //maybe something like this
Also, can we make the tab title blank and show only the favicon instead of showing "Untitled"?!
Related
I tried with chrome.browserAction.setIcon({path: "play.png"}); but it not chnaged when tab is close also I tried to pass chrome.browserAction.setIcon({path: "play.png", tabID}); in this icon chnage with i sifted to other tab.
I want to set Icon which Change on tab create and it not change to the default icon until that tab not close.
The horizontal tabs menu is the bar on top of the web browser that I can click on to jump to different tabs.
For example, can I make a chrome extension that highlights a tab in the tabs bar for 5 seconds before closing it?
Try chrome.tabs.highlight:
highlight
chrome.tabs.highlight(object highlightInfo, function callback)
Since Chrome 16.
Highlights the given tabs.
How to inject content scripts when the icon is clicked, without using onClicked.addListener() in the background page, because this will prevents the popup from showing up.
I want the popup to display and a content script to be injected simultaneously (to get the text highlighted in the page)
I am using iFrameResizer version 3.3.3.
I have 3 iframes set into tabs of a jquery tabs object on a page.
each I frame contains its own tabbed view where the length changes considerably depending on which tab is clicked inside the iframe.
The resizing works perfectly on the a single iframe.
However, on the other 2 iframes (which are on the hidden tabs of the parent page) have their height set to zero and once iFrameResize() as run, the size will not dynamically change.
I have tested this further where I do not run iFrameResize automatically on the page. each iframe loads with its default size. If I select the second tab then run iFrameResize from the console, the 2nd tab iframe resizes automatically while the iframes on tabs 1 and 3 have their height set to 0.
Ideally I would like each tab to "activate" its iframe when it is selected and allow the iframe to resize automatically as each of the tabs inside the iframe are selected. This would be regardless of anything currently selected on any of the other tabs on the parent page.
You can see the above mentioned page at http://brellatech.com.au/iframe.php
Is this possible with iFrame Resizer?
Regards
Greg J
I'm trying to create a chrome extension that will allow me to display the current URL in a modal or popup window. The URL will be enlarged so that it is easier for students to see in the classroom. My goal is to get away from my current method, which is to copy/paste the URL into notepad and enlarge the font so that students in the back of the room can see it. It would be great if I could simply click on an extension and have the URL displayed in a nice large font. Unfortunately, this is the first chrome extension I've ever written, so I'm running into all sorts of n00b issues.
Anyway, I've gotten close by following this post:
How can I get the URL of the current tab from a Google Chrome extension?
Here's my code:
chrome.tabs.getSelected(null,function(tab) {
var tablink = tab.url;
document.write("<h1 style='font-size: 100px;'>" + tablink + "</h1>");
});
The problem is this code opens the URL in a popup with a horizontal scroll bar.
I either need to:
figure out a way to turn on word-wrap (to eliminate the scroll bar) ... or
adjust the width of the popup window so that it takes up the entire width of the screen ... or
find a different window solution (modal, new window that's alwaysOnTop, etc)
I tried chrome.windows.create but I couldn't figure out how to adapt the code above to use chrome.windows.create, and I also couldn't figure out how to make the resulting new window have active focus (focused: true didn't seem to work for me).
I also read that chrome.tabs.getSelected has been deprecated and I should be using chrome.tabs.query. However, I've had trouble getting the query method to work.
Again, this is my first chrome extension, so your patience, understanding, and help is greatly appreciated. Thanks!