From 28e9e38dad48dfecf359d633ada3edb3a9b03a2a Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 2 Jan 2018 21:26:44 +0300 Subject: [PATCH] remove 'dysfunctional' page --- _locales/cs/messages.json | 10 +--------- _locales/de/messages.json | 10 +--------- _locales/en/messages.json | 8 -------- _locales/es/messages.json | 10 +--------- _locales/et/messages.json | 10 +--------- _locales/hu/messages.json | 10 +--------- _locales/it/messages.json | 10 +--------- _locales/ja/messages.json | 10 +--------- _locales/pl/messages.json | 10 +--------- _locales/ro/messages.json | 10 +--------- _locales/ru/messages.json | 10 +--------- _locales/zh_CN/messages.json | 10 +--------- _locales/zh_TW/messages.json | 10 +--------- js/dom.js | 9 --------- msgbox/dysfunctional.css | 24 ------------------------ msgbox/dysfunctional.html | 10 ---------- msgbox/dysfunctional.js | 3 --- 17 files changed, 12 insertions(+), 162 deletions(-) delete mode 100644 msgbox/dysfunctional.css delete mode 100644 msgbox/dysfunctional.html delete mode 100644 msgbox/dysfunctional.js diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json index de278a75..40748aa0 100644 --- a/_locales/cs/messages.json +++ b/_locales/cs/messages.json @@ -436,10 +436,6 @@ } } }, - "dysfunctional": { - "message": "Stylus nemůže fungovat v soukromém okně, protože Firefox znemožňuje přímou komunikaci s interní kontextovou stránkou rozšíření na pozadí.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Sekce", "description": "Title for the style sections section" @@ -690,10 +686,6 @@ "message": "Celkový počet stránek", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Známá chyba v této verzi Firefoxu znemožňuje práci rozšíření. Chyba: chrome.extension.getBackgroundPage() nevrací platný výsledek", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Kontrola…", "description": "Text to display when checking a style for an update" @@ -1207,4 +1199,4 @@ "message": "Prázdné @name nahrazuje výchozí šablonu", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/de/messages.json b/_locales/de/messages.json index cab2fa83..2cc456fd 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -452,10 +452,6 @@ } } }, - "dysfunctional": { - "message": "Stylus funktioniert in privaten Fenstern nicht, weil Firefox hier Direktverbindungen zur internen Hintergrundseite der Erweiterung nicht zulässt.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Bereiche", "description": "Title for the style sections section" @@ -710,10 +706,6 @@ "message": "Gesamtzahl der Seiten", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Funktioniert nicht richtig aufgrund eines bekannten Bugs in dieser Version von Firefox: chrome.extension.getBackgroundPage() gibt keinen gültigen Wert zurück", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Suche nach Updates...", "description": "Text to display when checking a style for an update" @@ -1227,4 +1219,4 @@ "message": "Ein leeres @name ersetzt das vorgegebene Template", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 1bfae9ac..1273bf0d 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -198,14 +198,6 @@ "configOnChangeTooltip": { "message": "Autosave and apply changes automatically" }, - "dysfunctional": { - "message": "Stylus cannot function in private windows because Firefox disallows direct connection to the internal background page context of the extension.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, - "dysfunctionalBackgroundConnection": { - "message": "Cannot function properly because of a known bug in this version of Firefox: chrome.extension.getBackgroundPage() doesn't return a valid result", - "description": "Displayed in style manager when unable to connect to the background page" - }, "genericError": { "message": "Error", "description": "Used in various places to indicate some error occurred." diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 022f2228..cbcbb8a6 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -464,10 +464,6 @@ } } }, - "dysfunctional": { - "message": "Stylus no puede funcionar en ventanas privadas porque Firefox no permite conexión directa al contexto de la página de entorno interna de la extensión.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Secciones", "description": "Title for the style sections section" @@ -726,10 +722,6 @@ "message": "Páginas totales", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "No puede funcionar adecuadamente a causa de un fallo conocido en esta versión de Firefox: chrome.extension.getBackgroundPage() no devuelve un resultado válido.", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Buscando...", "description": "Text to display when checking a style for an update" @@ -1255,4 +1247,4 @@ "message": "@name vacío reemplaza la plantilla predeterminada", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/et/messages.json b/_locales/et/messages.json index 899dc8e1..dffb6bb5 100644 --- a/_locales/et/messages.json +++ b/_locales/et/messages.json @@ -432,10 +432,6 @@ } } }, - "dysfunctional": { - "message": "Stylus ei saa privaatsetes akendes töötada, sest Firefox ei luba otseühendust laienduse sisemisele taustalehe kontekstile.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Jaotised", "description": "Title for the style sections section" @@ -674,10 +670,6 @@ "message": "Lehti kokku", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Ei saa korralikult töötada, sest selles Firefoxi versioonis on tuntud viga: chrome.extension.getBackgroundPage() ei tagasta kehtivat tulemit", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Kontrollin...", "description": "Text to display when checking a style for an update" @@ -1183,4 +1175,4 @@ "message": "Tühi @name asendab vaikimisi malli", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json index 9033d2e5..49761b30 100644 --- a/_locales/hu/messages.json +++ b/_locales/hu/messages.json @@ -440,10 +440,6 @@ } } }, - "dysfunctional": { - "message": "A Stylus nem működhet privát ablakokon belül, mert a Firefox nem enged közvetlen kapcsolatot a kiegészítő belső háttéroldal-kontextusával.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Szekciók", "description": "Title for the style sections section" @@ -690,10 +686,6 @@ "message": "Összes oldal", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Nem mőködhet megfelelően egy ebben a verzióban található ismert hiba miatt: chrome.extension.getBackgroundPage() eredménye nem érvényes", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Ellenőrzés...", "description": "Text to display when checking a style for an update" @@ -1199,4 +1191,4 @@ "message": "Az üres @name lecseréli az alapértelmezett sablont", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/it/messages.json b/_locales/it/messages.json index c1ce1050..0170ad61 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -286,10 +286,6 @@ } } }, - "dysfunctional": { - "message": "Stylus non può funzionare in finestre anonime perché Firefox disattiva la connessione diretta al contesto della pagina di background interna dell'estensione.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Sezioni", "description": "Title for the style sections section" @@ -432,10 +428,6 @@ "message": "Aggiornamento completato.", "description": "Text that displays when an update completed" }, - "dysfunctionalBackgroundConnection": { - "message": "Non può funzionare correttamente a causa di un bug conosciuto in questa versione di Firefox: chrome.extension.getBackgroundPage() non restituisce un risultato valido", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Verifica in corso...", "description": "Text to display when checking a style for an update" @@ -706,4 +698,4 @@ "message": "Chiudi", "description": "'Close' button in a confirm dialog" } -} \ No newline at end of file +} diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 2d60d5ec..eab841f3 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -464,10 +464,6 @@ } } }, - "dysfunctional": { - "message": "Stylusはプライベートウィンドウでは機能しません。これは、Firefoxが拡張機能の内部のバックグラウンドページに直接接続することを禁止しているためです。", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "セクション", "description": "Title for the style sections section" @@ -722,10 +718,6 @@ "message": "総ページ数", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "このバージョンのFirefoxの次の既知のバグのために正常に機能しません: chrome.extension.getBackgroundPage() が正しい結果を返しません", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "チェック中...", "description": "Text to display when checking a style for an update" @@ -1255,4 +1247,4 @@ "message": "@name を空にすると、デフォルト・テンプレートを置き換えます", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index a03958ab..c4706d55 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -464,10 +464,6 @@ } } }, - "dysfunctional": { - "message": "Stylus nie może działać w oknach prywatnych, ponieważ Firefox zakazuje bezpośredniego połączenia z kontekstem wewnętrznej strony tła rozszerzenia.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Sekcje", "description": "Title for the style sections section" @@ -726,10 +722,6 @@ "message": "Wszystkie strony", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Nie działa prawidłowo ze względu na znany błąd w tej wersji Firefoksa: chrome.extension.getBackgroundPage() nie zwraca prawidłowego wyniku", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Sprawdzanie...", "description": "Text to display when checking a style for an update" @@ -1267,4 +1259,4 @@ "message": "Puste @name zastępuje szablon domyślny", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/ro/messages.json b/_locales/ro/messages.json index bd8e83e4..7ed2215f 100644 --- a/_locales/ro/messages.json +++ b/_locales/ro/messages.json @@ -424,10 +424,6 @@ } } }, - "dysfunctional": { - "message": "Stylus nu poate funcționa în window-uri private deoarece Firefox nu permite o conexiune directă la conținutul paginii.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Secțiuni", "description": "Title for the style sections section" @@ -674,10 +670,6 @@ "message": "Număr total de pagini", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Funționarea nu este posibilă din cauza unui bug cunoscut în Firefox : chrome.extension.getBackgroundPage() nu returnează o valoare validă", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Verficare...", "description": "Text to display when checking a style for an update" @@ -1163,4 +1155,4 @@ "message": "@name este gol și înlocuiețte valoarea de bază", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index c1539b69..0d26c0a2 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -468,10 +468,6 @@ } } }, - "dysfunctional": { - "message": "Стилус не работает в приватном окне, т.к. браузер Firefox не разрешает прямое соединение с внутренним контекстом фоновой страницы расширения.", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "Разделы", "description": "Title for the style sections section" @@ -730,10 +726,6 @@ "message": "Всего страниц", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "Функционирование невозможно из-за известной ошибки в вашей версии браузера: chrome.extension.getBackgroundPage() возвращает нулевое значение", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "Проверка…", "description": "Text to display when checking a style for an update" @@ -1271,4 +1263,4 @@ "message": "Пустой @name заменяет шаблон по умолчанию", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index bb3fea56..de1efde4 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -468,10 +468,6 @@ } } }, - "dysfunctional": { - "message": "Stylus 无法在隐私窗口下运行,因为 Firefox 不允许直接连接到拓展的内部背景页面上下文", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "部分", "description": "Title for the style sections section" @@ -730,10 +726,6 @@ "message": "总页面", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "由于此版本的 Firefox 有已知的 BUG,所以 chrome.extension.getBackgroundPage() 并不会返回一个有效的结果", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "正在检查更新...", "description": "Text to display when checking a style for an update" @@ -1267,4 +1259,4 @@ "message": "以空的 @name 代替默认模板", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index 2a0090bf..259fec88 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -468,10 +468,6 @@ } } }, - "dysfunctional": { - "message": "Stylus 無法在隱私視窗中運作,因為 Firefox 不允許直接連線到附加元件的內部背景頁面內容。", - "description": "Displayed in Firefox when its settings make Stylus dysfunctional" - }, "styleSectionsTitle": { "message": "樣式段", "description": "Title for the style sections section" @@ -730,10 +726,6 @@ "message": "總頁面", "description": "" }, - "dysfunctionalBackgroundConnection": { - "message": "由於此版本的 Firefox 中有已知的臭蟲,所以無法正常運作:chrome.extension.getBackgroundPage() 並未傳回有效的結果", - "description": "Displayed in style manager when unable to connect to the background page" - }, "checkingForUpdate": { "message": "檢查中…", "description": "Text to display when checking a style for an update" @@ -1267,4 +1259,4 @@ "message": "清空 @name 取代目前範本", "description": "The text shown after @name when creating a new Usercss style" } -} \ No newline at end of file +} diff --git a/js/dom.js b/js/dom.js index 8872df57..ed12aaf1 100644 --- a/js/dom.js +++ b/js/dom.js @@ -62,15 +62,6 @@ onDOMready().then(() => { }); if (!chrome.app && chrome.windows) { - // die if unable to access BG directly - chrome.windows.getCurrent(wnd => { - if (!BG && wnd.incognito && - !location.pathname.includes('popup.html')) { - // private windows can't get bg page - location.href = '/msgbox/dysfunctional.html'; - throw 0; - } - }); // add favicon in Firefox setTimeout(() => { if (!window.prefs) { diff --git a/msgbox/dysfunctional.css b/msgbox/dysfunctional.css deleted file mode 100644 index 1c4e00e7..00000000 --- a/msgbox/dysfunctional.css +++ /dev/null @@ -1,24 +0,0 @@ -html { - height: 100vh; - min-height: 12em; - display: flex; - align-items: center; - justify-content: center; - white-space: pre-wrap; - background-color: #555; - box-sizing: border-box; - border: 2vw solid black; - font-size: 15px; - font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; - hyphens: auto; -} - -body { - margin: 2em; - color: white; - max-width: 20em; -} - -div { - color: antiquewhite; -} diff --git a/msgbox/dysfunctional.html b/msgbox/dysfunctional.html deleted file mode 100644 index 34bd0c37..00000000 --- a/msgbox/dysfunctional.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Stylus - - - - - diff --git a/msgbox/dysfunctional.js b/msgbox/dysfunctional.js deleted file mode 100644 index 7f7ba6b2..00000000 --- a/msgbox/dysfunctional.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -document.body.textContent = chrome.i18n.getMessage('dysfunctional');