Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition to WebExtensions (aka compatibility with Firefox 57+) #254

Open
dralley opened this issue Mar 22, 2017 · 26 comments
Open

Transition to WebExtensions (aka compatibility with Firefox 57+) #254

dralley opened this issue Mar 22, 2017 · 26 comments

Comments

@dralley
Copy link

dralley commented Mar 22, 2017

As I'm sure you know, in November 2017, the Firefox 57 release will disable all addon APIs with the exception of the new WebExtensions API. Are there any plans for undertaking this transition, or auditing whether it is possible at all, or would require Mozilla extending the WebExtensions API to provide the necessary functionality?

@anewuser
Copy link

anewuser commented Mar 23, 2017

See all the other open bugs about compatibility: https://github.com/Infocatcher/Private_Tab/issues?q=is%3Aissue+is%3Aopen+label%3Acompatibility

@Infocatcher has devoted a lot of time on this, but Mozilla isn't cooperating.

@yfdyh000
Copy link

@Infocatcher
Copy link
Owner

Required API for private tabs or access to browser internals...

@Infocatcher
Copy link
Owner

OK, let's see: https://bugzilla.mozilla.org/show_bug.cgi?id=1358058

Implement WebExtensions API for private tabs

@anewuser
Copy link

anewuser commented Apr 26, 2017

@Infocatcher
Copy link
Owner

mozilla/multi-account-containers#47
mozilla/multi-account-containers#419
mozilla/multi-account-containers#429

Interesting, thanks! Also "private containers" will solve issue about only one global private storage/container.

@Infocatcher
Copy link
Owner

OK, let's see: https://bugzilla.mozilla.org/show_bug.cgi?id=1358058

Implement WebExtensions API for private tabs

And, probably, that's all.
Nothing about any feedback, lack of discussion.

https://bugzilla.mozilla.org/show_bug.cgi?id=1358058#c12

Status: RESOLVED WONTFIX

@Infocatcher
Copy link
Owner

Also to inherit private state of opener tab:
https://bugzilla.mozilla.org/show_bug.cgi?id=1238314
Implement browser.tabs opener functionality

@bastadur
Copy link

Maybe a noob question (don't judge me I know nothing about coding 😫) - how come Brave has private tabs and it's based on Chromium/Blink?

@anewuser
Copy link

@bastadur That's a question you should ask the Brave developers.

Infocatcher added a commit to Infocatcher/Private_Tab_WE that referenced this issue Aug 14, 2017
@Infocatcher
Copy link
Owner

Some tests around WebExtensions: https://github.com/Infocatcher/Private_Tab_WE
Actually does nothing for now, only have a dummy menu item in page context menu.

@Infocatcher
Copy link
Owner

https://bugzilla.mozilla.org/show_bug.cgi?id=1354602
Not yet fixed, user should set privacy.userContext.enabled = true manually.

Still missing really private containers, but
https://bugzilla.mozilla.org/show_bug.cgi?id=1353726
Consider extending browsingData.RemovalOptions to allow removal by cookieStoreId
(not implemented)

Not implemented:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/onSuspend
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/onSuspendCanceled
So, as I see, there is no way to perform some cleanup, if extension was disabled/uninstalled.

Also I not see any way to create configurable keyboard shortcuts, only hardcoded ones:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands
And limited:

ERROR Loading extension 'privateTabWE@infocatcher': Reading manifest: Error processing commands.openNewPrivateTab.suggested_key.default: Value "Ctrl+Alt+P" must either: match the pattern /^\s*(Alt|Ctrl|Command|MacCtrl)\s*+\s*(Shift\s*+\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\s*$/, match the pattern /^\s*((Alt|Ctrl|Command|MacCtrl)\s*+\s*)?(Shift\s*+\s*)?(F[1-9]|F1[0-2])\s*$/, or match the pattern /^(MediaNextTrack|MediaPlayPause|MediaPrevTrack|MediaStop)$/

@Infocatcher
Copy link
Owner

Also I not see any way to create configurable keyboard shortcuts, only hardcoded ones

https://bugzilla.mozilla.org/show_bug.cgi?id=1303384
UI for re-assigning command shortcuts
(not implemented for now)

@Infocatcher
Copy link
Owner

No easy way to inherit browser.tabs.insertRelatedAfterCurrent = true behavior, only ability to set tab position
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/create#Parameters

browser.tabs.create({
	url: ,
	cookieStoreId: ,
	active: true,
	index: 
});

No ability to inherit browser settings to open in active/background tab.

@anewuser
Copy link

anewuser commented Oct 3, 2017

@Infocatcher
Copy link
Owner

https://hacks.mozilla.org/2017/10/containers-for-add-on-developers/

Thanks!
So, it's possible to do something like before, but "private" container should be removed manually after closing of last private tab.

@anewuser
Copy link

anewuser commented Oct 5, 2017

This one says that it can remove them automatically: https://addons.mozilla.org/addon/containers-on-the-go/ . It's a shame that its developer hasn't posted it on a public repository though. You could work together.

You may get inspiration from this too: https://github.com/totallymike/contextPlus

@inoyakaigor
Copy link

Тут много всего написано и не всё я понимаю. Можно резолюцию: есть перспективы у этого расширения для переезда на Firefox 57 или нет?

@Tallefer
Copy link

Tallefer commented Oct 5, 2017

@inoyakaigor никто пока не понимает. :) Но уже есть прототип https://github.com/Infocatcher/Private_Tab_WE
и там внизу таблица тикетов, которые надо разрешить, чтобы все заработало

@Infocatcher
Copy link
Owner

This one says that it can remove them automatically

Yes, that's easy (and now implemented), but the most important part is about private containers: https://bugzilla.mozilla.org/show_bug.cgi?id=1353726 or (and better) private flag for container itself.

@inoyakaigor
По-прежнему со стороны браузера не реализована основная часть: нет ни возможности удаления истории, привязанной к контейнеру (https://bugzilla.mozilla.org/show_bug.cgi?id=1353726), ни (тем более) настоящих приватных контейнеров.

@Infocatcher
Copy link
Owner

Infocatcher commented Oct 5, 2017

mozilla/multi-account-containers#47 Disable history per-container setting

Edit: oh, already listed some posts above...

@Infocatcher Infocatcher changed the title Transition to WebExtensions Transition to WebExtensions (aka compatibility with Firefox 57+) Oct 8, 2017
@MurzNN
Copy link

MurzNN commented Jan 4, 2018

From https://github.com/Infocatcher/Private_Tab_WE#issues

Ability to move tab into another container (for “Private Tab” checkbox in tab context menu), to restore not only URL

This can be implemented via Context Plus extension.

@Infocatcher
Copy link
Owner

This can be implemented via Context Plus extension.

As I see, this is only about browser.tabs.create({ cookieStoreId }) to create new tab in desired container (and preserve only URL, tab position and active/inactive state) + browser.tabs.remove() to close initial tab:
context_plus-0.5.0-an+fx-windows.xpi\contextPlus.js

    const onClickedHandler = async function(info, tab) {
      if (contextStore.hasOwnProperty(info.menuItemId)) {
        const moveTab = !(info.modifiers && info.modifiers.includes("Ctrl"));
        const cookieStoreId = contextStore[info.menuItemId];
        const { active, index, pinned, url, windowId } = tab;

        const newTabPromise = browser.tabs.create({
          active,
          cookieStoreId,
          index: index + (moveTab ? 0 : 1),
          pinned,
          url,
          windowId,
        });
        if (moveTab) {
          await newTabPromise;
          browser.tabs.remove(tab.id);
        }
      }
    };
    browser.contextMenus.onClicked.addListener(onClickedHandler);

@anewuser
Copy link

anewuser commented Jan 27, 2018

There's a new related extension:

https://addons.mozilla.org/addon/temporary-containers/

https://github.com/stoically/firefox-add-on-temporary-containers/

Check it out and see the comment I've left on stoically/temporary-containers#17

@ShalokShalom
Copy link

Firefox 61 allows to interact with Tabs via WebExtension, is that any help?

@anewuser
Copy link

anewuser commented Mar 14, 2024

If you guys use the stable version of Firefox and are still interested in private tabs, I recommend this new lightweight extension: https://addons.mozilla.org/addon/open-in-temp-container/ .

You need to go to the Firefox Add-ons Manager to see its options and make the toolbar button open new tabs. You can also give it permission to access your browsing history to prevent new URLs from being stored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants