]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/js/theme.js
frio: some css work for help docs
[friendica.git] / view / theme / frio / js / theme.js
index ffe82c24a502a9327385377a8ec227deef113d93..8fbee06e51721c2ae7b78bf590fcbf6c5fb76108 100644 (file)
@@ -570,3 +570,13 @@ function scrollToItem(itemID) {
                $(elm).animate(colWhite, 1000).animate(colShiny).animate(colWhite, 600);
        });
 }
+
+// format a html string to pure text
+function htmlToText(htmlString) {
+       // Replace line breaks with spaces
+       var text = htmlString.replace(/<br>/g, ' ');
+       // Strip the text out of the html string
+       text = text.replace(/<[^>]*>/g, '');
+
+       return text;
+}