Help buggy USO support Linux Chromium

This commit is contained in:
tophf 2017-06-14 00:20:35 +03:00
parent 218c6adfa0
commit 90275ae47a

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
const CHROMIUM = /Chromium/.test(navigator.userAgent); // non-Windows Chromium
const FIREFOX = /Firefox/.test(navigator.userAgent); const FIREFOX = /Firefox/.test(navigator.userAgent);
const VIVALDI = /Vivaldi/.test(navigator.userAgent); const VIVALDI = /Vivaldi/.test(navigator.userAgent);
const OPERA = /OPR/.test(navigator.userAgent); const OPERA = /OPR/.test(navigator.userAgent);
@ -127,8 +128,8 @@ new MutationObserver((mutations, observer) => {
*/ */
function getStyleURL () { function getStyleURL () {
const url = getMeta('stylish-code-chrome'); const url = getMeta('stylish-code-chrome');
// TODO: remove when USO is fixed
if (FIREFOX || OPERA || VIVALDI) { if (FIREFOX || OPERA || VIVALDI || CHROMIUM) {
/* get custom settings from the update url */ /* get custom settings from the update url */
return Object.assign(new URL(url), { return Object.assign(new URL(url), {
search: (new URL(getMeta('stylish-update-url'))).search search: (new URL(getMeta('stylish-update-url'))).search