From 40ad7837fc811fc517171075b1d7cc5ae8dc5cc8 Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 12 Oct 2017 16:12:34 +0800 Subject: [PATCH] Change: allow makeLink to append child. Add rel=noopener --- js/dom.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/dom.js b/js/dom.js index 003b02c7..8638e941 100644 --- a/js/dom.js +++ b/js/dom.js @@ -194,11 +194,12 @@ function $element(opt) { } -function makeLink(href = '', textContent) { +function makeLink(href = '', content) { return $element({ tag: 'a', target: '_blank', href, - textContent, + rel: 'noopener', + appendChild: content, }); }