页面链接转成Markdown
netnr 2019-09-09
var links = document.links, i = 0, md = [];
for (var len = links.length; i < len; i++) {
    var link = links[i];
    md.push("[" + link.innerHTML.replace(/\[/g,'\\[').replace(/\]/g,'\\]') + "](" + link.href + ")");
}
console.log(md.join('  \n'))
登录写评论