Fix USO install button
Narcolepticinsomniac worked out the code
This commit is contained in:
parent
9c8970309d
commit
dd20acd784
|
@ -456,3 +456,15 @@ if (location.search.includes('category=')) {
|
||||||
}).observe(document, {childList: true, subtree: true});
|
}).observe(document, {childList: true, subtree: true});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (/^https?:\/\/userstyles\.org\/styles\/\d{3,}/.test(location.href)) {
|
||||||
|
new MutationObserver((_, observer) => {
|
||||||
|
const cssButton = document.getElementsByClassName('css_button');
|
||||||
|
if (cssButton.length) {
|
||||||
|
// Click on the "Show CSS Code" button to workaround the JS error
|
||||||
|
cssButton[0].click();
|
||||||
|
cssButton[0].click();
|
||||||
|
observer.disconnect();
|
||||||
|
}
|
||||||
|
}).observe(document, {childList: true, subtree: true});
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user