Force tab to render - google-chrome-extension

Is there a way to force a certain tab to render, even without currently being the active tab?
The reason i need to do this is because my extension uses chrome.tabs to open multiple tabs and switch between them, and whenever I switch to a tab which has not yet been active, the tab has not rendered yet, which causes a white flash to appear on the tab until the tab renders. The duration of the white flash is also proportional to how heavy the web page is to render.
What I've noticed though, is that if you switch to a tab which was active at least once in the past, the white flash does not appear (since it has been rendered at least once in the past)
I need to force a tab to be rendered before switching to it, so that the white flash doesn't appear.
I am writing on chrome version 38 (due to technical restrictions)
Thanks

No. You can't control it.
The white flashing is indeed an annoying known issue.
The only wild idea that can be implemented right now:
create a new minimized window with a blank url or about:blank,
move the tab you need into that window via chrome.tabs.move
now that the tab is active Chrome should render it even in a minimized window
then after a while move the tab back and activate it

Related

Set the browser's tab background color with browser extension/addon

Is there any way of setting the browser's tab background color (not the favicon image) and text color with the help of an browser extension/addon.
I've searched the internet to and fro and found nothing in the APIs. So I think it is not possible. But maybe someone has a solution for that.
What I want to achieve is to tint the colors of TYPO3 tabs according to the application context (Development, Production/Staging, Staging). I managed to set the top-bar color in the TYPO3 backend depending in the application context, so the logic works well. What I'd like to have now is a way of tinting the tab.
You are right: there's nothing in Firefox or Chrome API that allows you to color individual tabs easily. But there are some workaround ideas..
Colorful Tabs uses theme override to style individual tabs, including (by default) based on domain, using the browser.theme API that only Firefox supports. However, after trying it out, it might not fit your requirements: in current Firefox version it only affects the color of the currently selected tab (and the address bar), not providing you with a good overview.
Some other extensions for Firefox, for example TST Colored Tabs use sidebar tab representation that duplicates the tab bar, with possible enhancements. Also not ideal, and also Firefox-specific.
For Chrome, there's a Chrome-specific API tabGroups that can add color outline to tabs, but only by adding them to a group. You can have many groups, but it's still going to be ugly if your tabs are interspersed or moved around.
So let me propose an out of the box solution: use a custom favicon per application context instead of trying to change how the tab UI looks. That would be always visible in the tabs strip without any code on the browser's part. You could also override favicons from extension code if there's no easy way to do it on the application side.

Make Chrome Extension Browser Action Popup bigger than browser window

In FireFox extensions, the Panel/Popup that opens on the Toolbar sizes itself outside the browser window, if needed, so that we see every populated elements in the panel. In Chrome however, the popup/panel is only drawn until the browser window's boundaries. So, if the user resizes the browser window small enough, you don't see the entire popup.
I checked the documentation and couldn't find anything. Is there anything that can be done to show the entire popup?
This seems to be OS-dependent (can be reproduced on Linux and Win7, but not Win10).
As an extension author, there is nothing you can do to control it, this is just how the browser renders its content. You could submit a bug report.

Why is Excel / Word 2013 starting invisible?

Our Company recently upgraded to Office 2013 since we want to use SharePoint 2013.
We had several issues with the new Office Version but Microsoft has already solved some of them.
Anyways, one thing sitll grinds my gears:
Excel or Word sometimes starts invisible. It is visible in the Taskbar but the window doesnt pop up. I can click on the Icon in the taskbar but it doesn't change anything. The only way i figured out to show the window, is to use [Windows] + [Arrow Keys].
I can't tell the constellation why this is happening but most of the time it is if there isn't already another instance of the program running.
I don't have Office 2013 at home to reconstruct this but I have seen this on different Computers at our Office.
Now does anybody know about this issue?
What can I do about it?
Is it known to Microsoft?
Any help is appreciated.
I don't think that it's invisible, it's just starting off screen somewhere. Perhaps on a second monitor that is no longer there (or moved virtually to the other side). The [Windows] + [Arrows Keys] just moves the window onscreen where you can see it.
Alternatively, you could hover the mouse over the icon on the task bar, right click on the preview window and then select Move (if Move is grayed out, select restore and repeat). Then, hit any [Arrow Key] (this will attach your mouse to the window caption bar) then move your mouse (without clicking anything) until the window shows up on screen.
By doing this you can figure out what side of the screen the application is opening up (not that knowing helps much). Excel should just show up where ever you had it last, but it will not remember it's location if you snap it to the sides or top of the screen (which is what you were doing); It will only remember the Normal View size and position of the window.
My workaround for this bug is to click the Taskbar icon for the new (invisible) window while it's active, which minimizes the window, then click it again to restore it. Then it becomes visible.
I have the same issue, and it's definitely an invisible window, not off-screen (see workaround below).
It only happens in specific circumstances: when opening a second word doc from a sharepoint/office 365 location, the second doc gets a taskbar icon, but no visible content, so the first doc is still visible (but the second doc is invisibly in front of it).
The workaround is to click the minimise button on the first doc. Nothing will appear to happen because it's the invisible second doc window that receives the click event. Then select the icon on the task bar to make it reappear, properly visible.

Keep taskbar icon, replace MFC dialog

I have a MFC dialog based application. User can change the language of the dialog, and I made this by closing existing dialog, and opening another with changed language. The problem is that the effect in the taskbar is that one icon is removed, and another identical is created in its place. If my application's icon is not the last icon in the task bar it will be perceived as it was moved to the end of taskbar icon set.
I want to retain icon's position in the taskbar, and rather to prevent icon flicker at all from happening. How do I do that?
The application must support OS'es from Windows XP to Windows 7.
EDIT: alternative question for which I would accept an answer is how to create an invisible window that is nevertheless shown in the taskbar, and how to forward relevant window messages from that window to my main window?
Make the dialog a child of another outer parent window. The parent can be a dialog or any other kind of window; all it will be providing is the title bar. If the user tries to resize it it will have to forward resizing commands to the dialog, but otherwise you shouldn't need to do much in the parent window.
Why not replace the dialog with a CFormView instead? That way there's a frame window that wraps around the dialog (which is embedded in a form view) and it's the frame window that owns the taskbar icon.
Create an SDI application that displays a CFormView. Display the dialog in the default language (or whatever langauge the user previously chose) on initialization. When the user chooses the 'change language' option, simply change the form view that's being displayed with a new one.
Bonus feature: with this design, the framework will take care of things like language-specific accelerators and menus for you with no effort on your part.
For more on how to do this, check out http://www.codeguru.com/cpp/w-d/doc_view/viewmanagement/article.php/c3341/Multiple-Views-Using-SDI.htm

UIWebView example code for in-app browser?

Anyone have some sample code for an in-app browser that they would like to share?
I am looking to add a browser view in my app that is pushed and includes a toolbar with four buttons: back, forward, stop/refresh and actions. However, I'd like to show somewhat transparent and none-tapable buttons when you can't go forward or back, and also have the stop/refresh button show the appropriate icon when it's loading and done loading?
My issue is currently that I cannot get "blanked out" back and forward that cannot be tapped if you cannot go back in the web history. Also, how do I change out the stop icon with the refreshing icon when the view is loading?
For tool bar items, simply set "item.enabled = webview.canGoForward;" (or canGoBack). To change the refresh/stop button you can set item.customView if you want to use a progress view or some such, otherwise if you just want to use a static image you can set item.image. All this is in the documentation as well.

Resources