Skip to content

Commit

Permalink
explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear committed Jan 15, 2013
1 parent bea6cb1 commit 17dfce5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions noscript.js
Expand Up @@ -13,21 +13,22 @@ exports.eejsBlock_body = function (hook_name, args, cb) {

function(callback){ // Get the pad Text
var padText = padManager.getPad(args.renderContext.req.params.pad, function(err, _pad){
console.warn("Got Pad Text", _pad.text());
console.warn("Got Pad Text");
pad = _pad;
ERR(err);
callback();
});
},

function(callback){ // Append the pad Text to the Body
console.warn("adding pad text", pad.text());
console.warn("adding pad text");
args.content = args.content + "<noscript>"+safe_tags(pad.text())+"</noscript>";
callback();
},

function(callback){ // Return the callback to EEJS
return cb();
console.warn(args.content); // Shows the correct content including teh noscript tags!!
return cb(); // doesn't display the correct args.content!
callback();
}
]);
Expand Down

0 comments on commit 17dfce5

Please sign in to comment.