Well, document.documentElement.innerHTML would be sufficient, no? And some function for the document element of iFrames, if needed.
☆PhistucK On Thu, Dec 31, 2009 at 05:41, Ernest Delgado <[email protected]> wrote: > I don't think there's a trivial way to do that. You will have to use a > "content script" in your extension but then you will have to implement > a bunch of things to walk the dom, inspect innerHTMLs and values of > the elements and replace the specific words with a regexp. (unless I > am forgetting some magic method) > > You might want to check the extensions gallery to see if someone else > has implemented something similar. > > Ernest > > On Fri, Dec 25, 2009 at 3:01 PM, DanH1420 <[email protected]> wrote: > > I'm trying to figure out how to have an extension replace certain text > > it sees on a page with new text. For example, if it sees the text > > "string1" anywhere in a page, it replaces it with "string2". This > > sounds doable, but I haven't been able to get anything to work. Does > > anyone else know how to do this? > > > > -- > > > > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > > To post to this group, send email to > [email protected]. > > To unsubscribe from this group, send email to > [email protected]<chromium-extensions%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<chromium-extensions%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.
