diff options
author | Andrew Dolgov <[email protected]> | 2009-02-03 19:09:59 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-02-03 19:09:59 +0300 |
commit | 261b88b39c94a5c306dc909c3689fd0e047617ce (patch) | |
tree | efff4b1506346815a812d695c6eaee63239d947a /functions.js | |
parent | 6a2034f9ffb51c96ceb8e5bfacb7497ffe6f0820 (diff) |
offline: render headlines list using local data
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/functions.js b/functions.js index ecb41db2e..2b0370d39 100644 --- a/functions.js +++ b/functions.js @@ -2109,3 +2109,13 @@ function transport_error_check(transport) { return true; } +function strip_tags(s) { + return s.replace(/<\/?[^>]+(>|$)/g, ""); +} + +function truncate_string(s, length) { + if (!length) length = 30; + var tmp = s.substring(0, length); + if (s.length > length) tmp += "…"; + return tmp; +} |