From 9003e18adaa5619e5a4b4a78396ff89fbbaa17db Mon Sep 17 00:00:00 2001 From: Dillon Date: Tue, 28 Apr 2020 02:19:58 +0800 Subject: fix: simpleicons title override link title error (#270) --- src/js/theme.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/js/theme.js b/src/js/theme.js index ef56582..ebb9cf1 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -52,6 +52,8 @@ class Theme { const $svg = $temp.firstChild; $svg.setAttribute('data-svg-src', $icon.getAttribute('data-svg-src')); $svg.classList.add('icon'); + const $titleElements = $svg.getElementsByTagName('title'); + if ($titleElements.length) $svg.removeChild($titleElements[0]); $icon.parentElement.replaceChild($svg, $icon); }) .catch(console.error.bind(console)); -- cgit v1.2.3