[Greasemonkey] Grab text string in TD

Mark Pilgrim pilgrim at gmail.com
Fri Apr 22 12:47:09 EDT 2005

On 4/22/05, Scott R. Turner <srt at aero.org> wrote:
>  GM_find_and_replace(regexp, replace)
>  GM_HTML_find_and_replace(...)

I dislike the idea of building into GM things which can be done in
unprivileged Javascript.  The 5 GM_* functions we have so far
(GM_get/setValue, GM_registerMenuCommand, GM_log, and
GM_xmlhttpRequest) are functions that can not be implemented without
GM's help.  (Now as I type that I'm not sure about GM_log, there was
some discussion about whether it was possible to log things to the
Javascript console, some people said yes, but I don't remember the
final outcome.)

My point is, I like GM as a minimal wrapper that allows you to do
certain things that would otherwise be impossible without writing your
own extension.  I dislike GM becoming a do-it-all API in and of
itself.  For common "patterns" like global search and replace that are
possible to write in unprivileged Javascript and are not GM-specific
functionality, we should simply document how to do it yourself and let
it go at that.  I am working on some formal documentation in this area
and should have something to show for it sometime next week.


More information about the Greasemonkey mailing list