Make Firefox 3 Beta NOT update favicons...

Discussion about official Mozilla Firefox builds
Locked
Meol
Posts: 86
Joined: April 5th, 2008, 1:12 am

Post by Meol »

It's a BLOB field in the database and most sqlite-managers have trouble displaying or editing those fields;
for that reason you have to pick one that can:

SQLite Maestro or
SQLite Expert

You then can even swap out favicons which have regular links not only the "made-up" ones without them being updated any further.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

Thanks for the info. Unfortunately (fortunately) I'm on a Mac. Will see what is available.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

liquidator87 wrote:There's a little trick I've found for assigning custom favicons, it's a little complicated, but it works...
- Export your bookmarks
- Adjust your custom favicon (i.e. 16x16 png)
- Encode it in base64 (http://www.motobit.com/util/base64-decoder-encoder.asp)
- Open with notepad the bookmarks.html file and find the entry you want to modify
- Add the tag
ICON="data:image/png;base64,[custom-encoded-text]"
where [custom-encoded-text] is obviously the result of the encode
- Re-import (and adjust, if necessary) your new bookmarks, you should find the favicon modified (it worked for me)


I've been fooling around with this. I exported bookmarks, changed the [custom-encoded-text] to a new favicon, imported and NOTHING CHANGED.

I then exported again and the [custom-encoded-text] was the original. It appears that import doesn't do anything, at least on FF3b5 on OSX.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Meol
Posts: 86
Joined: April 5th, 2008, 1:12 am

Post by Meol »

it's easier and i think safer to directly edit the places database;
the db-manager will do the conversion of the normal image file
for you;
you have to edit one table and look up an entry in another to change
the favicon;
changing is easiest, reassigning or newly creating is a bit more hassle
but basically the same procedure;

clear the history/cache before editing the database since it will remove
the clutter that occurs with temporary bookmark entries

(i'll give some more details later)
Meol
Posts: 86
Joined: April 5th, 2008, 1:12 am

Post by Meol »

To edit a favicon you'll have to work in the moz_favicons table.
First find the id of the icon belonging to your bookmark by finding
the favicon_id entry in the moz_places table.
Once located, open the blob field with the blob editor and load your
new icon into it - apply changes, done.
The new favicon will stick, can't say anything about for how long though,
since i don't understand the expiration entry in the db.

If you want to fill in a missing favicon you need to create a new entry
with a unique id (think you can choose a random number);
what i figured from playing around so far is, that the url field can't be
empty or random - so far http://www.mozilla.org/1 (unique too)
did the job.
Once your entry is done, move over to the places table again and assign
the id of the new icon entry to the matching bookmark.

The places db also has a table moz_bookmarks - i think that's the
table from which html exports are drawn, it's like a copy of the places table.
For the above i didn't have to change anything in this table though.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

Meow wrote:it's easier and i think safer to directly edit the places database;
the db-manager will do the conversion of the normal image file
for you;...

I agree with you however I have been unable to find a SQLite db manager for the Mac that can deal with the favicon blob entry.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
Bluefang
Posts: 7857
Joined: August 10th, 2005, 2:55 pm
Location: Vermont
Contact:

Post by Bluefang »

Have a look at this:
http://sqlitebrowser.sourceforge.net/

I think that might be buildable under Mac.
There have always been ghosts in the machine... random segments of code that have grouped together to form unexpected protocols. Unanticipated, these free radicals engender questions of free will, creativity, and even the nature of what we might call the soul...
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

Bluefang wrote:Have a look at this:
http://sqlitebrowser.sourceforge.net/

I think that might be buildable under Mac.


It is but it doesn't handle blob encoding of images.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

Actually there are a number of SQLite DB managers including a FF add-on (sqlite_manager-0.2.34) that work with Mac; however, none have a blob edit or blob encode/import capability.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

This is turning into an obsession but, here goes.

I've found a SQLite manager that allows me to copy blob data from the moz_favicons table in the places.sqlite file. (Program has a bug being worked on that won't allow a blob paste).

There are four mime types, three of which are images (image/x-icon - image/png - image/gif). If I copy the data from any field using image/x-icon, paste it into a hex edit program, save it as test.ico; it can be opened with a graphic program with the favicon showing.

I cannot reproduce this for the image/png and image/gif. My guess is that the blob data has some type of information before/after the actual image binary that needs to be stripped off.

I have spent the last half day googling to see if there is any information out there on how the png and gif blobs are encoded with no luck. So here is an example of an image/png favicon blob for digg.com

Image

Shot in the dark but this is driving me crazy ](*,)

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Meol
Posts: 86
Joined: April 5th, 2008, 1:12 am

Post by Meol »

Meh sorry i'm no programmer, so i can only offer a crude suggestion..
that would be bootcamping your mac to temp. use windows and do it from there.

I think stuff like that is the only reason for a mac user to have a windows ready somewhere.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

Meow wrote:Meh sorry i'm no programmer, so i can only offer a crude suggestion..
that would be bootcamping your mac to temp. use windows and do it from there.

I think stuff like that is the only reason for a mac user to have a windows ready somewhere.
Thanks for the thought but I'm on a PowerPC.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

I GIVE UP :(

I came up with a "brilliant idea". Generate a few custom favicons, place them in local files, go to the local files and bookmark each in a directory I called my favicons.

Then, edit places.sqlite re-pointing the bookmark sites with ugly favicons to my preferred favicon.

It worked, until I visited the site at which time the default ugly favicon returned. I have no idea how to make the re-pointing stick.

Enough. It's going to be 70˚ plus tomorrow and I'm going to play golf. Can be just as frustrating but at least I get some exercise.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
User avatar
scratch
Posts: 4942
Joined: November 6th, 2002, 1:27 am
Location: Massachusetts

Post by scratch »

you'd have to turn off the automatic updating of favicons with the prefs i listed above. unfortunately, this would mean you won't get any new favicons at all.
User avatar
RobertJ
Moderator
Posts: 10880
Joined: October 15th, 2003, 7:40 pm
Location: Chicago IL/Oconomowoc WI

Post by RobertJ »

scratch wrote:you'd have to turn off the automatic updating of favicons with the prefs i listed above. unfortunately, this would mean you won't get any new favicons at all.


Just about to head to the golf course. I noted your post. However, without turning off the automatic updating there are "some" custom favicons in the bookmarks that I inserted in FF2 using Favicon Picker 2 that stick even though the favicon in the url bar is different when I now visit the site using FF3.

.
FF 92.0 - TB 78.13 - Mac OSX 10.13.6
Locked