new fix for #12

This commit is contained in:
Jeremy Schomery 2017-02-03 16:26:11 +03:30
parent 07ec84313c
commit bbfc9bbbd6

View File

@ -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-"]')]);