summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-03 19:09:59 +0300
committerAndrew Dolgov <[email protected]>2009-02-03 19:09:59 +0300
commit261b88b39c94a5c306dc909c3689fd0e047617ce (patch)
treeefff4b1506346815a812d695c6eaee63239d947a /functions.js
parent6a2034f9ffb51c96ceb8e5bfacb7497ffe6f0820 (diff)
offline: render headlines list using local data
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js10
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 += "&hellip;";
+ return tmp;
+}