On Sat, Jan 9, 2010 at 8:32 AM, Petty <m...@paulgriffinpetty.com> wrote: > I have anextension in which I's like to grab HTML, etc. from a view- > source: URL: > > E.G. view-source:http://google.com > > I tried adding view-source: to permissions in my manifest (a couple > different ways): > > "permissions": [ > "tabs", "http://*/*", "https://*/*", "view-source:http://*/*", > "view-source:https://*/*", "view-source:*", "view-source:" > ], > > ... anyone figure this out?
Hey Petty, content scripts will run against "view-source:" URLs. You don't need to do anything special -- just specify the "http://*/*" and "https://*/*" match patterns, assuming those are the URLs you want. But getting the original HTML from "view-source:" pages won't be trivial because they're heavily marked up for syntax highlighting. Instead of relying on a page's corresponding "view-source:" page, you'd be better off running something like "document.getElementsByTagName('html')[0].innerHTML" on the page itself if possible.
-- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.