diff --git a/index.html b/index.html
index d1dd0ed..509d4a9 100644
--- a/index.html
+++ b/index.html
@@ -36,6 +36,15 @@
+
+
@@ -278,7 +287,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
+ -->
|
diff --git a/js/filters.js b/js/filters.js
index 9921d8a..5490335 100644
--- a/js/filters.js
+++ b/js/filters.js
@@ -150,4 +150,17 @@ weechat.filter('emojify', function() {
};
});
+weechat.filter('mathjax', function() {
+ return function(text, selector) {
+ if (text.indexOf("$$") != -1 || text.indexOf("\\[") != -1 || text.indexOf("\\(") != -1) {
+ // contains math
+ //var math = document.getElementById("MathExample");
+ var math = document.querySelector(selector);
+ MathJax.Hub.Queue(["Typeset",MathJax.Hub,math]);
+ }
+
+ return text;
+ };
+});
+
})();