Counts - Counting bookmarks history links and other data - Firefox: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
<!-- Sorry for bursting in Dmcritchie -->
<!-- Sorry for bursting in Dmcritchie -->


This article addresses obtaining various Counts from Firefox concerning Firefox features (bookmarks, history) and counts of such things (links) within active page, along with some calculation features.  
This article addresses how to obtain an item's count concerning Firefox features (bookmarks, history) and counts of such things as links within an active page, along with some calculation features.  
   
   
==Bookmarks and links==
==Bookmarks and links==
Line 8: Line 8:


===Bookmarks===
===Bookmarks===
Bookmarks are available with "Ctrl+B". "Ctrl+Shift+B" can show "'''visit count'''" per item. For a summary with all items search for <i>://</i> or <i>http</i><!-- (see '''Sub-folders restriction''' above)-->
Bookmarks are available with "Ctrl+B". "Ctrl+Shift+B" can show "'''visit count'''" per item. For a summary with all items search for <i>://</i> or <i>http</i>.<!-- (see '''Sub-folders restriction''' above)-->
* Bookmarks
* Bookmarks
* Bookmarks with keywords, all, in a folder (1st level of a folder, all levels within)
* Bookmarks with keywords, all, in a folder (1st level of a folder, all levels within)
* Bookmarks with tags, Total number of defined tags (1st level of a folder, all levels within)
* Bookmarks with tags, Total number of defined tags (1st level of a folder, all levels within)
* Bookmarks with description
* Bookmarks with description
<!-- ===Bookmark folders===
<!-- ===Bookmark folders===
Goal is to be able to get a total on all bookmark, within a folder, within a folder and sub-folders (see '''sub-folders restriction''' above).
Goal is to be able to get a total on all bookmark, within a folder, within a folder and sub-folders (see '''sub-folders restriction''' above).
Line 24: Line 23:


===History===
===History===
History is available with "Ctrl+H". "Ctrl+Shift+H" can show "visit count" per item but not a summary, unless you do a search (<i>://</i> or <i>http</i>)
History is available with "Ctrl+H". "Ctrl+Shift+H" can show "visit count" per item but not a summary, unless you do a search (<i>://</i> or <i>http</i>).
* Number of visits to current page ("Ctrl+Shift+H", your own history)
* Number of visits to current page ("Ctrl+Shift+H", your own history)
* Number of bookmarks pointing to this page ("Ctrl+Shift+B", your own bookmarks), Note older versions converted to version 3 may have to use Organize Bookmarks if shortcut is not available.  
<!--* Number of bookmarks pointing to this page ("Ctrl+Shift+B", your own bookmarks), Note older versions converted to version 3 may have to use Organize Bookmarks if shortcut is not available.  
<!--|||||@>-,----------- I don't get this. Why would entries point to the history? Is this "Visit Date"?-->  
|||||@>-,----------- I don't get this. Why would entries point to the history? Is this "Visit Date"?-->  


===Library===
===Library===
<!-- |||||@>-,----------- Isn't this section similar to the first two? -->
<!-- |||||@>-,----------- Isn't this section similar to the first two? -->
Library list is obtained from Bookmarks (menu), Organize Bookmarks (version 3 non upgraded users can use "Ctrl+Shift+B"  
The Library can be accessed through <em>Bookmarks</em> (menu bar) > <em>Organize Bookmarks</em> (version 3 non-upgraded users can use "Ctrl+Shift+B").


<!--See ''sub-folders restriction'' near top.-->
Bring up the Library window and do a search for <em>://</em>. That will pick up both <em>http://</em> and <em>https://</em>. If you want to include bookmarklets search for ":" (semicolon) instead. To restrict to bookmarklets use "Javascript".
Bring up the Library window and do a search on "://" that should pick up both "http://" and "https://". If you want to include bookmarklets search for ":" (semicolon) instead. To restrict to bookmarklets use "Javascript".


There will be a count at the bottom, if the fixed portion at the bottom prevents that display, just move the vertical scrollbar a little bit and the total will appear in the properties area. If too few for vertical scrollbar to appear then count them, or right-click on empty space on the main area on the right side. If an item in the list is already selected redo the search then do the right-click.
There will be a count in the properties area (at the bottom), if that area prevents the number to show up, move the vertical scrollbar a little bit and the total will appear. If an item in the list is already selected, simply CTRL-click (deselect) that item.


<!--You will have to do this for each major folder, and it will not pick up from All Bookmarks, and it will not include sub-folders. (see '''sub-folders restriction''' near top of this article). The scope of search will be fixed for Firefox 3.1 (bug [https://bugzilla.mozilla.org/show_bug.cgi?id=451151 451151]) so that subfolders are also included (recursive).
<!--You will have to do this for each major folder, and it will not pick up from All Bookmarks, and it will not include sub-folders. (see '''sub-folders restriction''' near top of this article). The scope of search will be fixed for Firefox 3.1 (bug [https://bugzilla.mozilla.org/show_bug.cgi?id=451151 451151]) so that subfolders are also included (recursive).
|||||@>-,----------- fixed? -->
|||||@>-,----------- fixed? -->
To get a better idea of what you are actually looking at in your results install the [https://addons.mozilla.org/firefox/7372 Show Parent Folder] and [https://addons.mozilla.org/firefox/addon/7377 Go Parent Folder] add-ons. Include the "Parent folder" column in the library listing through the View menu (or the context menu of column headers). You can't sort entries using that column, though. <!-- Sorting on that column will show the hierarchy of the results.-->
To get a better idea of what you are actually looking at in your results install the [https://addons.mozilla.org/firefox/7372 Show Parent Folder] and [https://addons.mozilla.org/firefox/addon/7377 Go Parent Folder] add-ons. Include the "Parent folder" column in the library listing through the <em>View</em> menu (or the context menu of the column headers). You can't sort entries using that column, though.


===Links===
===Links===
* [https://addons.mozilla.org/firefox/425 Linky :: Firefox Add-ons], total number of links and images on the page is provided before continuing from main context menu,   extension provides for opening many tabs from a selection of selected page links into new tabs but if your selection count exceeds 99 links you must reduce the selection area or the number of check-marked links and work from there to get usable counts.  
* [https://addons.mozilla.org/firefox/425 Linky :: Firefox Add-ons], total number of links and images on the page is provided before continuing from main context menu, extension provides for opening many tabs from a selection of selected page links into new tabs but if your selection count exceeds 99 links you must reduce the selection area or the number of check-marked links and work from there to get usable counts.
* [http://snaplinks.mozdev.org/ Snap Links Plus] or [https://addons.mozilla.org/en-US/firefox/addon/13494 Multi Links 1.0.0.12 :: Firefox Add-ons] allow you to open links with a drawable selection area. Snap Links Plus allows you to see in the status bar how many links you have selected.
* [https://addons.mozilla.org/firefox/5887 Links Counter :: Firefox Add-ons] counts external links without 'nofollow', external links with 'nofollow' and domain internal links in a page. (Has not been updated for current versions of Firefox)
* [https://addons.mozilla.org/firefox/5887 Links Counter :: Firefox Add-ons] counts external links without 'nofollow', external links with 'nofollow' and domain internal links in a page. (Has not been updated for current versions of Firefox)
* Also see [[#Bookmarks|Bookmarks]] (above), and [[#Bookmarklets|Bookmarklets]] (below).
* Also see [[#Bookmarks|Bookmarks]] (above), and [[#Bookmarklets|Bookmarklets]] (below).


===Page size===
===Page size===
Line 53: Line 53:
===Position===
===Position===
* [[https://addons.mozilla.org/firefox/743 CustomizeGoogle :: Add-ons for Firefox]], provides option for item position counter in Google web search (not available in groups search).
* [[https://addons.mozilla.org/firefox/743 CustomizeGoogle :: Add-ons for Firefox]], provides option for item position counter in Google web search (not available in groups search).


==Tabs==
==Tabs==
Line 79: Line 78:
If not found below most are in [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html] for folders to install on bookmarks toolbar.
If not found below most are in [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html] for folders to install on bookmarks toolbar.
* [https://www.squarefree.com/bookmarklets/forms.html#character_count '''Character Count''' :: Form Bookmarklets] (F), Displays a running count of the characters in each textbox.&nbsp; <nowiki>[ keyword: character:count ]</nowiki>
* [https://www.squarefree.com/bookmarklets/forms.html#character_count '''Character Count''' :: Form Bookmarklets] (F), Displays a running count of the characters in each textbox.&nbsp; <nowiki>[ keyword: character:count ]</nowiki>
:: <nowiki>javascript:(function(){var%20D=document,i,f,j,e;for(i=0;f=D.forms[i];++i)for(j=0;e=f[j];++j)if(e.type=="text"||e.type=="password"||e.tagName.toLowerCase()=="textarea")S(e);function%20S(e){if(!e.N){var%20x=D.createElement("span"),s=x.style;s.color="green";s.background="white";s.font="bold%2010pt%20sans-serif";s.verticalAlign="top";e.parentNode.insertBefore(x,e.nextSibling);function%20u(){x.innerHTML=e.value.length;}u();e.onchange=u;e.onkeyup=u;e.oninput=u;e.N=x;}else{e.parentNode.removeChild(e.N);e.N=0;}}})()</nowiki>
:: <code><nowiki>javascript:(function(){var%20D=document,i,f,j,e;for(i=0;f=D.forms[i];++i)for(j=0;e=f[j];++j)if(e.type=="text"||e.type=="password"||e.tagName.toLowerCase()=="textarea")S(e);function%20S(e){if(!e.N){var%20x=D.createElement("span"),s=x.style;s.color="green";s.background="white";s.font="bold%2010pt%20sans-serif";s.verticalAlign="top";e.parentNode.insertBefore(x,e.nextSibling);function%20u(){x.innerHTML=e.value.length;}u();e.onchange=u;e.onkeyup=u;e.oninput=u;e.N=x;}else{e.parentNode.removeChild(e.N);e.N=0;}}})()</nowiki></code>
* '''count strings on a page''' (ID), provides a dialog "Search for what string?"  
* '''count strings on a page''' (ID), provides a dialog "Search for what string?"  
<span style="border:1px black solid">&nbsp;lowercase &nbsp;</span> -- <span style="border:1px black solid">&nbsp;Found 7 occurrences of "lowercase".&nbsp;</span>
<span style="border:1px black solid">&nbsp;lowercase &nbsp;</span> -- <span style="border:1px black solid">&nbsp;Found 7 occurrences of "lowercase".&nbsp;</span>
:: <nowiki>javascript:void%20new%20Function(%22var%20c=0,w=prompt('Search%20for%20what%20string?',''),y=pageYOffset;if(w){while(find(w))c++;scrollBy(0,y-pageYOffset);alert('Found%20'+c+'%20occurrence'+(c==1?'':'s')+'%20of%20\%22'+w+'\%22.')}%22).call()</nowiki>  
:: <code><nowiki>javascript:void%20new%20Function(%22var%20c=0,w=prompt('Search%20for%20what%20string?',''),y=pageYOffset;if(w){while(find(w))c++;scrollBy(0,y-pageYOffset);alert('Found%20'+c+'%20occurrence'+(c==1?'':'s')+'%20of%20\%22'+w+'\%22.')}%22).call()</nowiki></code>
* '''href:''' (not a count), expands all links on a page to show the url or JavaScript code with href="..." of anchor tags ([http://www.mvps.org/dmcritchie/firefox/kws.htm#k" HREF visible], keyword: '''href:''') based on “Paren Tips” (keyword: '''parentips:''') makes Title with HTML visible ([https://www.squarefree.com/bookmarklets/sitespecific.html])  
* '''href:''' (not a count), expands all links on a page to show the url or JavaScript code with href="..." of anchor tags ([http://www.mvps.org/dmcritchie/firefox/kws.htm#k" HREF visible], keyword: '''href:''') based on “Paren Tips” (keyword: '''parentips:''') makes Title with HTML visible ([https://www.squarefree.com/bookmarklets/sitespecific.html])  
:: <code><nowiki>javascript:(function(){%20var%20z=[],N,href,tc,j;%20function%20r(N)%20{%20if%20(N.href)%20z.push(N);%20var%20C=N.childNodes,i;for(i=0;i<C.length;++i)r(C[i]);%20}%20r(document.body);%20for%20(j%20in%20z)%20{%20N=z[j];%20href=document.createTextNode(%22%20[--\u00A0%22+N.href+%22%20--]%22);%20tc=document.createElement(%22span%22);%20tc.style.color=%22green%22;%20tc.style.background=%22#FFEE99%22;%20tc.appendChild(href);%20N.parentNode.insertBefore(tc,N.nextSibling);%20N.parentNode.insertBefore(document.createTextNode(%22%20%22),tc);%20}})();</nowiki></code>
:: <code><nowiki>javascript:(function(){%20var%20z=[],N,href,tc,j;%20function%20r(N)%20{%20if%20(N.href)%20z.push(N);%20var%20C=N.childNodes,i;for(i=0;i<C.length;++i)r(C[i]);%20}%20r(document.body);%20for%20(j%20in%20z)%20{%20N=z[j];%20href=document.createTextNode(%22%20[--\u00A0%22+N.href+%22%20--]%22);%20tc=document.createElement(%22span%22);%20tc.style.color=%22green%22;%20tc.style.background=%22#FFEE99%22;%20tc.appendChild(href);%20N.parentNode.insertBefore(tc,N.nextSibling);%20N.parentNode.insertBefore(document.createTextNode(%22%20%22),tc);%20}})();</nowiki></code>
* '''href:count''', Count of HREF in HTML anchor tags, You can see this in action by clicking on link that has "href:count" within [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html] works on an exported bookmarks.html file produces a box like <span style="border:1px black solid">&nbsp;Href count: 585 [OK]&nbsp;</span> (similar to '''keywords:count''')
* '''href:count''', Count of HREF in HTML anchor tags, You can see this in action by clicking on link that has "href:count" within [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html] works on an exported bookmarks.html file produces a box like <span style="border:1px black solid">&nbsp;Href count: 585 [OK]&nbsp;</span> (similar to '''keywords:count''')
:: <nowiki>javascript:(function(){var%20c='red',e=document.getElementsByTagName('a'),E,k=0,n,t;%20for(i=0;E=e[i];i++){t=E.getAttribute('HREF');%20if(t&&t!=''){n=document.createElement('span');%20n.style.color=c;n.innerHTML='['+t+']';%20E.appendChild(n);k++}}%20alert('HREF%20count:%20'+k);})()</nowiki>
:: <code><nowiki>javascript:(function(){var%20c='red',e=document.getElementsByTagName('a'),E,k=0,n,t;%20for(i=0;E=e[i];i++){t=E.getAttribute('HREF');%20if(t&&t!=''){n=document.createElement('span');%20n.style.color=c;n.innerHTML='['+t+']';%20E.appendChild(n);k++}}%20alert('HREF%20count:%20'+k);})()</nowiki></code>
* '''keywords:count''', Count keywords example ([http://forums.mozillazine.org/viewtopic.php?f=8&t=635673&start=0&st=0&sk=t&sd=a]) &ndash; You can see this in action by clicking on [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html link] that has "keywords:" within an exported bookmarks.html file produces a box like <span style="border:1px black solid">&nbsp;Keywords found: 417 [OK]&nbsp;</span> -- goal would be for this to work from a selection
* '''keywords:count''', Count keywords example ([http://forums.mozillazine.org/viewtopic.php?f=8&t=635673&start=0&st=0&sk=t&sd=a]) &ndash; You can see this in action by clicking on [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html link] that has "keywords:" within an exported bookmarks.html file produces a box like <span style="border:1px black solid">&nbsp;Keywords found: 417 [OK]&nbsp;</span> -- goal would be for this to work from a selection
:: <nowiki>javascript:(function(){var%20c='red',e=document.getElementsByTagName('a'),E,k=0,n,t;%20for(i=0;E=e[i];i++){t=E.getAttribute('SHORTCUTURL');%20if(t&&t!=''){n=document.createElement('span');%20n.style.color=c;n.innerHTML='['+t+']';%20E.appendChild(n);k++}}%20alert('shortcuts%20found:%20'+k);})()</nowiki>
:: <code>nowiki>javascript:(function(){var%20c='red',e=document.getElementsByTagName('a'),E,k=0,n,t;%20for(i=0;E=e[i];i++){t=E.getAttribute('SHORTCUTURL');%20if(t&&t!=''){n=document.createElement('span');%20n.style.color=c;n.innerHTML='['+t+']';%20E.appendChild(n);k++}}%20alert('shortcuts%20found:%20'+k);})()</nowiki></code>
* [https://www.squarefree.com/bookmarklets/seo.html#word_frequency '''word frequency'''] Lists the words in the page and how many times each word appears.
* [https://www.squarefree.com/bookmarklets/seo.html#word_frequency '''word frequency'''] Lists the words in the page and how many times each word appears.
:: <nowiki>javascript:(function(){var%20T={},W=[],C=0,s,i;%20function%20F(n){var%20i,x,a,w,t=n.tagName;if(n.nodeType==3){a=n.data.toLowerCase().split(/[\s\(\)\:\,\.;\<\>\&\'\"]/);for(i%20in%20a)if(w=a[i]){w="%20"+w;T[w]=T[w]?T[w]+1:1;++C;}}if(t!="SCRIPT"&&t!="STYLE")for(i=0;x=n.childNodes[i];++i)F(x)}F(document);for(i%20in%20T)W.push([T[i],i]);W.sort(function(a,b){var%20x=b[0]-a[0];return%20x?x:((b[1]<a[1])?1:-1)});%20s="<h3>"+C+"%20words</h3>";for(i%20in%20W)s+=W[i][0]+":"+W[i][1]+"<br>";with(open().document){write(s);close()}})()</nowiki>
:: <code><nowiki>javascript:(function(){var%20T={},W=[],C=0,s,i;%20function%20F(n){var%20i,x,a,w,t=n.tagName;if(n.nodeType==3){a=n.data.toLowerCase().split(/[\s\(\)\:\,\.;\<\>\&\'\"]/);for(i%20in%20a)if(w=a[i]){w="%20"+w;T[w]=T[w]?T[w]+1:1;++C;}}if(t!="SCRIPT"&&t!="STYLE")for(i=0;x=n.childNodes[i];++i)F(x)}F(document);for(i%20in%20T)W.push([T[i],i]);W.sort(function(a,b){var%20x=b[0]-a[0];return%20x?x:((b[1]<a[1])?1:-1)});%20s="<h3>"+C+"%20words</h3>";for(i%20in%20W)s+=W[i][0]+":"+W[i][1]+"<br>";with(open().document){write(s);close()}})()</nowiki></code>
* '''words:''' word count, get bookmarklet at [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html] test by selecting a few words, or if you seleted the entire page you might see something like <span style="border:1px black solid">&nbsp;words in selection: 11615&nbsp;</span>  
* '''words:''' word count, get bookmarklet at [http://www.mvps.org/dmcritchie/firefox/lessons/intro/k.html k.html] test by selecting a few words, or if you seleted the entire page you might see something like <span style="border:1px black solid">&nbsp;words in selection: 11615&nbsp;</span>  
:: <nowiki>javascript:alert('words%20in%20selection:%20'%20+%20document.getSelection().split('%20').length)</nowiki>
:: <code><nowiki>javascript:alert('words%20in%20selection:%20'%20+%20document.getSelection().split('%20').length)</nowiki></code>


===Tables===
===Tables===

Revision as of 00:02, 9 August 2009


This article addresses how to obtain an item's count concerning Firefox features (bookmarks, history) and counts of such things as links within an active page, along with some calculation features.

Bookmarks and links

Bookmarks

Bookmarks are available with "Ctrl+B". "Ctrl+Shift+B" can show "visit count" per item. For a summary with all items search for :// or http.

  • Bookmarks
  • Bookmarks with keywords, all, in a folder (1st level of a folder, all levels within)
  • Bookmarks with tags, Total number of defined tags (1st level of a folder, all levels within)
  • Bookmarks with description

Note "Ctrl+Shift+B" gets you Organize Bookmarks, but if you have converted from older bookmarks the keyboard shortcut may not work, in which case use "Ctrl+Shift+H" for History then select All Bookmarks.

History

History is available with "Ctrl+H". "Ctrl+Shift+H" can show "visit count" per item but not a summary, unless you do a search (:// or http).

  • Number of visits to current page ("Ctrl+Shift+H", your own history)

Library

The Library can be accessed through Bookmarks (menu bar) > Organize Bookmarks (version 3 non-upgraded users can use "Ctrl+Shift+B").

Bring up the Library window and do a search for ://. That will pick up both http:// and https://. If you want to include bookmarklets search for ":" (semicolon) instead. To restrict to bookmarklets use "Javascript".

There will be a count in the properties area (at the bottom), if that area prevents the number to show up, move the vertical scrollbar a little bit and the total will appear. If an item in the list is already selected, simply CTRL-click (deselect) that item.

To get a better idea of what you are actually looking at in your results install the Show Parent Folder and Go Parent Folder add-ons. Include the "Parent folder" column in the library listing through the View menu (or the context menu of the column headers). You can't sort entries using that column, though.

Links

  • Linky :: Firefox Add-ons, total number of links and images on the page is provided before continuing from main context menu, extension provides for opening many tabs from a selection of selected page links into new tabs but if your selection count exceeds 99 links you must reduce the selection area or the number of check-marked links and work from there to get usable counts.
  • Snap Links Plus or Multi Links 1.0.0.12 :: Firefox Add-ons allow you to open links with a drawable selection area. Snap Links Plus allows you to see in the status bar how many links you have selected.
  • Links Counter :: Firefox Add-ons counts external links without 'nofollow', external links with 'nofollow' and domain internal links in a page. (Has not been updated for current versions of Firefox)
  • Also see Bookmarks (above), and Bookmarklets (below).


Page size

  • Size of current page, subject to server response. "Tools -> Page Info -> General (tab)"
  • The Web Developer Firefox add-on provides total page weight, size including all images, stylesheets. "Web Developer -> Information -> View Document Size". The report can be expanded to show size of each item.

Position

Tabs

  • Tab Counter :: Firefox Add-ons, counts the number of open tabs per window and displays the count in a toolbar. (22KB)  22 
  • TabCounter :: Firefox Add-ons, tab counters on status bar (separate boxes). Provides some historical stats as well. (9KB)  22|25    3|25 
  • Open Tab Count :: Firefox Add-ons, displays the number of open tabs for each window and the total number of open tabs (in all windows) in the status bar. (4KB)  22/25    3/25 
  • TabCount :: Firefox Add-ons status bar panel to display the number of currently open tabs both in the active window and across all windows. (6KB)  22/25    3/25 
  • Count of History items within current tab (back/forward key) and all tabs, not a count of the links within the active page.

Items shown with borders are as shown on statusbar, toolbars, or in dialog boxes, or a selected button.

Addons

Body

Bookmarklets

If not found below most are in k.html for folders to install on bookmarks toolbar.

javascript:(function(){var%20D=document,i,f,j,e;for(i=0;f=D.forms[i];++i)for(j=0;e=f[j];++j)if(e.type=="text"||e.type=="password"||e.tagName.toLowerCase()=="textarea")S(e);function%20S(e){if(!e.N){var%20x=D.createElement("span"),s=x.style;s.color="green";s.background="white";s.font="bold%2010pt%20sans-serif";s.verticalAlign="top";e.parentNode.insertBefore(x,e.nextSibling);function%20u(){x.innerHTML=e.value.length;}u();e.onchange=u;e.onkeyup=u;e.oninput=u;e.N=x;}else{e.parentNode.removeChild(e.N);e.N=0;}}})()
  • count strings on a page (ID), provides a dialog "Search for what string?"

 lowercase   --  Found 7 occurrences of "lowercase". 

javascript:void%20new%20Function(%22var%20c=0,w=prompt('Search%20for%20what%20string?',''),y=pageYOffset;if(w){while(find(w))c++;scrollBy(0,y-pageYOffset);alert('Found%20'+c+'%20occurrence'+(c==1?'':'s')+'%20of%20\%22'+w+'\%22.')}%22).call()
  • href: (not a count), expands all links on a page to show the url or JavaScript code with href="..." of anchor tags (" HREF visible, keyword: href:) based on “Paren Tips” (keyword: parentips:) makes Title with HTML visible ([1])
javascript:(function(){%20var%20z=[],N,href,tc,j;%20function%20r(N)%20{%20if%20(N.href)%20z.push(N);%20var%20C=N.childNodes,i;for(i=0;i<C.length;++i)r(C[i]);%20}%20r(document.body);%20for%20(j%20in%20z)%20{%20N=z[j];%20href=document.createTextNode(%22%20[--\u00A0%22+N.href+%22%20--]%22);%20tc=document.createElement(%22span%22);%20tc.style.color=%22green%22;%20tc.style.background=%22#FFEE99%22;%20tc.appendChild(href);%20N.parentNode.insertBefore(tc,N.nextSibling);%20N.parentNode.insertBefore(document.createTextNode(%22%20%22),tc);%20}})();
  • href:count, Count of HREF in HTML anchor tags, You can see this in action by clicking on link that has "href:count" within k.html works on an exported bookmarks.html file produces a box like  Href count: 585 [OK]  (similar to keywords:count)
javascript:(function(){var%20c='red',e=document.getElementsByTagName('a'),E,k=0,n,t;%20for(i=0;E=e[i];i++){t=E.getAttribute('HREF');%20if(t&&t!=''){n=document.createElement('span');%20n.style.color=c;n.innerHTML='['+t+']';%20E.appendChild(n);k++}}%20alert('HREF%20count:%20'+k);})()
  • keywords:count, Count keywords example ([2]) – You can see this in action by clicking on k.html link that has "keywords:" within an exported bookmarks.html file produces a box like  Keywords found: 417 [OK]  -- goal would be for this to work from a selection
nowiki>javascript:(function(){var%20c='red',e=document.getElementsByTagName('a'),E,k=0,n,t;%20for(i=0;E=e[i];i++){t=E.getAttribute('SHORTCUTURL');%20if(t&&t!=){n=document.createElement('span');%20n.style.color=c;n.innerHTML='['+t+']';%20E.appendChild(n);k++}}%20alert('shortcuts%20found:%20'+k);})()</nowiki>
  • word frequency Lists the words in the page and how many times each word appears.
javascript:(function(){var%20T={},W=[],C=0,s,i;%20function%20F(n){var%20i,x,a,w,t=n.tagName;if(n.nodeType==3){a=n.data.toLowerCase().split(/[\s\(\)\:\,\.;\<\>\&\'\"]/);for(i%20in%20a)if(w=a[i]){w="%20"+w;T[w]=T[w]?T[w]+1:1;++C;}}if(t!="SCRIPT"&&t!="STYLE")for(i=0;x=n.childNodes[i];++i)F(x)}F(document);for(i%20in%20T)W.push([T[i],i]);W.sort(function(a,b){var%20x=b[0]-a[0];return%20x?x:((b[1]<a[1])?1:-1)});%20s="<h3>"+C+"%20words</h3>";for(i%20in%20W)s+=W[i][0]+":"+W[i][1]+"<br>";with(open().document){write(s);close()}})()
  • words: word count, get bookmarklet at k.html test by selecting a few words, or if you seleted the entire page you might see something like  words in selection: 11615 
javascript:alert('words%20in%20selection:%20'%20+%20document.getSelection().split('%20').length)

Tables

External links

  • Bug 451151 - Search box In Places Organizer (Library) not behaving correctly (this is the primary problem with searches, and is marked as a blocker for 3.1)
Note also the disappearing/reappearing scope at the top of the Library listing, only appears after first doing a search.
Search:    Selected Folder    All Bookmarks   History
Search:   Selected Folder (only)    Selected Folder & all subfolders    All Bookmarks   History