Open MurzNN opened 9 years ago
I already try to do links like "private:http://example.com" - they works in url bar, but not works in page links.
I have found same feature request: https://github.com/Infocatcher/Private_Tab/issues/144 so this feature will be useful, but seems that we don't know how to implement it.
I'll try to search some solutions. At now I have found extension https://addons.mozilla.org/en-US/firefox/addon/fosdem-basic-protocol-handl/ that do something like this, and this articles: https://mike.kaply.com/2011/01/18/writing-a-firefox-protocol-handler/ http://www.roberthorvick.com/2009/07/03/adding-a-custom-protocol-to-firefox-for-easy-erlang-docs/
And here is my workaround (for Linux):
#!/bin/bash
URL=`echo $1 | sed 's/^phttp/http/'`
exec firefox private:$URL
/usr/local/bin/firefox-private-link.sh
and checkbox "Remember my choice".Maybe we can intercept those links with firefox extension, and don't use external script?
And here is my workaround (for Linux):
Interesting, thanks for investigation.
But the main problem is to prevent things like
var win = window.open("p" + location.href); // Open the same page in private mode
win.addEventListener("load", function onLoad(e) {
win.removeEventListener(e.type, onLoad, true);
alert(win.document.cookie); // Try get private data
}, true);
Should be called from something like <a onclick="...">
on page or just temporarily disable "Block pop-up windows" option.
So, used URI_DANGEROUS_TO_LOAD
flag in protocol implementation to forbid communications between private and non-private tabs. And as a side-effect even tab opening will be forbidden.
So for clarification, will this ever be an option? Opening private tabs from non-private tabs?
So for clarification, will this ever be an option? Opening private tabs from non-private tabs?
May be... But only if will work for user actions and not for page scripts (to prevent things like https://github.com/Infocatcher/Private_Tab/issues/187#issuecomment-136300836).
Also here described limitations of used URI_DANGEROUS_TO_LOAD
flag: https://github.com/Infocatcher/Private_Tab/issues/144#issuecomment-43435945
This sounds similar to what I'm trying to accomplish. I'm trying to force certain URLs in KeePass to open in a private window/tab. It appears doing so via the command line is not possible, but in trying to figure out how to make it work I found this addon; however, it gives me an error when I insert "private:" before the URL in KeePass ("Unknown error 0x80041002" if it helps). I'm using Pale Moon, but the functionality should be identical to Firefox.
Our company use intrenal corporate system with many urls to external services. Most of them we must open in private tabs. At now we must always don't forgot to do right click on link and select item "Open in private tab". We want find the way for mark some url links on our pages to always open in private tabs.
Good solution will be provide to Firefox new special protocol for opening links in private tabs. So instead of http://example.com - type something like phttp://example.com (private http) and when user click on this type of link - it opens always in private tab and redirects to http://example.com, and same phttps:// for https:// links.
Registering new protocol in Firefox is not so hard: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
Will be good to see this feature in this extension, or in separate extension. What do you think about this idea?