'Bookmark Favicon Changer'

Talk about add-ons and extension development.
Post Reply
User avatar
streetwolf
Posts: 2706
Joined: August 21st, 2011, 8:07 am
Location: NJ (USA)

'Bookmark Favicon Changer'

Post by streetwolf »

834457 – Remove deprecated synchronous APIs from Places has apparently broken one of my favorite add-ons 'Bookmark Favicon Changer' found at https://addons.mozilla.org/en-US/firefo ... er/?src=ss

The Developer has abandoned the add-on because of Bug 834457. I'm sure someone out there can get this add-on working again.

Anyone willing to step up to the plate? I don't have the ability to tackle it myself.
Intel i9-13900K | ASUS ROG MAXIMUS Z790 HERO DDR5 | 64GB CORSAIR VENGEANCE DDR5 @ 6600 Mhz.
H100i ELITE CAPELLIX XT Liquid CPU Cooler | PNY 12GB GeForce RTX 3080 Ti | 2 CORSAIR 2TB MP600 PRO XT GEN 4
HX1200 PLATINUM PSU | XENEON 32" IPS UHD 144Hz | BenQ 32" UHD | MS Windows 11 Pro
User avatar
streetwolf
Posts: 2706
Joined: August 21st, 2011, 8:07 am
Location: NJ (USA)

Re: 'Bookmark Favicon Changer'

Post by streetwolf »

No one has the expertise to make this add-on work again with the nightly's?
Intel i9-13900K | ASUS ROG MAXIMUS Z790 HERO DDR5 | 64GB CORSAIR VENGEANCE DDR5 @ 6600 Mhz.
H100i ELITE CAPELLIX XT Liquid CPU Cooler | PNY 12GB GeForce RTX 3080 Ti | 2 CORSAIR 2TB MP600 PRO XT GEN 4
HX1200 PLATINUM PSU | XENEON 32" IPS UHD 144Hz | BenQ 32" UHD | MS Windows 11 Pro
lithopsian
Posts: 3664
Joined: September 15th, 2010, 9:03 am

Re: 'Bookmark Favicon Changer'

Post by lithopsian »

Working on minor fixes to an existing addon is a great way to develop your first addon ;) Dsepite the original author's decision, this really is quite a minor change to the API.
User avatar
streetwolf
Posts: 2706
Joined: August 21st, 2011, 8:07 am
Location: NJ (USA)

Re: 'Bookmark Favicon Changer'

Post by streetwolf »

lithopsian wrote:Working on minor fixes to an existing addon is a great way to develop your first addon ;) Dsepite the original author's decision, this really is quite a minor change to the API.


Give me some direction and I'll give it a try.
Intel i9-13900K | ASUS ROG MAXIMUS Z790 HERO DDR5 | 64GB CORSAIR VENGEANCE DDR5 @ 6600 Mhz.
H100i ELITE CAPELLIX XT Liquid CPU Cooler | PNY 12GB GeForce RTX 3080 Ti | 2 CORSAIR 2TB MP600 PRO XT GEN 4
HX1200 PLATINUM PSU | XENEON 32" IPS UHD 144Hz | BenQ 32" UHD | MS Windows 11 Pro
lithopsian
Posts: 3664
Joined: September 15th, 2010, 9:03 am

Re: 'Bookmark Favicon Changer'

Post by lithopsian »

Follow the links from the Firefox 21 changes for developers page. Then find the methods that changed in the addon and replace them with the new methods. Replacing synchronous calls with asynchornous calls is fiddly and messy, so you'll probably need to move bits of the code into favicon callbacks.
User avatar
streetwolf
Posts: 2706
Joined: August 21st, 2011, 8:07 am
Location: NJ (USA)

Re: 'Bookmark Favicon Changer'

Post by streetwolf »

I looked through the code in the add-on and quite honestly I am totally lost as what to do.
Intel i9-13900K | ASUS ROG MAXIMUS Z790 HERO DDR5 | 64GB CORSAIR VENGEANCE DDR5 @ 6600 Mhz.
H100i ELITE CAPELLIX XT Liquid CPU Cooler | PNY 12GB GeForce RTX 3080 Ti | 2 CORSAIR 2TB MP600 PRO XT GEN 4
HX1200 PLATINUM PSU | XENEON 32" IPS UHD 144Hz | BenQ 32" UHD | MS Windows 11 Pro
sonthakit
Posts: 28
Joined: July 13th, 2011, 11:31 pm

Re: 'Bookmark Favicon Changer'

Post by sonthakit »

Hi. I am an author of "Bookmark Favicon changer".
Thank streetwolf to using my add-on. But don't waste your time. It is unfixable.
There are recent discuss why I can't fix in bug834457 (I just finish the posting into it)
https://bugzilla.mozilla.org/show_bug.cgi?id=834457
It is not a simple job to fix this like "lithopsian" said. You cannot use asynchronous function in some situation.
I can't fix, not I won't fix.

When I looking in the code, if you want to fix this, you need to remove some feature of "bookmark favicon changer"
like remove embed favicon in JSON bookmark backup file.
Remove the context menu to all of it. (Yes you cannot right click at your bookmark to change favicon anymore)
Create your own bookmark manager for change function.
Rewrite the whole code from the beginning to make asynchronous support.
Moving the way you use annotation to store data and use your own cache.
Then observe every bookmark event and own manipulate database.
And the result is the downgrade add-on, limit function, lame extension and break the logo "right click at your bookmark to change favicon"
And the worst is... If I can do it, it still can be broken in next 6 weeks when new Firefox version come.

I admit that I am writing a new "bookmark favicon changer".
If you were me, you need to choose what browser you going to write add-on... from the beginning.
If you write the code for firefox, you may get crash again and again.
If you write the code for chrome, you get a better chance that it will work for a long time.
So, I decided to write the new one in chrome. I cannot guarantee that it will finish and usable, but it progress well.
It is not as powerful as previous bookmark favicon changer, it cannot change folder icon and user interface is not right click at bookmark bar.
If you interest, I will post the different between chrome and firefox in the add-on development view point. It is much different.

It is a matter of time, later or sooner, you need to switch browser. Because add-on will be broken more and more.
There is no hope for firefox. It lack backward compatibility.
It need add-on to continuous adapt and follow them. And surely they can't.
Add-on developer is human, I can busy, I can sick and I can die. I cannot follow them all the time.

If you recieve the mozilla feed. you may see interesting thing in firefox 23.
Firefox 22 broke bookmark favicon changer
But firefox 23 is more severe
You can see the change at
https://developer.mozilla.org/en-US/doc ... Firefox_23

"The ability to add a sidebar panel has been dropped"
So, more add-on will be broke.

"Non-SSL active content on SSL pages is blocked by default"
This is a worst, they need the whole world to follow them. Whoever create https site need to change. And how much do you think they will follow this while Chrome and IE still support.

Thank to read. Thank to use bookmark favicon changer. :D
Elbart
Posts: 997
Joined: February 21st, 2010, 8:38 am

Re: 'Bookmark Favicon Changer'

Post by Elbart »

sonthakit wrote:But firefox 23 is more severe
You can see the change at
https://developer.mozilla.org/en-US/doc ... Firefox_23

"The ability to add a sidebar panel has been dropped"
So, more add-on will be broke.

Why would a change for websites affect addons?


sonthakit wrote:"Non-SSL active content on SSL pages is blocked by default"
This is a worst, they need the whole world to follow them. Whoever create https site need to change. And how much do you think they will follow this while Chrome and IE still support.

Having secure and insecure content mixed is bad practice.
Plus, you can load that content any way, see the instructions here:
https://blog.mozilla.org/tanvi/2013/04/ ... irefox-23/
starting at "Clicking on the shield, they will see options to Learn More, Keep Blocking, or Disable Protection on This Page:"

Regarding IE:
When viewing a website in Internet Explorer 9 or later, you receive a message that says "Only secure content is displayed."
...
Important: Internet Explorer blocks non-secure content by default and is set to prompt you when this is happening.

http://support.microsoft.com/kb/2625928

And regarding Chrome...
With the recent release of Chrome 21, we’ve taken several steps forward:

We continue to protect end users by blocking mixed scripting conditions by default, ...

http://blog.chromium.org/2012/08/ending ... ities.html
gone
User avatar
Protocol
Posts: 435
Joined: October 18th, 2003, 12:44 am

Re: 'Bookmark Favicon Changer'

Post by Protocol »

Such a shame at the death of this Add-on. :-(
sonthakit
Posts: 28
Joined: July 13th, 2011, 11:31 pm

Re: 'Bookmark Favicon Changer'

Post by sonthakit »

Hi. Thank you for comment.
Elbart - I don't do the test but I believe you. Sorry, my bad.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: 'Bookmark Favicon Changer'

Post by RobertJ »

.
Thank you sonthakit for the add-on. It was well designed from a user perspective and worked well. I'm currently using FF22b and discovered that it no longer works. Just finished reading the asyc/syn debate in bug 834457 which is how I ended up here.

I'm unfortunately going to have to go to a manual and tedious way of changing favicons. Specifically, editing the places.sqlite data base. That is a huge PITA :!:


.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: 'Bookmark Favicon Changer'

Post by Tiger-Heli »

RobertJ wrote:Specifically, editing the places.sqlite data base. That is a huge PITA :!:


Could you provide more details on this - what format is it in? What program can open/read/edit it? What changes need to be made?

Thanks!!!
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Re: 'Bookmark Favicon Changer'

Post by RobertJ »

Tiger-Heli wrote:
RobertJ wrote:Specifically, editing the places.sqlite data base. That is a huge PITA :!:


Could you provide more details on this - what format is it in? What program can open/read/edit it? What changes need to be made?

Thanks!!!


The program is the SQLite Manager extension. You need to make a copy of the places.sqlite data base since the extension runs in FF. If you are not familiar with sqlite data bases and places.sqlite in particular it is not straight forward.

However, I just came up with a small PITA approach which is better that a huge PITA. Hear is what I just did for a bookmark I just added. First note that you will need to keep a copy of FF21 with its own unique profile with Bookmark Favicon Changer installed. Now the small PITA approach:

  1. Add whatever bookmark you want to change the favicon of to your current FF22+ version of Firefox, call it bookmark "Z"
  2. Quit FF22+
  3. Copy the places.sqlite file from the profile of FF22+ to the profile of FF21
  4. Launch FF21 and using Bookmark Favicon Changer make the desired change to the favicon of bookmark "Z"
  5. Quit FF21
  6. Copy the places.sqlite file from the profile of FF21 to the profile of FF22+
  7. Launch FF22+ and the change is made

If this sounds like a hassle it is trivial compared to editing the places.sqlite database. Note I just tested this on FF22b and FF23a. Inasmuch as I don't add large amounts of bookmarks to which I want to change the favicon I can live with this for now. I'll likely just "save up" my changes and once every few weeks go through the seven steps above. Hopefully places.sqlite doesn't get changed.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Tiger-Heli
Posts: 104
Joined: February 20th, 2008, 8:18 am

Re: 'Bookmark Favicon Changer'

Post by Tiger-Heli »

Thanks - that helps and makes sense. I had previously verified the BFC didn't work in later builds of FF, but if I installed FF over a previous build, previously modified bookmarks kept their modifications - I just couldn't change new ones.

I just was missing the piece that places.sqlite was the common link where the info was stored.
sonthakit
Posts: 28
Joined: July 13th, 2011, 11:31 pm

Re: 'Bookmark Favicon Changer'

Post by sonthakit »

Hi.
It seem good but it will not work.
The heart of "bookmark favicon changer" is not change favicon. But it is the protection.
You can change favicion easily. But when you visit website, when you clear cache, when favicon expire,... ect it will turn back.
Programming to change favicon is very easy. But protection is very serious.
Post Reply