summaryrefslogtreecommitdiff
path: root/src/ws
diff options
context:
space:
mode:
Diffstat (limited to 'src/ws')
-rw-r--r--src/ws/Makefile.am3
m---------src/ws/marked0
-rw-r--r--src/ws/munia.html1
-rw-r--r--src/ws/node.js21
4 files changed, 10 insertions, 15 deletions
diff --git a/src/ws/Makefile.am b/src/ws/Makefile.am
index 64d0540..c7252e5 100644
--- a/src/ws/Makefile.am
+++ b/src/ws/Makefile.am
@@ -11,4 +11,5 @@ ws_DATA = \
munia.html \
node.js \
proto.js \
- view.js
+ view.js \
+ marked/marked.min.js
diff --git a/src/ws/marked b/src/ws/marked
new file mode 160000
+Subproject b198b55eb0bd02ba6209051c9c85a95e297353f
diff --git a/src/ws/munia.html b/src/ws/munia.html
index 4406afa..98ce8bd 100644
--- a/src/ws/munia.html
+++ b/src/ws/munia.html
@@ -29,6 +29,7 @@
<script type="text/javascript" charset="utf-8" src="node.js"></script>
<script type="text/javascript" charset="utf-8" src="view.js"></script>
<script type="text/javascript" charset="utf-8" src="handler.js"></script>
+<script type="text/javascript" charset="utf-8" src="marked.min.js"></script>
</body>
</html>
diff --git a/src/ws/node.js b/src/ws/node.js
index 5ecfdac..16eb9cc 100644
--- a/src/ws/node.js
+++ b/src/ws/node.js
@@ -298,10 +298,12 @@ function makeClickthrough(e)
var elements = e.getElementsByTagName("*");
for(let element of elements)
{
- if(element.tagName != "A")
+ if(element.tagName == "A")
{
- element.style.pointerEvents = "none"; // enable clickthrough to parent
+ element.style.pointerEvents = "initial"; // enable links
+ continue;
}
+ element.style.pointerEvents = "none"; // enable clickthrough to parent
}
}
@@ -325,18 +327,9 @@ Node.prototype.setAttribute = function(name, value)
{
this.description_element.removeChild(this.description_element.firstChild);
}
- if(checkHTML(value))
- {
- // Insert as HTML
- this.description_element.innerHTML = value;
- makeClickthrough(this.description_element);
- }
- else
- {
- // Not valid HTML, insert as plain text to avoid breaking things
- var description_txt = document.createTextNode(value);
- this.description_element.appendChild(description_txt);
- }
+
+ this.description_element.innerHTML = marked(value);
+ makeClickthrough(this.description_element);
}
if(name == "dragged")