install: better USO title bug workaround on page>=2

This commit is contained in:
tophf 2017-09-30 03:13:59 +03:00
parent 7cf27601ae
commit 869168f727

View File

@ -114,7 +114,7 @@ new MutationObserver((mutations, observer) => {
if (document.body) {
observer.disconnect();
// TODO: remove the following statement when USO pagination title is fixed
document.title = document.title.replace(/^\d+&category=/, '');
document.title = document.title.replace(/^(\d+)&\w+=/, '#$1: ');
chrome.runtime.sendMessage({
method: 'getStyles',
url: getMeta('stylish-id-url') || location.href