Created
August 7, 2017 04:08
-
-
Save anonymous/47e445b53374f6e91e6273164a80b583 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 将点击的评论内容按照 markdown 解析 | |
window.addEventListener('click',function(e){ | |
var target = e.target ; | |
if( e.altKey && target.matches('.reply_content') ) | |
{ | |
$.post('/preview/markdown', {'md': target.textContent }, function(data){ | |
target.innerHTML = data ; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment