From 050109428c1f7c200b93474d3097597b036ebfb4 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 17 Jun 2017 14:55:34 +0300 Subject: [PATCH] USO bug workaround: generalize getStyleURL() --- install.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.js b/install.js index b4738c2b..f62af69f 100644 --- a/install.js +++ b/install.js @@ -129,10 +129,11 @@ new MutationObserver((mutations, observer) => { function getStyleURL () { const url = getMeta('stylish-code-chrome'); // TODO: remove when USO is fixed - if (FIREFOX || OPERA || VIVALDI || CHROMIUM) { + const directUrl = getMeta('stylish-update-url'); + if (directUrl.includes('?') && !url.includes('?')) { /* get custom settings from the update url */ return Object.assign(new URL(url), { - search: (new URL(getMeta('stylish-update-url'))).search + search: (new URL(directUrl)).search }).href; } return url;