MozillaZine

Finding all bookmarks with keywords

Discussion of features in Mozilla Firefox
dotancohen

User avatar
 
Posts: 261
Joined: November 10th, 2007, 2:58 am

Post Posted March 9th, 2008, 6:55 am

How can one parse his bookmarks, to get a list of only bookmarks with keywords? Thanks.
. . . What is Firefox?
. . . . . .

dickvl

User avatar
 
Posts: 52840
Joined: July 18th, 2005, 3:25 am

Post Posted March 9th, 2008, 10:40 pm

You can try to open the bookmark.html file in Firefox and use a bookmarklet like this to hide links without a SHORTCUTURL:
Code: Select all
javascript:(function(){var e=document.getElementsByTagName('a'),E,n=0; for(i=0;E=e[i];i++){if(!E.getAttribute('SHORTCUTURL')){E.setAttribute('style','display:none');n++}} alert('Ready: '+n)})()

Something like this will add the keywords
Code: Select all
javascript:(function(){var c='red',e=document.getElementsByTagName('a'),E,k=0,n,t; for(i=0;E=e[i];i++){t=E.getAttribute('SHORTCUTURL'); if(t&&t!=''){n=document.createElement('span'); n.style.color=c;n.innerHTML='['+t+']'; E.appendChild(n);k++} else{void(E.setAttribute('style','display:none'));}} alert('Ready: '+k)})()

Code: Select all
javascript:(function(){var c='red',e=document.getElementsByTagName('a'),E,k=0,n,t; for(i=0;E=e[i];i++){t=E.getAttribute('SHORTCUTURL'); if(t&&t!=''){n=document.createElement('span'); n.style.color=c;n.innerHTML='['+t+']'; E.appendChild(n);k++}} alert('Ready: '+k);})()
Last edited by dickvl on July 2nd, 2008, 10:12 am, edited 2 times in total.

dotancohen

User avatar
 
Posts: 261
Joined: November 10th, 2007, 2:58 am

Post Posted March 9th, 2008, 10:54 pm

That is an amazing and creative solution, dickvl. It does what I need. Thanks!
. . . What is Firefox?
. . . . . .

dickvl

User avatar
 
Posts: 52840
Joined: July 18th, 2005, 3:25 am

Post Posted March 9th, 2008, 11:08 pm

You're welcome.
I've added a second version that adds the keywords.

dotancohen

User avatar
 
Posts: 261
Joined: November 10th, 2007, 2:58 am

Post Posted March 9th, 2008, 11:36 pm

dickvl, I have a collection of tips for various programs that I use. I plan on putting it all online sometime in the future. Would you mind if I add this? Most of the tips are not of the nature that I would need to ask permission, but your bookmarklet looks to be a creation, not just a tip.

Thanks again.
. . . What is Firefox?
. . . . . .

dickvl

User avatar
 
Posts: 52840
Joined: July 18th, 2005, 3:25 am

Post Posted March 10th, 2008, 5:54 pm

No, go ahead.
It was just a quick try to see if it worked.
I would appreciate if you mention that I created it.

dotancohen

User avatar
 
Posts: 261
Joined: November 10th, 2007, 2:58 am

Post Posted March 10th, 2008, 9:15 pm

> I would appreciate if you mention that I created it.

Of course, that was never in doubt. Thanks.
. . . What is Firefox?
. . . . . .

dickvl

User avatar
 
Posts: 52840
Joined: July 18th, 2005, 3:25 am

Post Posted March 10th, 2008, 10:46 pm

You're welcome.

Return to Firefox Features


Who is online

Users browsing this forum: Google [Bot] and 2 guests