From bbfc9bbbd6d07a6e9d249df90c2cac4fb05f1845 Mon Sep 17 00:00:00 2001 From: Jeremy Schomery Date: Fri, 3 Feb 2017 16:26:11 +0330 Subject: [PATCH] new fix for #12 --- install.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.js b/install.js index f4aeb89f..15b865ac 100644 --- a/install.js +++ b/install.js @@ -138,11 +138,15 @@ function getResource(url, callback) { /* stylish to stylus; https://github.com/schomery/stylish-chrome/issues/12 */ (function (es) { es.forEach(e => { - e.textContent = 'Install with Stylus'; + [...e.childNodes].filter(n => n.nodeType == 3).forEach(n => { + n.nodeValue = n.nodeValue.replace('Stylish', 'Stylus'); + }); }); })([...document.querySelectorAll('div[id^="stylish-installed-style-not-installed-"]')]); (function (es) { es.forEach(e => { - e.textContent = 'Update with Stylus'; + [...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-"]')]);