How to hide Chrome extension notification balloons with JavaScript?
window.close() (assuming you are running it inside notification html)
notification.cancel();
I used it in my Chrome extension.
Related
I am developing a chrome extension and I want to know that is there a function/way that allows me to type and also select text and the extension should stay open? Normally when I Use the extension popup and I Click outside the extension close. Is there a way to avoid this? Thanks in advance
I have an iframe (a google drive form) in my site. When i try to move to another page, the browser shows a message to confirm if i "want to close the window, its possible to lost the changes made".
I am using a javascript, and works on mozilla but not in google chrome
function cierra_ventana()
{
window.open('','_parent','');
window.close();
}
I'm trying to make that if you press a button in the popup window in my chrome extension, it will reload the extension. Is that possible?
Just found this method, which does exactly what I want:
chrome.runtime.reload();
I'm developing an extension for Firefox for Android and I need to programatically open a new tab with no navigation bar. I know I can do it with JS with window.open("http://www.google.com", "mywindow", "location=0,toolbar=0"); but this time I need to disable it another way, because the tab is being opened via loadURI. So, the thing is, how can I change the toolbar visibility once loadURI was executed?
Thanks in advance!
You have to make browser go to full screen mode to achieve that.
For mobile FF you have to create manifest and at there:
"fullscreen": "true"
https://developer.mozilla.org/en-US/Apps/Build/Manifest#fullscreen
I tryed a lot of things I fount over Internet but no success because there is no XUL in FF for Android. So I just solved it by calling fullscreen mode:
window.BrowserApp.selectedBrowser.contentWindow.fullScreen = true;
Where window is the chrome window, not the object window
When I start Chrome, the new window appears as unfocused & behind the other windows. So I decided to create a workaround; I'll change my homepage url with a file from my disk which one contains javascript to steal focus and then redirect to real homepage.
What is the best method to steal focus, using javascript?
UPDATE: Here is what I attempted...
<html>
<head></head>
<body></body>
</html>
<script type="text/javascript">
myWindow=window.open("http://google.com", "_blank",
"resizable=yes, scrollbars=yes, titlebar=yes" );
myWindow.focus();
self.close();
</script>
However new window looks like popup window, Chrome doesn't display toolbars & adress bar is not editable :(
More info about the bug:
http://productforums.google.com/forum/#!topic/chrome/zyLC4Ip96pU
As far as I'm aware, this has only started on the latest update. If Chrome is already open, when I open a new window of Chrome from a shortcut in the quick launch area of my Windows toolbar, the new window does not take focus, the focus remains on the previous Chrome window. If the focus was not on the previous Chrome window when I launch the shortcut it works fine
I just published a small Chrome Extension which aims at solving this bug! So far it worked great for me (on Window 7 64-bit).
You can find it here: https://chrome.google.com/webstore/detail/chrome-new-window-focus/opmhcfhkhiodgapmnaolhmekmfihmecp
Let me know if you encounter any issues!
Cheers,
Yuvi
http://www.w3schools.com/jsref/met_win_focus.asp