]> git.wh0rd.org - tt-rss.git/blobdiff - functions.js
offline: render headlines list using local data
[tt-rss.git] / functions.js
index ecb41db2ee135e57f8f7b5d9ca5b2580e5825c3a..2b0370d395c3f0926df88d8197517759835ed0f4 100644 (file)
@@ -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;
+}