Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created June 11, 2013 14:19
Show Gist options
  • Select an option

  • Save walterdavis/5757215 to your computer and use it in GitHub Desktop.

Select an option

Save walterdavis/5757215 to your computer and use it in GitHub Desktop.
Lost in the woods, dropping breadcrumbs as they go...
<action-encoding>UTF-8</action-encoding>
<page-action name="com.wdstudio.gretel" title="Gretel">
<action-version version="0.1">
Gretel
Copyright 2013 Walter Lee Davis
Add trailing comments to each block-level tag.
</action-version>
<action-javascript>
function fwAfterEndBody(){
var tags = fwDocument.fwTags.fwFindAll(['div','article','section','aside','header','footer', 'nav', 'address']);
for (var i = tags.length - 1; i >= 0; i--){
var tag = tags[i];
if(tag.id){
var id = tag.id.toString().slice(1,-1);
var dummy = tag.fwAddEnclosing('');
dummy.fwAddRaw('<!-- end ' + id + ' -->');
}
};
}
</action-javascript>
</page-action>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment