I'm working on an add-on where most of the content/user interface is hosted in a tab that I open up with the 'tabs' API. I'd really like my tab not to have a bookmarks or address bar, and to forbid navigation away from the content I have specified there. Is there a way to produce a 'naked' tab without these elements, or to strip them from an existing tab? The tab that hosts the add-ons manager in Firefox itself is a good example of what I'm looking for.
You should look at the addon-page module:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/addon-page.html
This is a relatively new module, so if you run into issues or have requests for additional functionality the project would appreciate feedback.
Feel free to post to the google group ( https://groups.google.com/forum/#!forum/mozilla-labs-jetpack ) or the #jetpack channel on irc.mozilla.org.
Related
My team and I are trying to enable an old application that runs on IE to be compatible with Edge.
The main issue we have is we are required to either: 1- Disable the address bar so the user is unable to copy or modify its parameters or 2- hide it completely so users are not able to access it.
The application was built on Struts 2, Java 1.7 for the backend, and it uses JSP and JavaScript for the front end. We have searched everywhere and we have been unable to find a solution to this issue.
You said,"The main issue we have is we are required to either: 1- Disable the address bar so the user is unable to copy or modify its parameters or 2- hide it completely so users are not able to access it."
The Edge browser does not support hiding the address bar.
As a workaround, you can try to install that site as an app.
To add the site as an App, go to Settings and more(ALT + F)-> Apps-> Install this site as an app.
Now if you launch the app, it will not display the address bar.
But users can open the site in the Edge browser from the app, so not sure whether this is suitable for you.
If your requirement is that users should not able to modify/ copy the parameters then I suggest you make the post requests instead of Get requests. It may help you to avoid this issue.
When opening edge use `prefix --app="www.google.com"
or
%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe --app="www.google.com"
this will hide the address bar
I'm trying to develop a Chrome extension that is supposed to completely replace a specific website's pages with a new UI. In other words, when the user visits said website, the extension should "intercept" it seamlessly and display the new "app" (preserving the URL and without opening a new tab or window). I currently use a content script to manipulate the DOM, but it's too messy.
Chrome apps such as Google Docs achieve the same goal through URL handlers, but they're not an option since they're now deprecated.
Currently, I'm aware of two options:
Intercept the URL and redirect it to an extension URL. I want the URL to be preserved.
Use a content script to stop the page from loading at document_start (using window.stop()) and then "inject" the new app. Apparently, that works, but it sounds quite hacky and prone to unexpected glitches.
What I'd like to know:
Is the second approach good enough? What limitations and other issues will I face if I use it?
Is there any other approach that is at least as good (and preferably designed for this purpose)?
You can't open a chrome app in a tab, only in a window. I don't think they have content scripts either.
Also, chrome apps are now only available on chrome os when you publish it for the first time (existing chrome apps work for any os).
To solve your question, you could use an extension with content scripts and just open up an iframe fullscreen so the url is preserved in the omnibox and it could have the page you want in the iframe as the page that would be in the app.
Content handlers are meant for opening a special protocol url to do something like send an email, etc. Examples would be like tel://, sms://, mailto:, etc.
So you would not want this. Also they aren't that noticable when approving to handle the protocol.
I cannot find anything about it but I find it hard to believe no one has ever tried this.
I'm looking for a client-side solution that allows me to re-use an existing web application running in a browser tab/window when a link is 'clicked' externally.
For example, someone sends me en email with 10 links pointing to a web app (http://myapp.com/:id)
I just want a single instance of that web app to avoid opening a new tab when a link is clicked. My app is really heavy to load and already manages its own tabs re-using existing data.
I've currently implemented this using a Chrome extension that closes the tab if there is an existing one with the same domain, but I want a better cross-browser solution (at least Firefox)
Does anyone know how to achieve this using JS?
I was thinking of Shared workers, but I'm sure there is no way to focus a browser tab using JS...
Thanks!
UPDATE: Found How can I get the current tab URL for chrome extension?
I require the tab.ID to refer to a tab of a specific URL. However not sure if this means me issuing the extension refresh itself constantly (or will the iframe the extension is contained within do this live)?
================
OP
I would like to develop a Chrome extension. At this stage of development what I need it to do is 'know' which website it is on. I'm not very experienced with JavaScript (I have some experience developing applications in Java and C, whereas Python is kind of my specialty language and I've deployed a lot of powerful tools using this).
I'm not sure how to go about getting live information of the website the user is currently viewing without constantly refreshing the iframe the application is contained in. I'm thinking of some kind of for loop to do this work for me but I'm also worried about the rate at which this refresh is going to take place (I don't want Chrome to start CPU hogging if many tabs are open).
The framework I'm looking to use during development looks like this (not sure if this is ideal but this is what I have in mind)...
FOR [EXTENSION IFRAME]
{
Extension page IS Extension_OFFLINE (indicating tab is not on, online_example_page)
Extension page IS Extension_ONLINE (indicating tab is on, online_example page).
}
Such that [EXTENSION IFRAME] actively detects what web-pages you are viewing. I would like to avoid refreshing the extension constantly to get this information if possible.
So what it'll look like is the logo and html page will change depending on whether or not you're connected to the online_example page which could be https://example.com.
If the user is on different tabs this is fine. I only need it to detect at least one instance of https://example.com (so ideally ranging over all tabs).
Thank you in advance if you're able to help!
I need to know how some softwares or programs inject html,css,js into webbrowser without installing any extension. once I open chrome or firefox I find ads on google homepage, facebook, youtube ... I need to know how they inject this, how to prevent it and how to know which program did it.
Here is my google home page on chrome
and all the extensions are disabled I even deleted most of them
What worries me the most, is that in google chrome devtool (ressources) the url of the displayed image is the same url of the google logo. when I enter this url I found the real logo of google
You have a computer virus somewhere affecting you.
Edit:
Multiple things could be happening:
Something is intercepting the network request and injecting a different image.
Something has replace your version of chrome with their own version. The base code is public and their version can do whatever they want.
keep in mind, that content de-facing might happen on the Router/Proxy level, too.
some routers have content filters and domain blacklists for child protection.
maybe it's some kind of joke on the router level, where someone added
a content replace filter.
check your computer (spybot + kaspersky)
check your router
check firewall and all networking filters in the chain