cookie-manager icon indicating copy to clipboard operation
cookie-manager copied to clipboard

Bulk-edit of cookies

Open Rob--W opened this issue 7 years ago • 3 comments

If #4 and #5 are both implemented, it would be natural to support a bulk-edit cookie feature, e.g. to set the desired cookie jar for the cookie, or to explicily unexpire expired cookies.

Rob--W avatar Dec 07 '17 10:12 Rob--W

Could this be possible via a sequence of actions?

  • select the cookies to be edited
  • export them to file
  • remove them from browser
  • edit that file to make "bulk" changes
  • re-import the changed cookies

Can the export and re-import modify all or only some of the settings?
In this particular case, I'd like to move many of them to a different "cookie-jar".

Flaw in theory. That part of the "flags" field is not exported as part of the cookies.json file. Hmmm.

cometsong avatar Jul 12 '18 14:07 cometsong

Update... the containers are exported with key 'storeId' and named by ordinal numbers, seemingly sequential based on order of creation, with any deleted ones missing in the series.

Success! This sequence of events is a (reasonable) workaround for bulk-editing.

cometsong avatar Jul 12 '18 19:07 cometsong

the containers are exported with key 'storeId' and named by ordinal numbers, seemingly sequential based on order of creation, with any deleted ones missing in the series.

This is correct (and just an implementation detail of Firefox).

I had to bulk-move cookies between cookie jars a few weeks ago, and resorted to exporting the cookies as JSON, editing the JSON, and then importing them back. The logic to bulk-edit is quite simple, but I have yet to find a good place in the UI.

An idea is to add a new action to the "More actions" menu, which allows one to bulk-edit all selected cookies. A small complication with moving between cookie stores is that those cookie stores are only visible if there is at least one tab in that context: #11.

Rob--W avatar Jul 13 '18 22:07 Rob--W