add missing functions
parent
ca7d2943be
commit
6d775f61c6
|
@ -35,6 +35,17 @@ define([
|
|||
|
||||
var isArray = function (o) { return Object.prototype.toString.call(o) === '[object Array]'; };
|
||||
|
||||
var fixHTML = common.fixHTML = function (html) {
|
||||
return html.replace(/</g, '<');
|
||||
};
|
||||
|
||||
var truncate = common.truncate = function (text, len) {
|
||||
if (typeof(text) === 'string' && text.length > len) {
|
||||
return text.slice(0, len) + '…';
|
||||
}
|
||||
return text;
|
||||
};
|
||||
|
||||
common.redirect = function (hash) {
|
||||
var hostname = window.location.hostname;
|
||||
|
||||
|
|
Loading…
Reference in New Issue