From ce6973385a3990481a14c372175a147f5a741352 Mon Sep 17 00:00:00 2001 From: Jeremy Schomery Date: Fri, 3 Feb 2017 16:35:03 +0330 Subject: [PATCH] merging functions --- install.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/install.js b/install.js index 15b865ac..c0ed018c 100644 --- a/install.js +++ b/install.js @@ -142,11 +142,7 @@ function getResource(url, callback) { n.nodeValue = n.nodeValue.replace('Stylish', 'Stylus'); }); }); -})([...document.querySelectorAll('div[id^="stylish-installed-style-not-installed-"]')]); -(function (es) { - es.forEach(e => { - [...e.childNodes].filter(n => n.nodeType == 3).forEach(n => { - n.nodeValue = n.nodeValue.replace('Stylish', 'Stylus'); - }); - }); -})([...document.querySelectorAll('div[id^="stylish-installed-style-needs-update-"]')]); +})([ + ...document.querySelectorAll('div[id^="stylish-installed-style-not-installed-"]'), + ...document.querySelectorAll('div[id^="stylish-installed-style-needs-update-"]') +]);