FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...


v0.1.0.0 Public
<cfcomponent hint="I replace all instances of 'now' with 'meow' " output="false">

<cffunction name="preRender" access="public" returntype="void" hint="Executes before event data is rendered" output="false" >
<cfargument name="event">
<cfargument name="interceptData">
// Just modifying Brad Woods, JavaScript-Defer / JavascriptDefer.cfc, with something fun (I think)
var local = {};
// Regex to match script tags.
local.regex = "<[\s\/]*script\b[^>]*>[^>]*<\/script>";

local.result = reFindNoCase(local.regex,interceptData.renderedContent,1,true);

// Replace all instances of 'now' and 'Now' with the appropriate 'Moew/moew'
interceptData.renderedContent = Replace(interceptData.renderedContent, "Now", "Meow", "all");
interceptData.renderedContent = Replace(interceptData.renderedContent, "now", "meow", "all");


Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current Sep 27 2014 10:26 PM Jun 09 2016 01:19 AM


$ box install SuperTrooper

No collaborators yet.
  • Sep 27 2014 10:26 PM
  • Jun 09 2016 01:19 AM
  • 1,979
  • 1,152
  • 6