From 04b3fdede574c59aefed90cb6cbb7a42d4a7332d Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Tue, 2 Oct 2018 01:18:52 -0400 Subject: Fix dingus link when double clicking Markdown code (#535) Prior to this commit, the link opened is always `/dingus/?text=` (no text), because `$(this)` is `code.language-markdown`, so `.find`ing `code` in its descendants turns up nothing. --- tools/template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/template.html b/tools/template.html index 2bc32c0..05a471a 100644 --- a/tools/template.html +++ b/tools/template.html @@ -108,7 +108,7 @@ $$(document).ready(function() { }); }); $$("code.language-markdown").dblclick(function(e) { window.open('/dingus/?text=' + - encodeURIComponent($$(this).find('code').text())); + encodeURIComponent($$(this).text())); }); }); -- cgit v1.2.3