added a screening page for external links. removed forced target = _blank on external links for UX consideration

used http://www.deviantart.com/users/outgoing?http://www.nodebb.org/ for
inspiration
This commit is contained in:
psychobunny
2013-07-23 03:07:27 +08:00
parent d9fa78a866
commit e66cab23cf
4 changed files with 38 additions and 3 deletions

View File

@@ -278,6 +278,20 @@ var express = require('express'),
});
});
app.get('/outgoing', function(req, res) {
var url = req.url.split('?');
if (url[1]) {
res.send(app.build_header(res) + templates['outgoing'].parse({
url: url[1],
home: global.nconf.get('url')
}) + templates['footer']);
} else {
res.status(404);
res.redirect(global.nconf.get('relative_path') + '/404');
}
});
});
// These functions are called via ajax once the initial page is loaded to populate templates with data