xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
1.03k stars 87 forks source link

I've found a way to open option dialog directly and remove warning message from addon manager for bootstrap extensions, thought you might be interested? #79

Closed 117649 closed 3 years ago

117649 commented 3 years ago

Thanks @onemen for the part of removing warring message.

You can find everything here: https://github.com/117649/SavedPasswordEditorRedux/commit/f643b50e988f2fc019b1ef81d409ca228fd2ccba Only very small amount of changes are needed. There won't be a blank page opened thus it would not drag your tab bar scroll while tab bar is overflowing. 图片

117649 commented 3 years ago

A better way to remove sign requirement at all! https://github.com/117649/roomybookmarksredux/commit/e61d6d122bcc75ffc99af481e4384effc1bca694

Sei-lus commented 3 years ago

@117649 correct me if wrong but your tweak fixed the "popup" for the addons options having a blank page container (many times with a scroll bar) and the addons options page itself inside said container that might contain ANOTHER scroll bar?

Or is it just to remove warning messages?

117649 commented 3 years ago

@117649 correct me if wrong but your tweak fixed the "popup" for the addons options having a blank page container (many times with a scroll bar) and the addons options page itself inside said container that might contain ANOTHER scroll bar?

Or is it just to remove warning messages?

NO, your not getting any of it.

To put it in a simple way: Mozilla have deprecated dialog for addon option window a while ago. The owner of this repo came up with a way to bypass mozilla's did by have the option page opened, which is one of the only two way allowed for addon option, open the dialog window then close it self. This however cause trouble when you have your tab bar overflowing and scroll the addon manager page out of sight. Since a new blank page tab has been opened the browser would try to focus on it thus in turn scroll your tab bar. This method by injecting code into the addon manager will allow dialog as addon option again.

If you are not developing a bootstrap addon for firefox nowadays this has nothing to do with you.

Sei-lus commented 3 years ago

Thank you for the explanation. I'm not particularly ashamed of my profiency of English, but sometimes I misinterpret technical topics. As I clearly did.

Again, thank you. I will mark this reply and my above comment as "Off-topic" if I can. Or you/Xiao could as to avoid cluttering your proposal.

xiaoxiaoflood commented 3 years ago

Thank you. I'll add your code to options window (or something similar), for sure it's way better than my current approach!

Regarding the removal of warning about unsigned extensions, I don't plan to add it because I don't want to implement nothing that can be seen as something that reduces Fx security. Legacy addons are inherently insecure and are officially forbidden, so someone may say that this is already breaking Fx security, but I don't think so, it's clearly about enhancing user experience with features that WebExts can't implement. My bootstrapLoader.xpi is even mentioned in Fx source code (here) so Mozilla is aware of my project, but I don't want to go further by adding something that may be seen as unsafe. Our extensions aren't signed, this is fact. There are ways for the user to hide the warning, I do it myself using CSS, it's not job of the extensions themselves to hide it.

xiaoxiaoflood commented 3 years ago

Done in 5403e13336eff759162c115f37c50ecde32d3e25. Did it with a totally different code than yours, but anyway this issue motivated me to work on it.

I restored the old AddonManager.OPTIONS_TYPE_DIALOG, so legacy addons with options window must restore optionsType = 1 in install.rdf. No other change is required for addons.