maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   N9: How to selectively manipulate "Top Sites" in browser? (https://talk.maemo.org/showthread.php?t=79379)

benny1967 2011-10-26 12:36

N9: How to selectively manipulate "Top Sites" in browser?
 
When you start the browser on the N9, you're greeted with the "Top Sites" - which is a nice idea, but doesn't work well for me for various reasons. I'd like to be able to:
  • change the title of sites stored there ("Login" is not a useful name; I don't know which site it belongs to)
  • manually add a site (and make sure it doesn't disappear again too quickly)
  • manually change the order of sites
  • delete porn sites before I show the phone to my mother (this must be a bug in the browser: these sites always show up on top)
  • manually change the URL of a site already stored (like add 'search.php?do=getnew' to the already stored 'http://talk.maemo.org')

/home/user/.grob/ seems to be where this stuff is stored, but I don't know how to access the files there (safely) and what kind of magic would be necessary to make some manual changes permanent. (I can imagine that deleting an entry will be simple... but renaming and then re-using it?)

jflatt 2011-11-12 09:04

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Yep, it's the url_history.db. It's an sqlite database, specifically the TopSites table. Looks to me like it's ordered in grob by the accessCount field. I have copied the file to a PC, edited the database, copied it back over and saw the changes applied. All the bulleted items would be easy to change, just set the accessCount to a very high number so that your settings don't change

OVK 2011-11-12 09:53

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Seems like Harmattan needs a sqlite database editor so that this could be done in N9. It could probably be used also for manipulating calender entries too.

eres 2011-11-14 10:34

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
my N9 doesn't add new sites to "Top Sites" list after upgrade to PR 1.1
anyone has the same issue?

sting.kl 2011-11-17 14:45

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Yep, me too. The top sites remain static with various Nokia links. Anyway to get this to register new sites I visit?

Transcend 2011-11-17 14:51

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
I got the same problem top sites don't change anymore like on PR 1.0

Konceptz 2011-11-18 03:33

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Mine was like this until I kept going to talk.maemo and now that's top site! Maybe the counter for those sites was set high from default.

sting.kl 2011-11-18 13:42

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by Konceptz (Post 1125305)
Mine was like this until I kept going to talk.maemo and now that's top site! Maybe the counter for those sites was set high from default.

That certainly worked :) I thought something was broken and was about to edit some config files ... haha

TMavica 2011-11-18 14:01

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by jflatt (Post 1122251)
Yep, it's the url_history.db. It's an sqlite database, specifically the TopSites table. Looks to me like it's ordered in grob by the accessCount field. I have copied the file to a PC, edited the database, copied it back over and saw the changes applied. All the bulleted items would be easy to change, just set the accessCount to a very high number so that your settings don't change

use what software to edit the file for u??

sting.kl 2011-11-19 02:19

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
I didn't end up editing anything after following the tip by konceptz

MortenS 2011-11-30 05:45

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Mine is still not updating. Have Visited TMO maybe 30 times over 3 weeks. Has someone reported this bug?

Manatus 2011-11-30 06:45

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by MortenS (Post 1130859)
Mine is still not updating. Have Visited TMO maybe 30 times over 3 weeks. Has someone reported this bug?

Mine seemed to stuck too, so I just deleted (renamed) the db. It will get created again automatically. After that it took many days until I started seeing any sites on the list.

benny1967 2011-12-13 12:13

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
There's an application in the Nokia store now that allows to manipulate the top sites:

MyTopSites,
http://store.ovi.com/content/225055

OVK 2011-12-13 13:44

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by benny1967 (Post 1136997)
There's an application in the Nokia store now that allows to manipulate the top sites:

MyTopSites,
http://store.ovi.com/content/225055

Nice, but at the same time this makes me sad.

"There is an app for that".

jalyst 2011-12-13 20:18

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
^ def. should just be integrated into browser.
enhancement request in bug-tracker folks ;)

jaripi 2011-12-18 14:47

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
I managed to make changes for that file (url_history.db), but how to copy it to that folder home/user/.grob ? ... I tried by File Manager and through terminal too ... but "can not copy because it exists" - does it needs some rights ? .. I want use my own ... :(

noetus 2011-12-18 15:42

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
It seems broken to me... the whole point of this functionality is that it tracks your most visited sites for you so you don't have to think/worry about it. If you have to manually edit the sites (or worse, download another app to do that) and think about which sites you visit most often... well, that defeats the purpose of it.

jaripi 2011-12-18 15:57

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by noetus (Post 1139105)
It seems broken to me... the whole point of this functionality is that it tracks your most visited sites for you so you don't have to think/worry about it. If you have to manually edit the sites (or worse, download another app to do that) and think about which sites you visit most often... well, that defeats the purpose of it.

thanks, I understand what you are telling me, but I still prefer to modify it, so I can use just my own editable one .... well, it seems that someone has done it, but I failed to replace an original one, so that it will be really in use by browser ... :(

EDIT: it seems to be easy to do once I understood what I was really doing - is it surprise ? :) ... SQLite + Filebox is all what you need to change it and to make it look nice, at least what you like :)

jalyst 2011-12-18 17:43

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by noetus (Post 1139105)
It seems broken to me... the whole point of this functionality is that it tracks your most visited sites for you so you don't have to think/worry about it. If you have to manually edit the sites (or worse, download another app to do that) and think about which sites you visit most often... well, that defeats the purpose of it.

Agreed, bug report desperately needs to be lodged (if not already).*
And a enhancement request submitted, so the app mentioned a few posts up, is redundant.
There's def. some advantages to being able to manually edit, as mentioned in earlier posts.
But it'd be far nicer if it could all be integrated into the browser UI...


*I would but it's not ideal, given I still don't have my N9.... :(

The Best Isaac 2012-10-04 15:31

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
I hope it's ok to bring up this old thread but I have some further questions regarding the "Top Sites".

First of all, editing the database or using the App "MyTopSites" does work - I can edit the Top Site entries specifically.
Now what I try to do is to replace the default Nokia bookmarks that get restoree after deleting the browser history. Because these bookmarks get restored even when I delete them via MyTopSites before (or directly in the database) I think there must be a place where these sites are stored (hopefully it's not hard-wired some where internally).
Also these bookmarks have some special features that cannot be used when manually editing the bookmarks. For example in a single default bookmark various words/parts can have different stylings (the Word "Nokia" is in dark blue and bold; "Environment" in dark green, "Conversations" in gray). With MyTopSites you can only define the font color and the background color for the entire entry.

So does anybody has a clue where these special features are hidden or whether it's possible to supply you own "default" bookmarks that get restored after deleting the browser history instead of those from Nokia?



EDIT: I just found out that when you set the "hasIcon" field to 0 (false) in one of the default Nokia bookmarks entry in the database the bookmarks will be styled normally (according to the supplied font color and background color). So this "hasIcon" field must be a hint for the browser to look in another place for the entry's styling. Maybe this helps a little.

thedead1440 2012-10-04 15:34

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
I remember the bookmarks coming in a separate file...IIRC that file was in refhashlist when i was looking into refhashlist...

Try searching in refhashlist with "grob" maybe other than /usr/bin/grob which is the browser you are able to find the file containing the bookmarks...

If i manage to find it I'll report here ;)


Edit: It might be in /usr/share/grob/url_history.db

Fiddle with it and let us know :D

The Best Isaac 2012-10-04 16:09

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Thank you so far!

This is really the original url history database file that gets restored when you delete your browsing history. I was able to change the entries in the original db and the changes were reflected. :)

Then there is just the styling feature left. Regarding this I've found out that the styling is linked to the entry's ID.

For example I found out that the ID 1 and 7 are linked with the styling for "Latest on Nokia N9", 2 and 8 with "Nokia N9 Features", 3 and 9 with "Nokia Environment", 4 and 10 with "Nokia Support", 5 and 11 with "Nokia Conversations", 6 and 12 with "Nokia.mobi". Anything above 12 seems to be links with an empty (or maybe just a non-existing) styling because these bookmarks will be displayed as an empty entry provided the hasIcon field is set to True.

So I guess there may be another database (hopefully - it could also just be hard-wired) where these stylings are stored (I guess they consist of plain HTML).
So now we just have to search this database... I'll try to find it but if someone else is also interested any help is appreciated. :)

thedead1440 2012-10-04 16:12

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
So you were able to modify the .db file and the browser still worked? It shouldn't after a reboot if you are not using open mode...You need to reflect the modified .db file's sha1sum value in the refhashlist file...

You can also use refhashlist.pl to do the signing for you...


However, if it works even after a reboot and you are not in open mode then that's a good thing :)

The Best Isaac 2012-10-04 16:25

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Actually I didn't try to reboot the device. I altered the db locally, uploaded it via FTP into "/usr/share/grob", went to settings to clear the browser history, started the browser and voila: my edited bookmarks where restored.
Also rebooted the phone just this minuted. Still working. Don't know if I have a magical N9. :D

No open mode, but Inception installed.

The Best Isaac 2012-10-04 16:37

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Okay, I've found a solution to the styling problem and it's simpler than I thought:

In "/usr/share/grob" there is an folder named "t" (just saw that this folder is also present in "/home/user/.grob/"). In these folders you can place PNG images named with the entry ID. The corrosponding image will be displayed when the "hasIcon" field for the entry is set to true (for the IDs 1 to 12 there are already "icon" images exisiting). So you can do this either on the user side (but these modifications will be reverted when browser history gets cleared) or directly on the rootside which means these modifications will remain. :D

thedead1440 2012-10-04 16:46

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
The Best Isaac,

Can you also check your new bookmarks do they have a count of number of times accessed? Using Top Sites it should give you the count so might as well use the .db or Top Sites for that matter and set it to a high value preventing your bookmarks and their styling from being replaced in the future...

The Best Isaac 2012-10-04 16:52

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
1 Attachment(s)
Yeah the custom bookmarks do have an access count (the field in the "TopSite" table is "accessCount"). The original Nokia bookmarks had a count value of 5. You can set the value to anything you want, for example I set it to 100.

Again thanks a ton for pointing me to the right file! :)

So this is how my Top Sites look currently (will add some additional entries later maybe):

sid21177 2012-10-09 05:31

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
i guess we now need some way of modifying the default links on the N9 itself :D

thedead1440 2012-10-09 05:33

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by sid21177 (Post 1278244)
i guess we now need some way of modifying the default links on the N9 itself :D

The application Top Sites does it on your device...This is just a more advanced method...What you need is well covered by Top Sites surely...

The Best Isaac 2012-10-09 16:42

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by sid21177 (Post 1278244)
i guess we now need some way of modifying the default links on the N9 itself :D

With default links you mean the links you get as suggestions while typing something in the url bar? (Which is not covered by MyTopSites iirc)
These links can be edited in the "Url" table in the "url_history.db". By default there are many links preset and the table gets filled with the visited URLs while using the browser.

sid21177 2012-10-16 02:39

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by The Best Isaac (Post 1278457)
With default links you mean the links you get as suggestions while typing something in the url bar? (Which is not covered by MyTopSites iirc)
These links can be edited in the "Url" table in the "url_history.db". By default there are many links preset and the table gets filled with the visited URLs while using the browser.

nope, what i meant was that the links modified by top sites gets wiped out after clearing the history to be replaced by the default links. It would be nice if we had an application to modify the hardcoded links.

MK99 2012-10-16 05:36

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by benny1967 (Post 1136997)
There's an application in the Nokia store now that allows to manipulate the top sites:

MyTopSites,
http://store.ovi.com/content/225055

This is so great. Now the browser is more useful! :D:D

sid21177 2012-10-21 04:16

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Quote:

Originally Posted by MK99 (Post 1281088)
This is so great. Now the browser is more useful! :D:D

just beware clearing the history takes u back to square one :P

izmisljator 2012-12-23 23:07

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
Can you put step by step how you did that with the browser please.
I am noob at this kind of stuff but i want my browser to look like this:)

imaginaryenemy 2014-05-24 21:02

Re: N9: How to selectively manipulate "Top Sites" in browser?
 
A bit late, but I finally decided to give this a shot. I'm really enjoying the look. Thanks The Best Isaac!

https://dl.dropboxusercontent.com/u/...2016-59-03.png


All times are GMT. The time now is 08:04.

vBulletin® Version 3.8.8