Quellcode durchsuchen

fix support of Vivaldi and Opera

Gildas vor 3 Jahren
Ursprung
Commit
4ce025111c
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 0 0
      lib/single-file-extension-background.js
  2. 2 2
      src/core/bg/config.js
  3. 1 1
      src/ui/bg/ui-editor.js

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
lib/single-file-extension-background.js


+ 2 - 2
src/core/bg/config.js

@@ -31,8 +31,8 @@ const DEFAULT_PROFILE_NAME = "__Default_Settings__";
 const DISABLED_PROFILE_NAME = "__Disabled_Settings__";
 const REGEXP_RULE_PREFIX = "regexp:";
 
-const IS_NOT_SAFARI = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent);
-const BACKGROUND_SAVE_SUPPORTED = !(/Mobile.*Firefox/.test(navigator.userAgent) || /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent));
+const IS_NOT_SAFARI = !/Safari/.test(navigator.userAgent) || /Chrome/.test(navigator.userAgent) || /Vivaldi/.test(navigator.userAgent) || /OPR/.test(navigator.userAgent);
+const BACKGROUND_SAVE_SUPPORTED = !(/Mobile.*Firefox/.test(navigator.userAgent) || /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/Vivaldi/.test(navigator.userAgent) && !/OPR/.test(navigator.userAgent));
 const BADGE_COLOR_SUPPORTED = IS_NOT_SAFARI;
 const AUTO_SAVE_SUPPORTED = IS_NOT_SAFARI;
 const SELECTABLE_TABS_SUPPORTED = IS_NOT_SAFARI;

+ 1 - 1
src/ui/bg/ui-editor.js

@@ -26,7 +26,7 @@
 import * as download from "../../core/common/download.js";
 import { onError } from "./../common/content-error.js";
 
-const FOREGROUND_SAVE = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);
+const FOREGROUND_SAVE = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/Vivaldi/.test(navigator.userAgent) && !/OPR/.test(navigator.userAgent);
 
 const editorElement = document.querySelector(".editor");
 const toolbarElement = document.querySelector(".toolbar");

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.