I have a very simple webextension that, when new tab is clicked, it's overriden by an html that displays a site inside an iframe.
Relevant aprt of the manifest.json:
"chrome_url_overrides": {
"newtab": "background.html"
},
"permissions": ["tabs"]
and background.html is as simple as:
<html>
<iframe src="https://app.everydaycheck.com">
everydayCheck
</iframe>
</html>
This extension works smoothly for Chrome, you click newtab and while the new tab is displaying/loading the site you can immediately start typing in the omnibox for whichever google search you want. However, that's not the case in Firefox.
While in Firefox 56, the omnibox was populated by the local url of the web extension, Firefox 57 doesn't show it anymore, but it doesn't autofocus the omnibox either.
Looking at https://github.com/cadeyrn/newtaboverride/blob/70d2186b0eb7f8f5ddaaefb4f51b5332127f4ba2/src/js/core/newtab.js#L94 it does seem it should work though.
One thing I have noticed is, if I have focused the omnibox before I click new tab, then the resulting new tab has the omnibox focused. However, if I have been browsing through a website and click new tab, it doesn't.
I don't think the application is "stealing focus" from the omnibox because before the site has loaded, the omnibox has already lost focus.
Does anyone have any idea of how to go about this rather simple and obvious webextension?
By the way, you can try if it works for you:
https://addons.mozilla.org/en-US/firefox/addon/everydaycheck-do-it-every-day/
Thank you.
Related
I'm working on rebranding chromium browser, and I'm having some trouble to setup default new tab page to the one remotely hosted, something that new Edge browser is already doing. but without using page redirect so when you open new tab, you'll get page loaded from URL like
https://ntp.msn.com/edge/ntp?locale=en&title=New%20tab&dsp=1&sp=Bing&startpage=1&PC=U531
but address bar won't be updated with that URL, it stays empty and ready for search. Does anyone know what are the steps to do this in chromium, what needs to be changed, I would really appreciate it.
Thanks!
I'm working on a chrome extension. The content has a stylesheet content.css. When I run the extension on an external site, it applies the style sheet. When I open a page on my "hello world" page on localhost, it applies the content.css styles initially but the styles go away if I refresh the page and I cannot get them back unless I refresh the extenstion.
Can't figure out why this is but I need to get this resolved.
Thanks,
Ken
I have a new extension I'm making, the button makes a drop down popup and in that I have the HTML code
<html>
Google
</html>
This code should direct to google, shouldn't it? I know that its working because Google comes up on the popup but when I click it it does nothing.
Use anchor tag with : target="_blank"
I have a chrome extension where the popup.html simply has an iframe that loads a page.
I want to allow users to select their language, and as I'm helping a charity do this each language page is very different as they need very different content based on the country!
Therefore, I can't just replace some of the fields like the google developer page example does; I need to change the page that is loaded in the iframe.
e.g. In my directory where the pages are stored I have english.html, german.html, spanish.html all of which are completely different pages.
By default the english.html page loads in the iframe, but the user should be able to go into the options file and select german so when they click on the extension the german.html loads by default every time.
Here is the jsfiddle showing what I currently have in the popup.html, and the popup.js:
http://jsfiddle.net/hemang2/EDV82/
You'll see the flickr API being called, but that's only there because I wasn't sure how to get rid of it!
So essentially my question is how to link the options file to change the default url loaded in the iframe.
Use the setPopup method: http://developer.chrome.com/extensions/browserAction.html#method-setPopup
It allows you to set any html file as your popup.
I embedded an iframe in my popup.html of my extension. Inside this iframe the use has to submit by clicking on a button. This opens a new tab which causes my popup.html to be closed.
How can I force the popup.html to remain active?
This is necessary as the iframe processes with more information.
My popup.html: http://pastebin.com/QftvfQ8c
You can not force a popup to remain open.