A Counting/Statistics type Add-on

Hi everyone. I want to ask those more experienced with add-ons if there exists an add-on that I can use to count how many times a specific phrase appears on a webpage (while this webpage refreshes every so often) and saves these counts to a file or saves them somewhere that I can access later.

Thanks in advanced!

Oh cool idea, like a word cloud sort of thing?

Yeah but instead of the program analyzing the most frequent words or phrases on the page, you choose for it to target specific phrases, and it tells you how frequent they are only.

Interesting. I think we would have to do, on button click/kick off - get all words and count, then user can filter them out. (or just get all words, then after user filters, then get count).

You should make this addon if you need help getting started let us know we’ll help you out. You probably want to do this with if you are new to addons then contentScript and addon-sdk. If more experienced you might opt for Cu.Sandbox https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.Sandbox from bootstrap.js (i dont know how intensive the calculations for a word cloud are,but you can throw that off to a WebWorker after getting the words from the dom)

A very simple solution would be the built-in search. Just paste or type in the phrase, right next to you will see the number of occurrences.

Ah yeah you can probably hijack the find feature functionalities to use for your addon, this is where the functions are: https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/Finder.jsm

I did an quick and dirty (and very ugly and sloppy!) job of using the finder functions to make a highlight selected in document here: https://github.com/Noitidart/HiliteOnSelection and the addon for it is here: https://addons.mozilla.org/en-US/firefox/addon/hiliteonselection/

Thank you for all the advice, but I have no knowledge or experience in coding of anything whatsoever, so no chance that I’ll be building this or be able to build it- I was just looking to see if someone had done so already that someone could link me to. Using the browser’s search isn’t what I had in mind- I want the addon to count and record the number of instances a particular phrase is used and while the page refreshes (re-counting again each time the page refreshes) so that it runs in the background while I’m out of the house or doing something else. I don’t want to just count the number of instances once and that’s it (that’s mostly where this addon differs from word cloud programs).

I can help you do this, i hear webext api is meant for non-coders, and it’ll force me to learn it to show you. Lets get togather sometime on irc irc://moznet/extdev my names noida (if you dont have irc client heres html5 client: https://client00.chat.mibbit.com/?url=irc%3A%2F%2Fmoznet%2Fextdev )