barisusakli 9 years ago
parent a0afe6a6aa
commit 182a07ddb4

@ -0,0 +1,16 @@
'use strict';
var S = require.main.require('string');
var library = {};
library.getTeasers = function(data, callback) {
data.teasers.forEach(function(teaser) {
if (teaser && teaser.content) {
teaser.content = S(teaser.content).stripTags('img').s;
}
});
callback(null, data);
};
module.exports = library;

@ -1,6 +1,9 @@
{ {
"id": "nodebb-theme-persona", "id": "nodebb-theme-persona",
"hooks": [], "library": "library.js",
"hooks": [
{ "hook": "filter:teasers.get", "method": "getTeasers" }
],
"scripts": [ "scripts": [
"lib/persona.js", "lib/persona.js",
"lib/modules/nprogress.js", "lib/modules/nprogress.js",

Loading…
Cancel
Save