Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created May 14, 2013 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterdavis/5572980 to your computer and use it in GitHub Desktop.
Save walterdavis/5572980 to your computer and use it in GitHub Desktop.
<action-encoding>UTF-8</action-encoding>
<page-action name="com.wdstudio.page_id" title="PageID">
<action-version version="0.1">
PageID
Copyright 2013 Walter Lee Davis
Add an ID to the body tag.
</action-version>
<action-text name="bodyId" title="Body ID" />
<action-checkbox name="enable" title="Add the ID" default=yes />
<action-javascript>
function fwAfterStartBody(){
var body = fwDocument.fwTags.fwFind('body');
if(body && fwParameters.enable.fwBoolValue) body.id = fwQuote(fwParameters.bodyId.fwValue);
}
</action-javascript>
</page-action>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment