Skip to content

Conversation

@PassionZhao
Copy link

If there are some existing extensions using the chrome.downloads.onDeterminingFilename API, then savetiddlers can not name it's downloads at all.

Register chrome.downloads.onDeterminingFilename.addListener in this extension to get chance to specify filename.

@buggyj
Copy link
Owner

buggyj commented Sep 4, 2023

Hi @PassionZhao, thanks for the pull request. I do have some doubts about this. The chrome api documention says this:

"If more than one extension overrides the filename, then the last extension installed whose listener passes a suggestion object to suggest wins. In order to avoid confusion regarding which extension will win, users should not install extensions that may conflict."

It is not obvious to me that confusion over filename renaming is resolvable, I see that you are registering and removing the event listener dynamically, and this may work now, but in general, event listeners can be can invoked in any order.

@PassionZhao
Copy link
Author

Hi buggyj,

Thanks for sharing your thoughts, I agree this patch is only required when we have installed other conflict extensions (iMacros in my case), meanwhile this patch makes savetiddlers itself become a potential conflict to others. I'll keep it in downstream branch.

@buggyj
Copy link
Owner

buggyj commented Sep 6, 2023

It appears that 'onDeterminingFilename' is still not support on firefox

https://bugzilla.mozilla.org/show_bug.cgi?id=1245652

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants