[Greasemonkey] insert comment top html document

Prakash Kailasa pk-moz at kailasa.net
Fri Feb 10 07:51:27 EST 2006


On Fri, Feb 10, 2006 at 06:21:48AM -0500, Roderick McGuire wrote:
> Bill Donnelly wrote:
> >I want to write a GmScript that inserts a comment at the top of each
> >html document that contains the URL source address, so when the source
> >is saved, the URL of the document is automatically included for reference.
> 
> It has been my impression that when you View Source or Save Source Fx 
> goes out and reloads the document (maybe from cache). It would be nice 
> if there was an option to reconstruct a source from a heavily altered 
> DOM but this is different than what seems to currently go on.

The excellent Web Developer extension provides this feature. Select
"View Source -> View Generated Source" and the source, as generated
from the current DOM, is displayed in a new tab or window.

http://chrispederick.com/work/webdeveloper/

Another alternative would be the "generated source" bookmarklet from
the equally excellent collection by Jesse Ruderman.

http://www.squarefree.com/bookmarklets/webdevel.html#generated_source

These should be helpful if you want to work on your own GM script too.


/prakash

-- 
|Kaufman's First Law of Party Physics:                                 |
|        Population density is inversely proportional to the square    |
|        of the distance from the keg.                                 |


More information about the Greasemonkey mailing list