diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 8da78de..0000000 --- a/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_size = 4 -indent_style = space -trim_trailing_whitespace = true - -[*.html] -indent_size = 2 - -[LICENSE.txt] -insert_final_newline = false diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 3130ac1..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es6": true, - "webextensions": true - }, - "parserOptions": { - "ecmaVersion": 2019 - }, - "extends": "eslint:recommended", - "rules": { - "no-console": "off", - "indent": [ - "error", - 4 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - }, - "overrides": [ - { - "files": ["test/**"], - "env": { - "mocha": true, - "node": true - } - } - ] -} diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 48db206..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,39 +0,0 @@ - - -## Page URL - - - - -## Image URL - - - - -## Environment - -### OS - - - - -### Chrome Version - - - - -### Extension Version - - - - - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5790367 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +on: + push: + branches: + - master + pull_request: + +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: yarn install --frozen-lockfile + - run: yarn playwright install --with-deps + - run: yarn playwright test diff --git a/.gitignore b/.gitignore index 2a7ce2b..51aff77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -*.zip -*.pem tmp/ dist/ -package-lock.json -yarn.lock node_modules/ +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..544138b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1b6457c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" +} diff --git a/LICENSE.txt b/LICENSE.txt index c3c5bc0..8344e44 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/README.md b/README.md index a8971f1..213c81b 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,55 @@ # View Background Image -Chrome extension that adds "View background image" to the context menu + +Web Extension that adds "View background image" to the context menu ## Installation -[![Available in the Chrome Web Store](https://user-images.githubusercontent.com/1075914/104359656-4698d600-5553-11eb-99d5-2344ac26b544.png)](https://chrome.google.com/webstore/detail/cegndknljaapfbnmfnagomhhgbajjibd) [![Get the add-on for Firefox](https://user-images.githubusercontent.com/1075914/104359743-64663b00-5553-11eb-8842-81c102a08a1a.png)](https://addons.mozilla.org/firefox/addon/view-background-images/) +> [!NOTE] +> The extension requires permission to read and change all your data on all websites for viewing background images. + +[![Available in the Chrome Web Store](https://user-images.githubusercontent.com/1075914/104359656-4698d600-5553-11eb-99d5-2344ac26b544.png)](https://chrome.google.com/webstore/detail/cegndknljaapfbnmfnagomhhgbajjibd) -[Get the add-on for Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/lmpgechcgfhfamgjfcipjjpfjoknpccg) +[![Get the add-on for Firefox](https://user-images.githubusercontent.com/1075914/104359743-64663b00-5553-11eb-8842-81c102a08a1a.png)](https://addons.mozilla.org/firefox/addon/view-background-images/) -This extension requires permission to access your data on all websites only for viewing background images. +[![Get the add-on for Microsoft Edge](https://user-images.githubusercontent.com/29514424/81471744-490d9800-922e-11ea-98fb-bceaf60d9c3d.png)](https://microsoftedge.microsoft.com/addons/detail/lmpgechcgfhfamgjfcipjjpfjoknpccg) ## Usage -1. Install the extension and __reload tabs__. -2. Open the context menu on the image that you want to view. -3. Select `View background image`. -4. The images under the mouse cursor will be displayed in new tabs. +1. **Reload pages** after installing the extension +2. Open the context menu on the images +3. Select "View Background Image" +4. The images will appear in a new tab ## Known Issues -It is technically impossible to view background images: - -* [CSS Paint API](https://developers.google.com/web/updates/2018/01/paintapi?hl=en) -* [Closed Shadow DOM](https://developers.google.com/web/fundamentals/web-components/shadowdom?hl=en#closed) (e.g., [Embedded Tweets](https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/overview.html)) -* Some inline SVGs - +- [CSS Paint API](https://developers.google.com/web/updates/2018/01/paintapi?hl=en) +- [Closed Shadow DOM](https://developers.google.com/web/fundamentals/web-components/shadowdom?hl=en#closed) (e.g., [Embedded Tweets](https://developer.twitter.com/en/docs/twitter-for-websites/embedded-tweets/overview.html)) +- Some inline SVGs ## Contributing ### Translation -I need your help with translating into the language you speak. -1. Fork this repository. -2. Edit `messages.json` in `src/_locales/[localeCode]`. If not exists, create a directory according to the [supported locales](https://developer.chrome.com/webstore/i18n?csw=1#localeTable). -3. Create a new pull request. +I especially need help translating into the language you speak. + +1. Fork this repository +2. Edit `src/_locales/[localeCode]/messages.json` + - If not exists, create a directory according to [the supported locales](https://developer.chrome.com/webstore/i18n?csw=1#localeTable) +3. Create a new pull request + +### Donation + +Your support will help me continue to develop and improve the extension. + +> [!IMPORTANT] +> I've received many emails offering to buy the extension. If I accept them, it will be modified to collect your personal information. That's why your donation matters. + +[Donate](https://foooomio.net/extensions/donation) ## License + This software is released under the [MIT License](https://github.com/foooomio/view-background-image/blob/master/LICENSE.txt). ## Author -foooomio - [@foooomio](https://twitter.com/foooomio) + +foooomio - [foooomio.net](https://foooomio.net) diff --git a/build.sh b/build.sh index 027b4ab..919b465 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ set -eux NAME="view-background-image" -VERSION=$(jq -r .version src/manifest.json) +VERSION="$(jq -r .version src/manifest.json)" mkdir -p dist rm dist/*.zip @@ -13,4 +13,8 @@ zip -r "dist/${NAME}-${VERSION}-chrome.zip" src -x "*.DS_Store" # for Firefox cd src +sed -i -e 's/"service_worker": "background.js"/"scripts": \["background.js"\]/' manifest.json + zip -r "../dist/${NAME}-${VERSION}-firefox.zip" * -x "*.DS_Store" + +sed -i -e 's/"scripts": \["background.js"\]/"service_worker": "background.js"/' manifest.json diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..7cb5f45 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "strict": true, + "checkJs": true + }, + "typeAcquisition": { + "include": ["chrome"] + }, + "include": ["src/**/*.js", "tests/**/*.js"], + "exclude": ["node_modules"] +} diff --git a/package.json b/package.json index 0b5601c..18e2ff5 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,19 @@ { - "name": "view-background-image", - "version": "0.0.0", - "scripts": { - "build": "./build.sh", - "lint": "eslint . && editorconfig-checker", - "test": "mocha" - }, - "private": true, - "license": "MIT", - "devDependencies": { - "@types/chrome": "*", - "editorconfig-checker": "*", - "eslint": "*", - "mocha": "*", - "puppeteer-core": "*" - } + "name": "view-background-image", + "version": "0.0.0", + "type": "module", + "license": "MIT", + "private": true, + "scripts": { + "test": "playwright test", + "format": "prettier --write .", + "format-check": "prettier --check ." + }, + "devDependencies": { + "@playwright/test": "^1.44.1", + "@types/chrome": "^0.0.268", + "@types/node": "^20.12.12", + "prettier": "^3.2.5", + "typescript": "^5.4.5" + } } diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 0000000..b2be5d0 --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,20 @@ +import { defineConfig, devices } from '@playwright/test'; + +export default defineConfig({ + testDir: './tests', + fullyParallel: true, + forbidOnly: !!process.env.CI, + retries: process.env.CI ? 2 : 0, + workers: process.env.CI ? 1 : undefined, + reporter: process.env.CI ? 'github' : 'list', + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] }, + }, + { + name: 'firefox', + use: { ...devices['Desktop Firefox'] }, + }, + ], +}); diff --git a/src/_locales/am/messages.json b/src/_locales/am/messages.json index fbc572b..c4908f1 100644 --- a/src/_locales/am/messages.json +++ b/src/_locales/am/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "የበስተጀርባ ምስልን ይመልከቱ" - }, - "extDescription": { - "message": "በአውድ ምናሌው ውስጥ \"የበስተጀርባ ምስልን ይመልከቱ\"" - }, - "title": { - "message": "የበስተጀርባ ምስልን ይመልከቱ" - }, - "security": { - "message": "ለደህንነት ሲባል ቅጥያው በዚህ ገጽ ላይ አይሰራም።" - }, - "reload": { - "message": "እባክዎ ትሩን እንደገና ይጫኑት።" - }, - "failure": { - "message": "የበስተጀርባውን ምስል ማግኘት አልተሳካም።\nችግር ሪፖርት ያድርጉ?" - } + "extName": { + "message": "የበስተጀርባ ምስል ይመልከቱ" + }, + "extDescription": { + "message": "ወደ አውድ ምናሌው «የበስተጀርባ ምስል ይመልከቱ» ያክላል።" + }, + "review": { + "message": "ግምገማ" + }, + "donation": { + "message": "ልገሳ" + }, + "security": { + "message": "ቅጥያው በልዩ ገጾች ላይ እንዲሠራ አይፈቀድለትም።" + }, + "reload": { + "message": "ቅጥያውን ከጫኑ ወይም ካዘመኑ በኋላ ገጾችን እንደገና ይጫኑ።" + }, + "failure": { + "message": "የበስተጀርባ ምስሎችን ማየት አልተቻለም" + }, + "report": { + "message": "ችግር ሪፖርት ያድርጉ?" + } } diff --git a/src/_locales/bg/messages.json b/src/_locales/bg/messages.json index 9f966d4..651075c 100644 --- a/src/_locales/bg/messages.json +++ b/src/_locales/bg/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Преглед на фоновото изображение" - }, - "extDescription": { - "message": "\"Преглед на фоновото изображение\" в контекстното меню." - }, - "title": { - "message": "Преглед на фоновото изображение" - }, - "security": { - "message": "Разширението не работи на тази страница от съображения за сигурност." - }, - "reload": { - "message": "Моля, презаредете раздела." - }, - "failure": { - "message": "Неуспешно получаване на фоновото изображение.\nДа докладвате за проблем?" - } + "extName": { + "message": "Преглед на фоново изображение" + }, + "extDescription": { + "message": "Добавя „Преглед на фоново изображение“ към контекстното меню." + }, + "review": { + "message": "Преглед" + }, + "donation": { + "message": "Дарение" + }, + "security": { + "message": "Разширението не може да се изпълнява на специални страници." + }, + "reload": { + "message": "Презаредете страниците след инсталиране или актуализиране на разширението." + }, + "failure": { + "message": "Не могат да се видят фонови изображения" + }, + "report": { + "message": "Да докладвате за проблем?" + } } diff --git a/src/_locales/bn/messages.json b/src/_locales/bn/messages.json index c501add..bc7ed86 100644 --- a/src/_locales/bn/messages.json +++ b/src/_locales/bn/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "পটভূমির ছবি প্রদর্শন" - }, - "extDescription": { - "message": "প্রসঙ্গ মেনুতে \"পটভূমির ছবি প্রদর্শন\"।" - }, - "title": { - "message": "পটভূমির ছবি প্রদর্শন" - }, - "security": { - "message": "সুরক্ষা কারণে এই পৃষ্ঠায় এক্সটেনশন কাজ করে না।" - }, - "reload": { - "message": "দয়া করে ট্যাবটি পুনরায় লোড করুন।" - }, - "failure": { - "message": "পটভূমি চিত্র পেতে ব্যর্থ।\nএকটি সমস্যা রিপোর্ট?" - } + "extName": { + "message": "ভিউ ব্যাকগ্রাউন্ড ইমেজ" + }, + "extDescription": { + "message": "প্রসঙ্গ মেনুতে “ভিউ ব্যাকগ্রাউন্ড ইমেজ” যোগ করে।" + }, + "review": { + "message": "পুনঃমূল্যায়ন" + }, + "donation": { + "message": "দান" + }, + "security": { + "message": "এক্সটেনশনটি বিশেষ পৃষ্ঠাগুলিতে চালানোর অনুমতি নেই৷" + }, + "reload": { + "message": "এক্সটেনশন ইনস্টল বা আপডেট করার পরে পৃষ্ঠাগুলি পুনরায় লোড করুন।" + }, + "failure": { + "message": "ব্যাকগ্রাউন্ডের ছবি দেখা যাবে না" + }, + "report": { + "message": "একটি সমস্যা রিপোর্ট?" + } } diff --git a/src/_locales/ca/messages.json b/src/_locales/ca/messages.json index d830f5e..8715cfe 100644 --- a/src/_locales/ca/messages.json +++ b/src/_locales/ca/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Visualitza la imatge de fons" - }, - "extDescription": { - "message": "\"Visualitza la imatge de fons\" al menú contextual." - }, - "title": { - "message": "Visualitza la imatge de fons" - }, - "security": { - "message": "L’extensió no funciona en aquesta pàgina per motius de seguretat." - }, - "reload": { - "message": "Torneu a carregar la pestanya." - }, - "failure": { - "message": "No s'ha pogut obtenir la imatge de fons.\nInformar d’un problema?" - } + "extName": { + "message": "Visualitza la imatge de fons" + }, + "extDescription": { + "message": "Afegeix «Visualitza la imatge de fons» al menú contextual." + }, + "review": { + "message": "Revisió" + }, + "donation": { + "message": "Donació" + }, + "security": { + "message": "L'extensió no es pot executar en pàgines especials." + }, + "reload": { + "message": "Torneu a carregar les pàgines després d'instal·lar o actualitzar l'extensió." + }, + "failure": { + "message": "No es poden veure imatges de fons" + }, + "report": { + "message": "Informar d'un problema?" + } } diff --git a/src/_locales/cs/messages.json b/src/_locales/cs/messages.json index ef334a4..5308a31 100644 --- a/src/_locales/cs/messages.json +++ b/src/_locales/cs/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Zobrazit obrázek na pozadí" - }, - "extDescription": { - "message": "\"Zobrazit obrázek na pozadí\" v místní nabídce." - }, - "title": { - "message": "Zobrazit obrázek na pozadí" - }, - "security": { - "message": "Rozšíření na této stránce nefunguje z bezpečnostních důvodů." - }, - "reload": { - "message": "Znovu načtěte kartu." - }, - "failure": { - "message": "Nepodařilo se získat obrázek na pozadí.\nNahlásit problém?" - } + "extName": { + "message": "Zobrazit obrázek na pozadí" + }, + "extDescription": { + "message": "Přidá „Zobrazit obrázek na pozadí“ do kontextové nabídky." + }, + "review": { + "message": "Posouzení" + }, + "donation": { + "message": "Dar" + }, + "security": { + "message": "Rozšíření není povoleno spouštět na speciálních stránkách." + }, + "reload": { + "message": "Po instalaci nebo aktualizaci rozšíření znovu načtěte stránku." + }, + "failure": { + "message": "Nelze zobrazit obrázky na pozadí" + }, + "report": { + "message": "Nahlásit problém?" + } } diff --git a/src/_locales/da/messages.json b/src/_locales/da/messages.json index d177a10..b9882b6 100644 --- a/src/_locales/da/messages.json +++ b/src/_locales/da/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Vis baggrundsbillede" - }, - "extDescription": { - "message": "\"Vis baggrundsbillede\" i kontekstmenuen." - }, - "title": { - "message": "Vis baggrundsbillede" - }, - "security": { - "message": "Udvidelsen fungerer ikke på denne side af sikkerhedsmæssige årsager." - }, - "reload": { - "message": "Venligst genindlæs fanen." - }, - "failure": { - "message": "Kunne ikke få baggrundsbilledet.\nRapportér et problem?" - } + "extName": { + "message": "Vis baggrundsbillede" + }, + "extDescription": { + "message": "Tilføjer »Vis baggrundsbillede« til kontekstmenuen." + }, + "review": { + "message": "Anmeldelse" + }, + "donation": { + "message": "Donation" + }, + "security": { + "message": "Udvidelsen må ikke køre på særlige sider." + }, + "reload": { + "message": "Genindlæs sider efter installation eller opdatering af udvidelsen." + }, + "failure": { + "message": "Kan ikke se baggrundsbilleder" + }, + "report": { + "message": "Rapporter et problem?" + } } diff --git a/src/_locales/de/messages.json b/src/_locales/de/messages.json index 965c950..d2e5d88 100644 --- a/src/_locales/de/messages.json +++ b/src/_locales/de/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Hintergrundbild anzeigen" - }, - "extDescription": { - "message": "\"Hintergrundbild anzeigen\" im Kontextmenü." - }, - "title": { - "message": "Hintergrundbild anzeigen" - }, - "security": { - "message": "Aus Sicherheitsgründen funktioniert die Erweiterung auf dieser Seite nicht." - }, - "reload": { - "message": "Bitte lade den Tab neu." - }, - "failure": { - "message": "Das Hintergrundbild konnte nicht abgerufen werden.\nEin Problem melden?" - } + "extName": { + "message": "Hintergrundbild anzeigen" + }, + "extDescription": { + "message": "Fügt „Hintergrundbild anzeigen“ zum Kontextmenü hinzu." + }, + "review": { + "message": "Rezension" + }, + "donation": { + "message": "Spende" + }, + "security": { + "message": "ADie Erweiterung darf nicht auf speziellen Seiten ausgeführt werden." + }, + "reload": { + "message": "Laden Sie die Seiten nach der Installation oder Aktualisierung der Erweiterung neu." + }, + "failure": { + "message": "Das Hintergrundbild konnte nicht abgerufen werden" + }, + "report": { + "message": "Ein Problem melden?" + } } diff --git a/src/_locales/el/messages.json b/src/_locales/el/messages.json index 7628030..3203583 100644 --- a/src/_locales/el/messages.json +++ b/src/_locales/el/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Προβολή εικόνας παρασκηνίου" - }, - "extDescription": { - "message": "\"Προβολή εικόνας παρασκηνίου\" στο μενού περιβάλλοντος." - }, - "title": { - "message": "Προβολή εικόνας παρασκηνίου" - }, - "security": { - "message": "Η επέκταση δεν λειτουργεί σε αυτήν τη σελίδα για λόγους ασφαλείας." - }, - "reload": { - "message": "Φορτώστε ξανά την καρτέλα." - }, - "failure": { - "message": "Αποτυχία λήψης της εικόνας φόντου.\nΑναφέρετε ένα πρόβλημα?" - } + "extName": { + "message": "Προβολή εικόνας φόντου" + }, + "extDescription": { + "message": "Προσθέτει «Προβολή εικόνας φόντου» στο μενού περιβάλλοντος." + }, + "review": { + "message": "Ανασκόπηση" + }, + "donation": { + "message": "Δωρεά" + }, + "security": { + "message": "Η επέκταση δεν επιτρέπεται να εκτελείται σε ειδικές σελίδες." + }, + "reload": { + "message": "Επαναλάβετε τη φόρτωση σελίδων μετά την εγκατάσταση ή την ενημέρωση της επέκτασης." + }, + "failure": { + "message": "Δεν είναι δυνατή η προβολή εικόνων φόντου" + }, + "report": { + "message": "Αναφέρετε ένα πρόβλημα?" + } } diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 63e1167..73a62c9 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "View Background Image" - }, - "extDescription": { - "message": "\"View Background Image\" in context menu." - }, - "title": { - "message": "View Background Image" - }, - "security": { - "message": "The extension does not work on this page for security reasons." - }, - "reload": { - "message": "Please reload the tab." - }, - "failure": { - "message": "Failed to get the background image.\nReport an issue?" - } + "extName": { + "message": "View Background Image" + }, + "extDescription": { + "message": "Adds “View Background Image” to the context menu." + }, + "review": { + "message": "Review" + }, + "donation": { + "message": "Donation" + }, + "security": { + "message": "The extension is not allowed to run on special pages." + }, + "reload": { + "message": "Reload pages after installing or updating the extension." + }, + "failure": { + "message": "Cannot view background images" + }, + "report": { + "message": "Report a problem?" + } } diff --git a/src/_locales/es/messages.json b/src/_locales/es/messages.json index a1b867e..f1818ca 100644 --- a/src/_locales/es/messages.json +++ b/src/_locales/es/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Ver imagen de fondo" - }, - "extDescription": { - "message": "\"Ver imagen de fondo\" en el menú contextual." - }, - "title": { - "message": "Ver imagen de fondo" - }, - "security": { - "message": "La extensión no funciona en esta página por razones de seguridad." - }, - "reload": { - "message": "Por favor, vuelva a cargar la pestaña." - }, - "failure": { - "message": "Error al obtener la imagen de fondo.\n¿Reportar un problema?" - } + "extName": { + "message": "Ver imagen de fondo" + }, + "extDescription": { + "message": "Agrega «Ver imagen de fondo» al menú contextual." + }, + "review": { + "message": "Revisar" + }, + "donation": { + "message": "Donación" + }, + "security": { + "message": "La extensión no puede ejecutarse en páginas especiales." + }, + "reload": { + "message": "Vuelva a cargar la página después de instalar o actualizar la extensión." + }, + "failure": { + "message": "No se puede mostrar la imagen de fondo" + }, + "report": { + "message": "¿Reportar un problema?" + } } diff --git a/src/_locales/es_419/messages.json b/src/_locales/es_419/messages.json new file mode 100644 index 0000000..ad06a27 --- /dev/null +++ b/src/_locales/es_419/messages.json @@ -0,0 +1,26 @@ +{ + "extName": { + "message": "Ver imagen de fondo" + }, + "extDescription": { + "message": "Agrega “Ver imagen de fondo” al menú contextual." + }, + "review": { + "message": "Revisar" + }, + "donation": { + "message": "Donación" + }, + "security": { + "message": "La extensión no puede ejecutarse en páginas especiales." + }, + "reload": { + "message": "Vuelva a cargar la página después de instalar o actualizar la extensión." + }, + "failure": { + "message": "No se puede mostrar la imagen de fondo" + }, + "report": { + "message": "¿Reportar un problema?" + } +} diff --git a/src/_locales/et/messages.json b/src/_locales/et/messages.json index e3a0bd1..6e3a454 100644 --- a/src/_locales/et/messages.json +++ b/src/_locales/et/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Vaata taustapilti" - }, - "extDescription": { - "message": "\"Vaata taustapilti\" kontekstimenüüs." - }, - "title": { - "message": "Vaata taustapilti" - }, - "security": { - "message": "Laiendus sellel lehel turvalisuse huvides ei tööta." - }, - "reload": { - "message": "Laadige vaheleht uuesti." - }, - "failure": { - "message": "Taustapildi hankimine ebaõnnestus.\nKas teatada probleemist?" - } + "extName": { + "message": "Vaata taustapilti" + }, + "extDescription": { + "message": "Lisab kontekstmenüüsse „Vaata taustapilti“." + }, + "review": { + "message": "Ülevaade" + }, + "donation": { + "message": "Annetus" + }, + "security": { + "message": "Laiendusi ei ole lubatud erilehtedel töötada." + }, + "reload": { + "message": "Pärast laienduse paigaldamist ja uuendamist laadige leht uuesti." + }, + "failure": { + "message": "Taustapilti ei saa kuvada" + }, + "report": { + "message": "Kas teatada probleemist?" + } } diff --git a/src/_locales/fi/messages.json b/src/_locales/fi/messages.json index 51555c0..41ffb60 100644 --- a/src/_locales/fi/messages.json +++ b/src/_locales/fi/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Näytä taustakuva" - }, - "extDescription": { - "message": "\"Näytä taustakuva\" in contextmenu." - }, - "title": { - "message": "Näytä taustakuva" - }, - "security": { - "message": "Laajennus ei toimi tällä sivulla turvallisuussyistä." - }, - "reload": { - "message": "Lataa uudelleen välilehti." - }, - "failure": { - "message": "Taustakuvan saaminen epäonnistui.\nIlmoita ongelma?" - } + "extName": { + "message": "Näytä taustakuva" + }, + "extDescription": { + "message": "Lisää ”Näytä taustakuva” kontekstivalikkoon." + }, + "review": { + "message": "Arvostelu" + }, + "donation": { + "message": "Lahjoitus" + }, + "security": { + "message": "Laajennuksia ei saa käyttää erikoissivuilla." + }, + "reload": { + "message": "Lataa sivut uudelleen laajennuksen asentamisen tai päivityksen jälkeen." + }, + "failure": { + "message": "Taustakuvia ei voi katsella" + }, + "report": { + "message": "Ilmoita ongelma?" + } } diff --git a/src/_locales/fil/messages.json b/src/_locales/fil/messages.json index 3f6f1bf..5915ac0 100644 --- a/src/_locales/fil/messages.json +++ b/src/_locales/fil/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Ipakita ang Background Image" - }, - "extDescription": { - "message": "\"Ipakita ang Background Image\" sa menu ng konteksto." - }, - "title": { - "message": "Ipakita ang Background Image" - }, - "security": { - "message": "Ang extension ay hindi gumagana sa pahinang ito para sa mga kadahilanang pangseguridad." - }, - "reload": { - "message": "Mangyaring i-reload ang tab." - }, - "failure": { - "message": "Nabigong makuha ang imahe sa background.\nMag-ulat ng isang isyu?" - } + "extName": { + "message": "Tingnan ang Larawan sa Background" + }, + "extDescription": { + "message": "Nagdaragdag ng “Tingnan ang Larawan sa Background” sa menu ng konteksto." + }, + "review": { + "message": "Pagsusuri" + }, + "donation": { + "message": "Donasyon" + }, + "security": { + "message": "Ang extension ay hindi pinapayagang tumakbo sa mga espesyal na pahina." + }, + "reload": { + "message": "I-reload ang mga page pagkatapos i-install o i-update ang extension." + }, + "failure": { + "message": "Hindi matingnan ang mga larawan sa background" + }, + "report": { + "message": "Mag-ulat ng isang isyu?" + } } diff --git a/src/_locales/fr/messages.json b/src/_locales/fr/messages.json index 3ea9102..1551a30 100644 --- a/src/_locales/fr/messages.json +++ b/src/_locales/fr/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Afficher l'image de fond" - }, - "extDescription": { - "message": "\"Afficher l'image de fond\" dans le menu contextuel." - }, - "title": { - "message": "Afficher l'image de fond" - }, - "security": { - "message": "L'extension ne fonctionne pas sur cette page pour des raisons de sécurité." - }, - "reload": { - "message": "Veuillez recharger l'onglet." - }, - "failure": { - "message": "Impossible d'obtenir l'image de fond.\nSignaler un problème?" - } + "extName": { + "message": "Afficher l'image de fond" + }, + "extDescription": { + "message": "Ajoute « Afficher l'image de fond » au menu contextuel." + }, + "review": { + "message": "Revoir" + }, + "donation": { + "message": "Don" + }, + "security": { + "message": "L'extension n'est pas autorisée à s'exécuter sur des pages spéciales." + }, + "reload": { + "message": "Rechargez les pages après l'installation ou la mise à jour de l'extension." + }, + "failure": { + "message": "Impossible d'afficher l'image de fond" + }, + "report": { + "message": "Signaler un problème?" + } } diff --git a/src/_locales/gu/messages.json b/src/_locales/gu/messages.json index 3b706e8..9398e31 100644 --- a/src/_locales/gu/messages.json +++ b/src/_locales/gu/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "પાશ્વ ભાગ ચિત્ર જુઓ" - }, - "extDescription": { - "message": "સંદર્ભ મેનૂમાં \"પાશ્વ ભાગ ચિત્ર જુઓ\"." - }, - "title": { - "message": "પાશ્વ ભાગ ચિત્ર જુઓ" - }, - "security": { - "message": "સુરક્ષા કારણોસર આ પૃષ્ઠ પર એક્સ્ટેંશન કામ કરતું નથી." - }, - "reload": { - "message": "કૃપા કરીને ટ .બ ફરીથી લોડ કરો." - }, - "failure": { - "message": "પૃષ્ઠભૂમિ છબી મેળવવામાં નિષ્ફળ.\nકોઈ મુદ્દાની જાણ કરો?" - } + "extName": { + "message": "જુઓ પૃષ્ઠભૂમિ છબી" + }, + "extDescription": { + "message": "સંદર્ભ મેનૂમાં “જુઓ પૃષ્ઠભૂમિ છબી” ઉમેરે છે." + }, + "review": { + "message": "સમીક્ષા" + }, + "donation": { + "message": "દાન" + }, + "security": { + "message": "એક્સ્ટેંશનને વિશિષ્ટ પૃષ્ઠો પર ચલાવવાની મંજૂરી નથી." + }, + "reload": { + "message": "એક્સ્ટેંશન ઇન્સ્ટોલ અથવા અપડેટ કર્યા પછી પૃષ્ઠોને ફરીથી લોડ કરો." + }, + "failure": { + "message": "પૃષ્ઠભૂમિ છબીઓ જોઈ શકતા નથી" + }, + "report": { + "message": "કોઈ મુદ્દાની જાણ કરો?" + } } diff --git a/src/_locales/hi/messages.json b/src/_locales/hi/messages.json index 4e2c4c4..dbd7c45 100644 --- a/src/_locales/hi/messages.json +++ b/src/_locales/hi/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "पृष्ठभूमि छवि देखें" - }, - "extDescription": { - "message": "संदर्भ मेनू में \"पृष्ठभूमि छवि देखें\"।" - }, - "title": { - "message": "पृष्ठभूमि छवि देखें" - }, - "security": { - "message": "एक्सटेंशन सुरक्षा कारणों से इस पृष्ठ पर काम नहीं करता है।" - }, - "reload": { - "message": "कृपया टैब पुनः लोड करें।" - }, - "failure": { - "message": "पृष्ठभूमि छवि प्राप्त करने में विफल।\nमामले की रिपोर्ट करें?" - } + "extName": { + "message": "पृष्ठभूमि छवि देखें" + }, + "extDescription": { + "message": "संदर्भ मेनू में “पृष्ठभूमि छवि देखें” जोड़ता है।" + }, + "review": { + "message": "समीक्षा" + }, + "donation": { + "message": "दान" + }, + "security": { + "message": "एक्सटेंशन को विशेष पृष्ठों पर चलाने की अनुमति नहीं है." + }, + "reload": { + "message": "एक्सटेंशन इंस्टॉल या अपडेट करने के बाद पृष्ठों को पुनः लोड करें।" + }, + "failure": { + "message": "पृष्ठभूमि छवियाँ नहीं देख सकते" + }, + "report": { + "message": "मामले की रिपोर्ट करें?" + } } diff --git a/src/_locales/hr/messages.json b/src/_locales/hr/messages.json index 70be3ce..180665d 100644 --- a/src/_locales/hr/messages.json +++ b/src/_locales/hr/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Pogledaj pozadinsku sliku" - }, - "extDescription": { - "message": "\"Pogledaj pozadinsku sliku\" u kontekstnom izborniku." - }, - "title": { - "message": "Pogledaj pozadinsku sliku" - }, - "security": { - "message": "Proširenje ne funkcionira na ovoj stranici iz sigurnosnih razloga." - }, - "reload": { - "message": "Ponovno umetnite karticu." - }, - "failure": { - "message": "Nije moguće dobiti pozadinsku sliku.\nPrijaviti problem?" - } + "extName": { + "message": "Pogledaj pozadinsku sliku" + }, + "extDescription": { + "message": "Dodaje „Pogledaj pozadinsku sliku“ u kontekstni izbornik." + }, + "review": { + "message": "Pregled" + }, + "donation": { + "message": "Donacija" + }, + "security": { + "message": "Ekstenzija se ne smije izvoditi na posebnim stranicama." + }, + "reload": { + "message": "Ponovno učitavanje stranica nakon instaliranja ili ažuriranja proširenja." + }, + "failure": { + "message": "Nije moguće vidjeti pozadinsku sliku" + }, + "report": { + "message": "Prijaviti problem?" + } } diff --git a/src/_locales/hu/messages.json b/src/_locales/hu/messages.json index ba8a896..b9c8658 100644 --- a/src/_locales/hu/messages.json +++ b/src/_locales/hu/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Háttérkép megjelenítése" - }, - "extDescription": { - "message": "\"Háttérkép megjelenítése\" a helyi menüben." - }, - "title": { - "message": "Háttérkép megjelenítése" - }, - "security": { - "message": "A kiterjesztés biztonsági okokból ezen az oldalon nem működik." - }, - "reload": { - "message": "Töltse újra a fület." - }, - "failure": { - "message": "A háttérkép beolvasása nem sikerült.\nHibabejelentés?" - } + "extName": { + "message": "Háttérkép megjelenítése" + }, + "extDescription": { + "message": "Hozzáadja a „Háttérkép megtekintése” elemet a helyi menühöz." + }, + "review": { + "message": "Felülvizsgálat" + }, + "donation": { + "message": "Adomány" + }, + "security": { + "message": "A bővítmény nem futhat speciális oldalakon." + }, + "reload": { + "message": "A bővítmény telepítése vagy frissítése után töltse be újra az oldalakat." + }, + "failure": { + "message": "Nem lehet megtekinteni a háttérképeket" + }, + "report": { + "message": "Hibabejelentés?" + } } diff --git a/src/_locales/id/messages.json b/src/_locales/id/messages.json index 7d05d4a..e53b673 100644 --- a/src/_locales/id/messages.json +++ b/src/_locales/id/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Lihat Gambar Latar Belakang" - }, - "extDescription": { - "message": "\"Lihat Gambar Latar Belakang\" di menu konteks." - }, - "title": { - "message": "Lihat Gambar Latar Belakang" - }, - "security": { - "message": "Ekstensi tidak berfungsi di halaman ini karena alasan keamanan." - }, - "reload": { - "message": "Harap muat kembali tab." - }, - "failure": { - "message": "Gagal mendapatkan gambar latar belakang.\nLaporkan masalah?" - } + "extName": { + "message": "Lihat Gambar Latar Belakang" + }, + "extDescription": { + "message": "Menambahkan “Lihat Gambar Latar Belakang” ke menu konteks." + }, + "review": { + "message": "Tinjauan" + }, + "donation": { + "message": "Sumbangan" + }, + "security": { + "message": "Ekstensi tidak diperbolehkan berjalan pada halaman khusus." + }, + "reload": { + "message": "Muat ulang halaman setelah menginstal atau memperbarui ekstensi." + }, + "failure": { + "message": "Tidak dapat melihat gambar latar belakang" + }, + "report": { + "message": "Laporkan masalah?" + } } diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json index d5f3110..418fa92 100644 --- a/src/_locales/it/messages.json +++ b/src/_locales/it/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Visualizza immagine di sfondo" - }, - "extDescription": { - "message": "\"Visualizza immagine di sfondo\" nel menu contestuale." - }, - "title": { - "message": "Visualizza immagine di sfondo" - }, - "security": { - "message": "L'estensione non funziona su questa pagina per motivi di sicurezza." - }, - "reload": { - "message": "Si prega di ricaricare la scheda." - }, - "failure": { - "message": "Impossibile ottenere l'immagine di sfondo.\nSegnala un problema?" - } + "extName": { + "message": "Visualizza immagine di sfondo" + }, + "extDescription": { + "message": "Aggiunge «Visualizza immagine di sfondo» al menu contestuale." + }, + "review": { + "message": "Revisione" + }, + "donation": { + "message": "Donazione" + }, + "security": { + "message": "L'estensione non può essere eseguita su pagine speciali." + }, + "reload": { + "message": "Ricarica le pagine dopo aver installato o aggiornato l'estensione." + }, + "failure": { + "message": "Impossibile visualizzare le immagini di sfondo" + }, + "report": { + "message": "Segnala un problema?" + } } diff --git a/src/_locales/ja/messages.json b/src/_locales/ja/messages.json index 7c809e1..2050c1b 100644 --- a/src/_locales/ja/messages.json +++ b/src/_locales/ja/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "背景画像を表示" - }, - "extDescription": { - "message": "右クリックメニューに「背景画像を表示」を追加します。" - }, - "title": { - "message": "背景画像を表示" - }, - "security": { - "message": "セキュリティ上の理由のため、このページ上では実行できません。" - }, - "reload": { - "message": "タブを再読み込みしてください。" - }, - "failure": { - "message": "背景画像を取得できません。\n問題を報告しますか?" - } + "extName": { + "message": "背景画像を表示" + }, + "extDescription": { + "message": "コンテキストメニューに「背景画像を表示」を追加します。" + }, + "review": { + "message": "評価" + }, + "donation": { + "message": "寄付" + }, + "security": { + "message": "拡張機能は特殊なページ上では実行を許可されていません。" + }, + "reload": { + "message": "拡張機能のインストールとアップデートの後はページを再読み込みしてください。" + }, + "failure": { + "message": "背景画像を表示できません" + }, + "report": { + "message": "問題を報告しますか?" + } } diff --git a/src/_locales/kn/messages.json b/src/_locales/kn/messages.json index e5b833e..4877984 100644 --- a/src/_locales/kn/messages.json +++ b/src/_locales/kn/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "ಹಿನ್ನಲೆಯ ಚಿತ್ರವನ್ನು ನೋಡು" - }, - "extDescription": { - "message": "ಸಂದರ್ಭ ಮೆನುವಿನಲ್ಲಿ \"ಹಿನ್ನಲೆಯ ಚಿತ್ರವನ್ನು ನೋಡು\"." - }, - "title": { - "message": "ಹಿನ್ನಲೆಯ ಚಿತ್ರವನ್ನು ನೋಡು" - }, - "security": { - "message": "ಭದ್ರತಾ ಕಾರಣಗಳಿಗಾಗಿ ವಿಸ್ತರಣೆಯು ಈ ಪುಟದಲ್ಲಿ ಕಾರ್ಯನಿರ್ವಹಿಸುವುದಿಲ್ಲ." - }, - "reload": { - "message": "ದಯವಿಟ್ಟು ಟ್ಯಾಬ್ ಅನ್ನು ಮರುಲೋಡ್ ಮಾಡಿ." - }, - "failure": { - "message": "ಹಿನ್ನೆಲೆ ಚಿತ್ರವನ್ನು ಪಡೆಯಲು ವಿಫಲವಾಗಿದೆ.\nಸಮಸ್ಯೆಯನ್ನು ವರದಿ ಮಾಡಬೇಕೆ?" - } + "extName": { + "message": "ಹಿನ್ನೆಲೆ ಚಿತ್ರವನ್ನು ವೀಕ್ಷಿಸಿ" + }, + "extDescription": { + "message": "ಸಂದರ್ಭ ಮೆನುಗೆ “ಹಿನ್ನೆಲೆ ಚಿತ್ರವನ್ನು ವೀಕ್ಷಿಸಿ” ಅನ್ನು ಸೇರಿಸುತ್ತದೆ." + }, + "review": { + "message": "ಸಮೀಕ್ಷೆ" + }, + "donation": { + "message": "ದಾನ" + }, + "security": { + "message": "ವಿಶೇಷ ಪುಟಗಳಲ್ಲಿ ವಿಸ್ತರಣೆಯನ್ನು ಚಲಾಯಿಸಲು ಅನುಮತಿಸಲಾಗುವುದಿಲ್ಲ." + }, + "reload": { + "message": "ವಿಸ್ತರಣೆಯನ್ನು ಸ್ಥಾಪಿಸಿದ ಅಥವಾ ನವೀಕರಿಸಿದ ನಂತರ ಪುಟಗಳನ್ನು ಮರುಲೋಡ್ ಮಾಡಿ." + }, + "failure": { + "message": "ಹಿನ್ನೆಲೆ ಚಿತ್ರಗಳನ್ನು ವೀಕ್ಷಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ" + }, + "report": { + "message": "ಸಮಸ್ಯೆಯನ್ನು ವರದಿ ಮಾಡಬೇಕೆ?" + } } diff --git a/src/_locales/ko/messages.json b/src/_locales/ko/messages.json index 3b9b6db..d8f33eb 100644 --- a/src/_locales/ko/messages.json +++ b/src/_locales/ko/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "배경 이미지 보기" - }, - "extDescription": { - "message": "컨텍스트 메뉴에서 \"배경 이미지보기\"." - }, - "title": { - "message": "배경 이미지 보기" - }, - "security": { - "message": "보안상의 이유로 확장 프로그램이이 페이지에서 작동하지 않습니다." - }, - "reload": { - "message": "탭을 다시로드하십시오." - }, - "failure": { - "message": "배경 이미지를 가져 오는 데 실패했습니다.\n문제를 신고 하시겠습니까?" - } + "extName": { + "message": "배경 이미지 표시" + }, + "extDescription": { + "message": "컨텍스트 메뉴에 “배경 이미지 표시”를 추가합니다." + }, + "review": { + "message": "평가" + }, + "donation": { + "message": "기부" + }, + "security": { + "message": "확장 프로그램은 특수 페이지에서 실행할 수 없습니다." + }, + "reload": { + "message": "확장 프로그램 설치 또는 업데이트 후 페이지를 다시 불러와야 합니다." + }, + "failure": { + "message": "배경 이미지를 표시할 수 없습니다" + }, + "report": { + "message": "문제를 보고하시겠습니까?" + } } diff --git a/src/_locales/lt/messages.json b/src/_locales/lt/messages.json index b2af264..327dc7b 100644 --- a/src/_locales/lt/messages.json +++ b/src/_locales/lt/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Rodyti fono piešinį" - }, - "extDescription": { - "message": "Kontekstiniame meniu \"Rodyti fono piešinį\"." - }, - "title": { - "message": "Rodyti fono piešinį" - }, - "security": { - "message": "Plėtinys šiame puslapyje neveikia saugumo sumetimais." - }, - "reload": { - "message": "Įkelkite skirtuką iš naujo." - }, - "failure": { - "message": "Nepavyko gauti fono paveikslėlio.\nPranešti apie problemą?" - } + "extName": { + "message": "Rodyti fono paveikslėlį" + }, + "extDescription": { + "message": "Į kontekstinį meniu įtraukite „Rodyti fono paveikslėlį“." + }, + "review": { + "message": "Apžvalga" + }, + "donation": { + "message": "Donorystė" + }, + "security": { + "message": "Pratęsimo neleidžiama paleisti specialiuose puslapiuose." + }, + "reload": { + "message": "Įdiegę arba atnaujinę plėtinį iš naujo įkelkite puslapius." + }, + "failure": { + "message": "Negalima rodyti fono paveikslėlio" + }, + "report": { + "message": "Pranešti apie problemą?" + } } diff --git a/src/_locales/lv/messages.json b/src/_locales/lv/messages.json index e4629af..fd4be00 100644 --- a/src/_locales/lv/messages.json +++ b/src/_locales/lv/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Skatīt fona attēlu" - }, - "extDescription": { - "message": "\"Skatīt fona attēlu\" konteksta izvēlnē." - }, - "title": { - "message": "Skatīt fona attēlu" - }, - "security": { - "message": "Drošības apsvērumu dēļ paplašinājums šajā lapā nedarbojas." - }, - "reload": { - "message": "Lūdzu, atkārtoti ielādējiet cilni." - }, - "failure": { - "message": "Neizdevās iegūt fona attēlu.\nZiņot par problēmu?" - } + "extName": { + "message": "Skatīt fona attēlu" + }, + "extDescription": { + "message": "Konteksta izvēlnei pievieno “Skatīt fona attēlu”." + }, + "review": { + "message": "Pārskats" + }, + "donation": { + "message": "Ziedojums" + }, + "security": { + "message": "Paplašinājumam nav atļauts darboties īpašās lapās." + }, + "reload": { + "message": "Pēc paplašinājuma instalēšanas vai atjaunināšanas atkārtoti ielādējiet lapas." + }, + "failure": { + "message": "Nevar apskatīt fona attēlus" + }, + "report": { + "message": "Ziņot par problēmu?" + } } diff --git a/src/_locales/ml/messages.json b/src/_locales/ml/messages.json index 0247da4..f492d64 100644 --- a/src/_locales/ml/messages.json +++ b/src/_locales/ml/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "പശ്ചാത്തല ചിത്രം കാണുക" - }, - "extDescription": { - "message": "സന്ദർഭ മെനുവിൽ \"പശ്ചാത്തല ചിത്രം കാണുക\"." - }, - "title": { - "message": "പശ്ചാത്തല ചിത്രം കാണുക" - }, - "security": { - "message": "സുരക്ഷാ കാരണങ്ങളാൽ വിപുലീകരണം ഈ പേജിൽ പ്രവർത്തിക്കുന്നില്ല." - }, - "reload": { - "message": "ടാബ് വീണ്ടും ലോഡുചെയ്യുക." - }, - "failure": { - "message": "പശ്ചാത്തല ചിത്രം നേടുന്നതിൽ പരാജയപ്പെട്ടു.\nഒരു പ്രശ്നം റിപ്പോർട്ടുചെയ്യണോ?" - } + "extName": { + "message": "പശ്ചാത്തല ചിത്രം കാണുക" + }, + "extDescription": { + "message": "സന്ദർഭ മെനുവിലേക്ക് “പശ്ചാത്തല ചിത്രം കാണുക” ചേർക്കുന്നു." + }, + "review": { + "message": "അവലോകനം" + }, + "donation": { + "message": "ദാനം" + }, + "security": { + "message": "വിപുലീകരണം പ്രത്യേക പേജുകളിൽ പ്രവർത്തിക്കാൻ അനുവദിക്കില്ല." + }, + "reload": { + "message": "വിപുലീകരണം ഇൻസ്റ്റാൾ ചെയ്തതിന് ശേഷം അല്ലെങ്കിൽ അപ്ഡേറ്റ് ചെയ്തതിന് ശേഷം പേജുകൾ റീലോഡ് ചെയ്യുക." + }, + "failure": { + "message": "പശ്ചാത്തല ചിത്രങ്ങൾ കാണാൻ കഴിയില്ല" + }, + "report": { + "message": "ഒരു പ്രശ്നം റിപ്പോർട്ടുചെയ്യണോ?" + } } diff --git a/src/_locales/mr/messages.json b/src/_locales/mr/messages.json index a8720b9..04e89ec 100644 --- a/src/_locales/mr/messages.json +++ b/src/_locales/mr/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "पार्श्वभूमीतील चित्राचे दृष्य" - }, - "extDescription": { - "message": "संदर्भ मेनूमधील \"पार्श्वभूमीतील चित्राचे दृष्य\"." - }, - "title": { - "message": "पार्श्वभूमीतील चित्राचे दृष्य" - }, - "security": { - "message": "सुरक्षिततेच्या कारणास्तव या पृष्ठावर विस्तार कार्य करत नाही." - }, - "reload": { - "message": "कृपया टॅब रीलोड करा." - }, - "failure": { - "message": "पार्श्वभूमी प्रतिमा मिळविण्यात अयशस्वी.\nसमस्येचा अहवाल द्या?" - } + "extName": { + "message": "पार्श्वभूमी प्रतिमा पहा" + }, + "extDescription": { + "message": "संदर्भ मेनूमध्ये “पार्श्वभूमी प्रतिमा पहा” जोडते." + }, + "review": { + "message": "पुनरावलोकन करा" + }, + "donation": { + "message": "दान" + }, + "security": { + "message": "विस्ताराला विशेष पृष्ठांवर चालण्याची परवानगी नाही." + }, + "reload": { + "message": "विस्तार स्थापित केल्यानंतर किंवा अद्यतनित केल्यानंतर पृष्ठे रीलोड करा." + }, + "failure": { + "message": "पार्श्वभूमी प्रतिमा पाहू शकत नाही" + }, + "report": { + "message": "समस्येचा अहवाल द्या?" + } } diff --git a/src/_locales/ms/messages.json b/src/_locales/ms/messages.json index 5f5c94d..05d7aed 100644 --- a/src/_locales/ms/messages.json +++ b/src/_locales/ms/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Papar Imej Latar belakang" - }, - "extDescription": { - "message": "\"Papar Imej Latar belakang\" dalam menu konteks." - }, - "title": { - "message": "Papar Imej Latar belakang" - }, - "security": { - "message": "Sambungan tidak berfungsi di halaman ini atas alasan keselamatan." - }, - "reload": { - "message": "Sila muatkan semula tab." - }, - "failure": { - "message": "Gagal mendapatkan gambar latar.\nLaporkan masalah?" - } + "extName": { + "message": "Lihat Imej Latar Belakang" + }, + "extDescription": { + "message": "Menambahkan “Lihat Imej Latar Belakang” pada menu konteks." + }, + "review": { + "message": "Semakan" + }, + "donation": { + "message": "Derma" + }, + "security": { + "message": "Sambungan tidak dibenarkan untuk dijalankan pada halaman khas." + }, + "reload": { + "message": "Muat semula halaman selepas memasang atau mengemas kini sambungan." + }, + "failure": { + "message": "Tidak dapat melihat imej latar belakang" + }, + "report": { + "message": "Laporkan masalah?" + } } diff --git a/src/_locales/nl/messages.json b/src/_locales/nl/messages.json index 31468bf..6d8ce86 100644 --- a/src/_locales/nl/messages.json +++ b/src/_locales/nl/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Achtergrondafbeelding bekijken" - }, - "extDescription": { - "message": "\"Achtergrondafbeelding bekijken\" in contextmenu." - }, - "title": { - "message": "Achtergrondafbeelding bekijken" - }, - "security": { - "message": "De extensie werkt om veiligheidsredenen niet op deze pagina." - }, - "reload": { - "message": "Laad het tabblad opnieuw." - }, - "failure": { - "message": "Kan de achtergrondafbeelding niet krijgen.\nEen probleem melden?" - } + "extName": { + "message": "Achtergrondafbeelding bekijken" + }, + "extDescription": { + "message": "Voegt „Achtergrondafbeelding bekijken” toe aan het contextmenu." + }, + "review": { + "message": "Beoordeling" + }, + "donation": { + "message": "Donatie" + }, + "security": { + "message": "De extensie mag niet op speciale pagina's worden uitgevoerd." + }, + "reload": { + "message": "Laad pagina's opnieuw nadat u de extensie hebt geïnstalleerd of bijgewerkt." + }, + "failure": { + "message": "Kan achtergrondafbeeldingen niet bekijken" + }, + "report": { + "message": "Een probleem melden?" + } } diff --git a/src/_locales/no/messages.json b/src/_locales/no/messages.json index 374d9b0..0218fcd 100644 --- a/src/_locales/no/messages.json +++ b/src/_locales/no/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message" : "Se bakgrunnsbilde" - }, - "extDescription": { - "message" : "\"Se bakgrunnsbilde\" i kontekstmenyen." - }, - "title": { - "message" : "Se bakgrunnsbilde" - }, - "security": { - "message": "Utvidelsen fungerer ikke på denne siden av sikkerhetshensyn." - }, - "reload": { - "message": "Venligst fyll inn kategorien." - }, - "failure": { - "message" : "Kunne ikke få tak i bakgrunnsbilde.\nVil du rapportere en feil?" - } + "extName": { + "message": "Vis bakgrunnsbilde" + }, + "extDescription": { + "message": "Legger til «Vis bakgrunnsbilde» i kontekstmenyen." + }, + "review": { + "message": "Anmeldelse" + }, + "donation": { + "message": "Donasjon" + }, + "security": { + "message": "Utvidelsen er ikke tillatt å kjøre på spesielle sider." + }, + "reload": { + "message": "Last inn sider på nytt etter installasjon eller oppdatering av utvidelsen." + }, + "failure": { + "message": "Kan ikke vise bakgrunnsbilder" + }, + "report": { + "message": "Vil du rapportere en feil?" + } } diff --git a/src/_locales/pl/messages.json b/src/_locales/pl/messages.json index ede0964..a0f110e 100644 --- a/src/_locales/pl/messages.json +++ b/src/_locales/pl/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Pokaż obraz tła" - }, - "extDescription": { - "message": "\"Pokaż obraz tła\" w menu kontekstowym." - }, - "title": { - "message": "Pokaż obraz tła" - }, - "security": { - "message": "Rozszerzenie nie działa na tej stronie ze względów bezpieczeństwa." - }, - "reload": { - "message": "Załaduj kartę ponownie." - }, - "failure": { - "message": "Nie udało się uzyskać obrazu tła.\nChcesz zgłosić błąd?" - } + "extName": { + "message": "Wyświetl obraz tła" + }, + "extDescription": { + "message": "Dodaje „Wyświetl obraz tła” do menu kontekstowego." + }, + "review": { + "message": "Recenzja" + }, + "donation": { + "message": "Darowizna" + }, + "security": { + "message": "Rozszerzenie nie może działać na specjalnych stronach." + }, + "reload": { + "message": "Załaduj ponownie strony po zainstalowaniu lub aktualizacji rozszerzenia." + }, + "failure": { + "message": "Nie można wyświetlić obrazów tła" + }, + "report": { + "message": "Chcesz zgłosić błąd?" + } } diff --git a/src/_locales/pt_BR/messages.json b/src/_locales/pt_BR/messages.json index 3363630..a509b96 100644 --- a/src/_locales/pt_BR/messages.json +++ b/src/_locales/pt_BR/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Ver imagem de fundo" - }, - "extDescription": { - "message": "\"Ver imagem de fundo\" no menu de contexto." - }, - "title": { - "message": "Ver imagem de fundo" - }, - "security": { - "message": "A extensão não funciona nesta página por motivos de segurança." - }, - "reload": { - "message": "Por favor, recarregue a aba." - }, - "failure": { - "message": "Falha ao obter a imagem de plano de fundo.\nInformar um problema?" - } + "extName": { + "message": "Ver imagem de fundo" + }, + "extDescription": { + "message": "Adiciona “Ver imagem de fundo” ao menu de contexto." + }, + "review": { + "message": "Análise" + }, + "donation": { + "message": "Doação" + }, + "security": { + "message": "A extensão não pode ser executada em páginas especiais." + }, + "reload": { + "message": "Recarregar páginas depois de instalar ou atualizar a extensão." + }, + "failure": { + "message": "Não é possível visualizar imagens de fundo" + }, + "report": { + "message": "Informar um problema?" + } } diff --git a/src/_locales/pt_PT/messages.json b/src/_locales/pt_PT/messages.json index 3363630..76e8ef8 100644 --- a/src/_locales/pt_PT/messages.json +++ b/src/_locales/pt_PT/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Ver imagem de fundo" - }, - "extDescription": { - "message": "\"Ver imagem de fundo\" no menu de contexto." - }, - "title": { - "message": "Ver imagem de fundo" - }, - "security": { - "message": "A extensão não funciona nesta página por motivos de segurança." - }, - "reload": { - "message": "Por favor, recarregue a aba." - }, - "failure": { - "message": "Falha ao obter a imagem de plano de fundo.\nInformar um problema?" - } + "extName": { + "message": "Ver imagem de fundo" + }, + "extDescription": { + "message": "Adiciona «Ver imagem de fundo» ao menu de contexto." + }, + "review": { + "message": "Análise" + }, + "donation": { + "message": "Doação" + }, + "security": { + "message": "A extensão não pode ser executada em páginas especiais." + }, + "reload": { + "message": "Recarregar páginas depois de instalar ou atualizar a extensão." + }, + "failure": { + "message": "Não é possível visualizar imagens de fundo" + }, + "report": { + "message": "Informar um problema?" + } } diff --git a/src/_locales/ro/messages.json b/src/_locales/ro/messages.json index 83d5d84..c65f10e 100644 --- a/src/_locales/ro/messages.json +++ b/src/_locales/ro/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Vezi imaginea de fundal" - }, - "extDescription": { - "message": "\"Vezi imaginea de fundal\" în meniul contextual." - }, - "title": { - "message": "Vezi imaginea de fundal" - }, - "security": { - "message": "Extensia nu funcționează pe această pagină din motive de securitate." - }, - "reload": { - "message": "Vă rugăm să reîncărcați fila." - }, - "failure": { - "message": "Eroarea de a obține imaginea de fundal.\nRaportează o problemă?" - } + "extName": { + "message": "Vizualizare imagine de fundal" + }, + "extDescription": { + "message": "Adaugă „Vizualizare imagine de fundal” în meniul contextual." + }, + "review": { + "message": "Revizuire" + }, + "donation": { + "message": "Donare" + }, + "security": { + "message": "Extensia nu are voie să ruleze pe pagini speciale." + }, + "reload": { + "message": "Reîncărcați paginile după instalarea sau actualizarea extensiei." + }, + "failure": { + "message": "Nu se pot vizualiza imagini de fundal" + }, + "report": { + "message": "Raportează o problemă?" + } } diff --git a/src/_locales/ru/messages.json b/src/_locales/ru/messages.json index 1eb19a3..2c175cd 100644 --- a/src/_locales/ru/messages.json +++ b/src/_locales/ru/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Открыть фоновое изображение" - }, - "extDescription": { - "message": "\"Открыть фоновое изображение\" в контекстном меню." - }, - "title": { - "message": "Открыть фоновое изображение" - }, - "security": { - "message": "Расширение не работает на этой странице по соображениям безопасности." - }, - "reload": { - "message": "Перезагрузите вкладку." - }, - "failure": { - "message": "Не удалось получить фоновое изображение.\nЖелаете сообщить о проблеме?" - } + "extName": { + "message": "Просмотр фонового изображения" + }, + "extDescription": { + "message": "Добавляет «Просмотр фонового изображения» в контекстное меню." + }, + "review": { + "message": "Обзор" + }, + "donation": { + "message": "Пожертвование" + }, + "security": { + "message": "Расширению не разрешен запуск на специальных страницах." + }, + "reload": { + "message": "Перезагружайте страницы после установки или обновления расширения." + }, + "failure": { + "message": "Невозможно просмотреть фоновые изображения" + }, + "report": { + "message": "Сообщить о проблеме?" + } } diff --git a/src/_locales/sk/messages.json b/src/_locales/sk/messages.json index d1d73bf..aac5033 100644 --- a/src/_locales/sk/messages.json +++ b/src/_locales/sk/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Zobraziť obrázok pozadia" - }, - "extDescription": { - "message": "\"Zobraziť obrázok pozadia\" v kontextovej ponuke." - }, - "title": { - "message": "Zobraziť obrázok pozadia" - }, - "security": { - "message": "Rozšírenie na tejto stránke nefunguje z bezpečnostných dôvodov." - }, - "reload": { - "message": "Znovu načítajte kartu." - }, - "failure": { - "message": "Obrázok pozadia sa nepodarilo získať.\nNahlásiť problém?" - } + "extName": { + "message": "Zobraziť obrázok na pozadí" + }, + "extDescription": { + "message": "Pridá „Zobraziť obrázok na pozadí“ do kontextovej ponuky." + }, + "review": { + "message": "Preskúmanie" + }, + "donation": { + "message": "Darcovstvo" + }, + "security": { + "message": "Rozšírenie sa nesmie spúšťať na špeciálnych stránkach." + }, + "reload": { + "message": "Opätovné načítanie stránok po inštalácii alebo aktualizácii rozšírenia." + }, + "failure": { + "message": "Nie je možné zobraziť obrázky na pozadí" + }, + "report": { + "message": "Nahlásiť problém?" + } } diff --git a/src/_locales/sl/messages.json b/src/_locales/sl/messages.json index a432c47..d9f10c5 100644 --- a/src/_locales/sl/messages.json +++ b/src/_locales/sl/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Pokaži sliko ozadja" - }, - "extDescription": { - "message": "\"Pokaži sliko ozadja\" v kontekstnem meniju." - }, - "title": { - "message": "Pokaži sliko ozadja" - }, - "security": { - "message": "Razširitev na tej strani zaradi varnostnih razlogov ne deluje." - }, - "reload": { - "message": "Ponovno naložite zavihek." - }, - "failure": { - "message": "Ni bilo mogoče dobiti slike ozadja.\nPrijavite težavo?" - } + "extName": { + "message": "Ogled slike ozadja" + }, + "extDescription": { + "message": "V kontekstni meni doda „Ogled slike ozadja“." + }, + "review": { + "message": "Pregled" + }, + "donation": { + "message": "Donacija" + }, + "security": { + "message": "Razširitve ni dovoljeno izvajati na posebnih straneh." + }, + "reload": { + "message": "Ponovno naložite strani po namestitvi ali posodobitvi razširitve." + }, + "failure": { + "message": "Ni mogoče prikazati slike ozadja" + }, + "report": { + "message": "Prijavite težavo?" + } } diff --git a/src/_locales/sr/messages.json b/src/_locales/sr/messages.json index 3c84093..6692c9d 100644 --- a/src/_locales/sr/messages.json +++ b/src/_locales/sr/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Прикажи позадинску слику" - }, - "extDescription": { - "message": "\"Прикажи позадинску слику\" у контекстном менију." - }, - "title": { - "message": "Прикажи позадинску слику" - }, - "security": { - "message": "Проширење не ради на овој страници из безбедносних разлога." - }, - "reload": { - "message": "Поново учитајте картицу." - }, - "failure": { - "message": "Добијање позадинске слике није успело.\nПријавите проблем?" - } + "extName": { + "message": "Прикажи позадинску слику" + }, + "extDescription": { + "message": "Додаје „Прикажи позадинску слику“ у контекстни мени." + }, + "review": { + "message": "Преглед" + }, + "donation": { + "message": "Донација" + }, + "security": { + "message": "Екстензија није дозвољена да се покреће на посебним страницама." + }, + "reload": { + "message": "Поново учитајте странице након инсталирања или ажурирања екстензије." + }, + "failure": { + "message": "Не могу видети позадинске слике" + }, + "report": { + "message": "Пријавите проблем?" + } } diff --git a/src/_locales/sv/messages.json b/src/_locales/sv/messages.json index de707c6..2bcb4d5 100644 --- a/src/_locales/sv/messages.json +++ b/src/_locales/sv/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Visa bakgrundsbild" - }, - "extDescription": { - "message": "\"Visa bakgrundsbild\" i snabbmenyn." - }, - "title": { - "message": "Visa bakgrundsbild" - }, - "security": { - "message": "Utvidgningen fungerar inte på den här sidan av säkerhetsskäl." - }, - "reload": { - "message": "Vänligen ladda om fliken." - }, - "failure": { - "message": "Misslyckades med att få bakgrundsbilden.\nRapportera ett problem?" - } + "extName": { + "message": "Visa bakgrundsbild" + }, + "extDescription": { + "message": "Lägger till ”Visa bakgrundsbild” i snabbmenyn." + }, + "review": { + "message": "Recension" + }, + "donation": { + "message": "Donation" + }, + "security": { + "message": "Tillägget får inte köras på specialsidor." + }, + "reload": { + "message": "Ladda om sidor efter installation eller uppdatering av tillägget." + }, + "failure": { + "message": "Kan inte visa bakgrundsbilder" + }, + "report": { + "message": "Rapportera ett problem?" + } } diff --git a/src/_locales/sw/messages.json b/src/_locales/sw/messages.json index 4ff7c42..6b92456 100644 --- a/src/_locales/sw/messages.json +++ b/src/_locales/sw/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Angalia Picha ya Mandharinyuma" - }, - "extDescription": { - "message": "\"Angalia Picha ya Mandharinyuma\" kwenye menyu ya muktadha." - }, - "title": { - "message": "Angalia Picha ya Mandharinyuma" - }, - "security": { - "message": "Ugani haufanyi kazi kwenye ukurasa huu kwa sababu za usalama." - }, - "reload": { - "message": "Tafadhali pakia tena kichupo hicho." - }, - "failure": { - "message": "Imeshindwa kupata picha ya mandharinyuma.\nRipoti suala?" - } + "extName": { + "message": "Tazama Picha ya Mandharinyuma" + }, + "extDescription": { + "message": "Inaongeza “Tazama Picha ya Mandharinyuma” kwenye menyu ya muktadha." + }, + "review": { + "message": "Kagua" + }, + "donation": { + "message": "Mchango" + }, + "security": { + "message": "Kiendelezi hakiruhusiwi kuendeshwa kwenye kurasa maalum." + }, + "reload": { + "message": "Pakia upya kurasa baada ya kusakinisha au kusasisha kiendelezi." + }, + "failure": { + "message": "Haiwezi kuona picha za usuli" + }, + "report": { + "message": "Ripoti suala?" + } } diff --git a/src/_locales/ta/messages.json b/src/_locales/ta/messages.json index aef862f..0659ef3 100644 --- a/src/_locales/ta/messages.json +++ b/src/_locales/ta/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "பின்னணி படத்தைக் காட்டு" - }, - "extDescription": { - "message": "சூழல் மெனுவில் \"பின்னணி படத்தைக் காட்டு\"." - }, - "title": { - "message": "பின்னணி படத்தைக் காட்டு" - }, - "security": { - "message": "பாதுகாப்பு காரணங்களுக்காக இந்த பக்கத்தில் நீட்டிப்பு இயங்காது." - }, - "reload": { - "message": "தாவலை மீண்டும் ஏற்றவும்." - }, - "failure": { - "message": "பின்னணி படத்தைப் பெறுவதில் தோல்வி.\nசிக்கலைப் புகாரளிக்கவா?" - } + "extName": { + "message": "பின்னணி படத்தைக் காண்க" + }, + "extDescription": { + "message": "சூழல் மெனுவில் “பின்னணி படத்தைக் காண்க” சேர்க்கிறது." + }, + "review": { + "message": "விமர்சனம்" + }, + "donation": { + "message": "தானம்" + }, + "security": { + "message": "சிறப்புப் பக்கங்களில் நீட்டிப்பு இயங்க அனுமதிக்கப்படவில்லை." + }, + "reload": { + "message": "நீட்டிப்பை நிறுவிய அல்லது புதுப்பித்த பிறகு பக்கங்களை மீண்டும் ஏற்றவும்." + }, + "failure": { + "message": "பின்னணி படங்களை பார்க்க முடியாது" + }, + "report": { + "message": "சிக்கலைப் புகாரளிக்கவா?" + } } diff --git a/src/_locales/te/messages.json b/src/_locales/te/messages.json index 9f4fef4..31c1998 100644 --- a/src/_locales/te/messages.json +++ b/src/_locales/te/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "వెనుతలపు బొమ్మని చూడండి" - }, - "extDescription": { - "message": "సందర్భ మెనులో \"వెనుతలపు బొమ్మని చూడండి\"." - }, - "title": { - "message": "వెనుతలపు బొమ్మని చూడండి" - }, - "security": { - "message": "భద్రతా కారణాల వల్ల పొడిగింపు ఈ పేజీలో పనిచేయదు." - }, - "reload": { - "message": "దయచేసి టాబ్‌ను మళ్లీ లోడ్ చేయండి." - }, - "failure": { - "message": "నేపథ్య చిత్రాన్ని పొందడంలో విఫలమైంది.\nసమస్యను నివేదించాలా?" - } + "extName": { + "message": "నేపథ్యం చిత్రాన్ని వీక్షించండి" + }, + "extDescription": { + "message": "సందర్భ మెనుకి “నేపథ్యం చిత్రాన్ని వీక్షించండి” జోడిస్తుంది." + }, + "review": { + "message": "సమీక్ష" + }, + "donation": { + "message": "దానం" + }, + "security": { + "message": "పొడిగింపు ప్రత్యేక పేజీలలో అమలు చేయడానికి అనుమతించబడదు." + }, + "reload": { + "message": "పొడిగింపును ఇన్‌స్టాల్ చేసిన తర్వాత లేదా నవీకరించిన తర్వాత పేజీలను మళ్లీ లోడ్ చేయండి." + }, + "failure": { + "message": "నేపథ్య చిత్రాలను వీక్షించలేరు" + }, + "report": { + "message": "సమస్యను నివేదించాలా?" + } } diff --git a/src/_locales/th/messages.json b/src/_locales/th/messages.json index e8e37d1..99ebd0d 100644 --- a/src/_locales/th/messages.json +++ b/src/_locales/th/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "ดูภาพพื้นหลัง" - }, - "extDescription": { - "message": "\"ดูภาพพื้นหลัง\" ในเมนูบริบท" - }, - "title": { - "message": "ดูภาพพื้นหลัง" - }, - "security": { - "message": "ส่วนขยายไม่ทำงานในหน้านี้ด้วยเหตุผลด้านความปลอดภัย" - }, - "reload": { - "message": "โปรดโหลดแท็บซ้ำอีกครั้ง" - }, - "failure": { - "message": "ไม่สามารถรับภาพพื้นหลัง\nรายงานปัญหา?" - } + "extName": { + "message": "ดูภาพพื้นหลัง" + }, + "extDescription": { + "message": "เพิ่ม “ดูภาพพื้นหลัง” ลงในเมนูบริบท" + }, + "review": { + "message": "ทบทวน" + }, + "donation": { + "message": "บริจาค" + }, + "security": { + "message": "ไม่อนุญาตให้ส่วนขยายทำงานบนหน้าพิเศษ" + }, + "reload": { + "message": "โหลดหน้าซ้ำหลังจากติดตั้งหรืออัปเดตส่วนขยาย" + }, + "failure": { + "message": "ไม่สามารถดูภาพพื้นหลังได้" + }, + "report": { + "message": "รายงานปัญหา?" + } } diff --git a/src/_locales/tr/messages.json b/src/_locales/tr/messages.json index 39c681d..2029966 100644 --- a/src/_locales/tr/messages.json +++ b/src/_locales/tr/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Arka plan fotoğrafını göster" - }, - "extDescription": { - "message": "Bağlam menüsünde \"Arka plan fotoğrafını göster\"." - }, - "title": { - "message": "Arka plan fotoğrafını göster" - }, - "security": { - "message": "Uzantı, güvenlik nedeniyle bu sayfada çalışmıyor." - }, - "reload": { - "message": "Lütfen sekmeyi yeniden yükleyin." - }, - "failure": { - "message": "Arka plan fotoğrafı alınamadı.\nSorun bildir?" - } + "extName": { + "message": "Arka Plan Resmini Görüntüle" + }, + "extDescription": { + "message": "Bağlam menüsüne “Arka Plan Resmini Görüntüle” ekler." + }, + "review": { + "message": "Gözden geçirmek" + }, + "donation": { + "message": "Bağış" + }, + "security": { + "message": "Uzantının özel sayfalarda çalışmasına izin verilmiyor." + }, + "reload": { + "message": "Uzantıyı yükledikten veya güncelledikten sonra sayfaları yeniden yükleyin." + }, + "failure": { + "message": "Arka plan resimleri görüntülenemiyor" + }, + "report": { + "message": "Sorun bildir?" + } } diff --git a/src/_locales/uk/messages.json b/src/_locales/uk/messages.json index c4dc038..8488f2c 100644 --- a/src/_locales/uk/messages.json +++ b/src/_locales/uk/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Переглянути зображення тла" - }, - "extDescription": { - "message": "\"Переглянути зображення тла\" в контекстному меню." - }, - "title": { - "message": "Переглянути зображення тла" - }, - "security": { - "message": "Розширення на цій сторінці не працює з міркувань безпеки." - }, - "reload": { - "message": "Перезавантажте вкладку." - }, - "failure": { - "message": "Не вдалося отримати фонове зображення.\nБажаєте повідомити про помилку?" - } + "extName": { + "message": "Переглянути фонове зображення" + }, + "extDescription": { + "message": "Додає «Переглянути фонове зображення» до контекстного меню." + }, + "review": { + "message": "огляд" + }, + "donation": { + "message": "Пожертвування" + }, + "security": { + "message": "Розширення не можна запускати на спеціальних сторінках." + }, + "reload": { + "message": "Перезавантажте сторінки після встановлення або оновлення розширення." + }, + "failure": { + "message": "Неможливо переглянути фонові зображення" + }, + "report": { + "message": "Повідомити про проблему?" + } } diff --git a/src/_locales/vi/messages.json b/src/_locales/vi/messages.json index 1c03fcc..27b8496 100644 --- a/src/_locales/vi/messages.json +++ b/src/_locales/vi/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "Xem ảnh nền" - }, - "extDescription": { - "message": "\"Xem ảnh nền\" trong menu ngữ cảnh." - }, - "title": { - "message": "Xem ảnh nền" - }, - "security": { - "message": "Tiện ích mở rộng không hoạt động trên trang này vì lý do bảo mật." - }, - "reload": { - "message": "Vui lòng tải lại tab." - }, - "failure": { - "message": "Không thể có được hình ảnh nền.\nBáo cáo một vấn đề?" - } + "extName": { + "message": "Xem ảnh nền" + }, + "extDescription": { + "message": "Thêm “Xem hình nền” vào menu ngữ cảnh." + }, + "review": { + "message": "Ôn tập" + }, + "donation": { + "message": "Quyên góp" + }, + "security": { + "message": "Tiện ích mở rộng không được phép chạy trên các trang đặc biệt." + }, + "reload": { + "message": "Tải lại trang sau khi cài đặt hoặc cập nhật tiện ích mở rộng." + }, + "failure": { + "message": "Không thể xem hình nền" + }, + "report": { + "message": "Báo cáo một vấn đề?" + } } diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json index eebf84c..f6f8479 100644 --- a/src/_locales/zh_CN/messages.json +++ b/src/_locales/zh_CN/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "查看背景图像" - }, - "extDescription": { - "message": "\"查看背景图像\"上下文菜单上。" - }, - "title": { - "message": "查看背景图像" - }, - "security": { - "message": "出于安全原因,该扩展名不适用于此页面。" - }, - "reload": { - "message": "请重新加载标签。" - }, - "failure": { - "message": "不能得到的背景图像。\n报告问题?" - } + "extName": { + "message": "显示背景图像" + }, + "extDescription": { + "message": "将「显示背景图像」添加到上下文菜单。" + }, + "review": { + "message": "评价" + }, + "donation": { + "message": "捐款" + }, + "security": { + "message": "不允许在特殊页面上运行扩展。" + }, + "reload": { + "message": "请在安装或更新扩展后重新加载页面。" + }, + "failure": { + "message": "无法显示背景图像" + }, + "report": { + "message": "报告问题?" + } } diff --git a/src/_locales/zh_TW/messages.json b/src/_locales/zh_TW/messages.json index 7548c7f..5e87f3a 100644 --- a/src/_locales/zh_TW/messages.json +++ b/src/_locales/zh_TW/messages.json @@ -1,20 +1,26 @@ { - "extName": { - "message": "檢視背景圖片" - }, - "extDescription": { - "message": "\"檢視背景圖片\"上下文菜單。" - }, - "title": { - "message": "檢視背景圖片" - }, - "security": { - "message": "出於安全原因,該擴展名不適用於此頁面。" - }, - "reload": { - "message": "請重新加載標籤。" - }, - "failure": { - "message": "不能得到的背景圖片。\n報告問題?" - } + "extName": { + "message": "顯示背景圖像" + }, + "extDescription": { + "message": "將「顯示背景圖像」新增至上下文功能表。" + }, + "review": { + "message": "評價" + }, + "donation": { + "message": "捐款" + }, + "security": { + "message": "不允許在特殊頁面上運行擴充功能。" + }, + "reload": { + "message": "請在安裝或更新擴充功能後重新載入頁面。" + }, + "failure": { + "message": "無法顯示背景圖像" + }, + "report": { + "message": "報告問題?" + } } diff --git a/src/background.js b/src/background.js new file mode 100644 index 0000000..88bd88e --- /dev/null +++ b/src/background.js @@ -0,0 +1,44 @@ +'use strict'; + +chrome.runtime.onInstalled.addListener(() => { + chrome.contextMenus.create( + { + contexts: ['page', 'frame', 'selection', 'link', 'editable', 'image'], + id: 'background_img', + title: chrome.i18n.getMessage('extName'), + }, + () => { + if (chrome.runtime.lastError) { + console.log(chrome.runtime.lastError); + } + }, + ); +}); + +const cache = new Map(); + +chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + sendResponse(cache.get(message)); +}); + +chrome.contextMenus.onClicked.addListener(async (info, tab) => { + if (tab?.id == null) { + throw new Error('tab.id is not set.'); + } + + const response = await chrome.tabs + .sendMessage(tab.id, null, { frameId: info.frameId }) + .catch((error) => error.message); + + const key = String(Date.now()); + + cache.set(key, response); + + chrome.tabs.create({ + windowId: tab.windowId, + openerTabId: tab.id, + index: tab.index + 1, + active: false, + url: `${chrome.runtime.getURL('viewer/index.html')}?t=${key}`, + }); +}); diff --git a/src/content.js b/src/content.js index d70b640..0ad805b 100644 --- a/src/content.js +++ b/src/content.js @@ -1,68 +1,72 @@ -// @ts-check - 'use strict'; /** - * @param {Document|ShadowRoot} node + * @param {Document|ShadowRoot} root * @param {number} x > 0 * @param {number} y > 0 - * @returns {string[]} + * @returns {Set} */ -function getBackgroundImages(node, x, y) { - if (x <= 0 || y <= 0) return []; +function getBackgroundImages(root, x, y) { + /** @type {Set} */ + const images = new Set(); - /** @type {Set} */ - const images = new Set(); + if (x <= 0 || y <= 0) { + return images; + } - for (const element of node.querySelectorAll('*')) { - const rect = element.getBoundingClientRect(); - if (x < rect.left || rect.right < x || y < rect.top || rect.bottom < y) continue; + for (const element of root.querySelectorAll('*')) { + // Hit Testing + const rect = element.getBoundingClientRect(); + if (x < rect.left || rect.right < x || y < rect.top || rect.bottom < y) { + continue; + } - for (const pseudo of ['', '::before', '::after']) { - const results = getComputedBackgroundImages(element, pseudo); - results.forEach(result => images.add(result)); - } + for (const pseudo of ['', '::before', '::after']) { + for (const image of getComputedBackgroundImages(element, pseudo)) { + images.add(image); + } + } - if (element instanceof HTMLImageElement) { - images.add(element.currentSrc); - } else if (element instanceof SVGSVGElement) { - if (element.ownerDocument.contentType === 'image/svg+xml') { - // Object tag - images.add(element.ownerDocument.URL); - } else { - // Inline SVG - images.add(getSVGDataURI(element)); - } - } + if (element instanceof HTMLImageElement) { + images.add(element.currentSrc); + } - if (element.shadowRoot) { - const results = getBackgroundImages(element.shadowRoot, x, y); - results.forEach(result => images.add(result)); - } + if (element instanceof SVGSVGElement) { + if (element.ownerDocument.contentType === 'image/svg+xml') { + images.add(element.ownerDocument.URL); // Object tag + } else { + images.add(getSVGDataURI(element)); // Inline SVG + } } - return [...images]; + if (element.shadowRoot) { + for (const image of getBackgroundImages(element.shadowRoot, x, y)) { + images.add(image); + } + } + } + + return images; } /** * @param {Element} element * @param {string} [pseudo] - * @returns {string[]} + * @returns {Set} */ function getComputedBackgroundImages(element, pseudo) { - const style = getComputedStyle(element, pseudo); - const values = [ - style.getPropertyValue('background-image'), - style.getPropertyValue('content') - ]; - const results = []; - for (const value of values) { - value.replace(/url\("(.+?)"\)/g, (match, p) => { - results.push(p.replace(/\\"/g, '"')); - return ''; - }); + const style = getComputedStyle(element, pseudo); + const values = [ + style.getPropertyValue('background-image'), + style.getPropertyValue('content'), + ]; + const images = new Set(); + for (const value of values) { + for (const [, url] of value.matchAll(/url\("(.+?)"\)/g)) { + images.add(url.replaceAll('\\"', '"')); } - return results; + } + return images; } /** @@ -70,25 +74,26 @@ function getComputedBackgroundImages(element, pseudo) { * @returns {string} */ function getSVGDataURI(element) { - const svg = /** @type {SVGSVGElement} */ (element.cloneNode(true)); - svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); - svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - return 'data:image/svg+xml,' + encodeURIComponent(svg.outerHTML); + const svg = /** @type {SVGSVGElement} */ (element.cloneNode(true)); + svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + return 'data:image/svg+xml,' + encodeURIComponent(svg.outerHTML); } if (chrome.runtime) { - let x = 0, y = 0; + let root = document; + let x = 0; + let y = 0; - document.addEventListener('contextmenu', e => { - x = e.clientX; - y = e.clientY; - }); + document.addEventListener('contextmenu', (event) => { + if (event.target instanceof Element) { + root = event.target.ownerDocument; + } + x = event.clientX; + y = event.clientY; + }); - chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { - if (message) { - sendResponse(confirm(message)); - } else { - sendResponse(getBackgroundImages(document, x, y)); - } - }); + chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { + sendResponse([...getBackgroundImages(root, x, y)]); + }); } diff --git a/src/icon128.png b/src/icons/icon128.png similarity index 100% rename from src/icon128.png rename to src/icons/icon128.png diff --git a/src/icon16.png b/src/icons/icon16.png similarity index 100% rename from src/icon16.png rename to src/icons/icon16.png diff --git a/src/icon32.png b/src/icons/icon32.png similarity index 100% rename from src/icon32.png rename to src/icons/icon32.png diff --git a/src/icon48.png b/src/icons/icon48.png similarity index 100% rename from src/icon48.png rename to src/icons/icon48.png diff --git a/src/manifest.json b/src/manifest.json index 1a5b7f7..11fbddd 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,29 +1,25 @@ { - "manifest_version": 2, - "name": "__MSG_extName__", - "version": "2.10.2", - "description": "__MSG_extDescription__", - "default_locale": "en", - "permissions": [ - "contextMenus", - "" - ], - "background": { - "scripts": [ "script.js" ], - "persistent": false - }, - "content_scripts": [ - { - "matches": [ "" ], - "js": [ "content.js" ], - "run_at": "document_start", - "all_frames": true - } - ], - "icons": { - "16": "icon16.png", - "32": "icon32.png", - "48": "icon48.png", - "128": "icon128.png" + "manifest_version": 3, + "name": "__MSG_extName__", + "version": "3.0.0", + "description": "__MSG_extDescription__", + "default_locale": "en", + "permissions": ["contextMenus"], + "background": { + "service_worker": "background.js" + }, + "content_scripts": [ + { + "matches": [""], + "js": ["content.js"], + "run_at": "document_start", + "all_frames": true } + ], + "icons": { + "16": "icons/icon16.png", + "32": "icons/icon32.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } } diff --git a/src/script.js b/src/script.js deleted file mode 100644 index f861128..0000000 --- a/src/script.js +++ /dev/null @@ -1,65 +0,0 @@ -// @ts-check - -'use strict'; - -chrome.contextMenus.create({ - contexts: ['page', 'frame', 'selection', 'link', 'editable', 'image'], - id: 'background_img', - title: chrome.i18n.getMessage('title') -}, () => { - console.log(chrome.runtime.lastError); -}); - -chrome.contextMenus.onClicked.addListener((info, tab) => { - chrome.tabs.sendMessage(tab.id, null, { frameId: info.frameId }, response => { - - if (chrome.runtime.lastError) { - chrome.tabs.executeScript({ code: '', frameId: info.frameId }, () => { - const reason = chrome.runtime.lastError ? 'security' : 'reload'; - alert(chrome.i18n.getMessage(reason)); - }); - return; - } - - if (!Array.isArray(response) || response.length === 0) { - const message = chrome.i18n.getMessage('failure'); - chrome.tabs.sendMessage(tab.id, message, { frameId: info.frameId }, result => { - if (!result) return; - chrome.tabs.create({ - windowId: tab.windowId, - openerTabId: tab.id, - index: tab.index + 1, - url: 'https://github.com/foooomio/view-background-image/issues' - }); - }); - return; - } - - for (const image of response) { - chrome.tabs.create({ - windowId: tab.windowId, - openerTabId: tab.id, - index: tab.index + 1, - active: !shouldOpenInBackground(info), - url: image - }); - } - - }); -}); - -/** - * @param {any} info - * @returns {boolean} - * @description Currently this function works well only on Firefox. - */ -function shouldOpenInBackground(info) { - if (info.button === 1) return true; - - if (info.modifiers && info.modifiers.length === 1) { - const key = info.modifiers[0]; - return key === 'Ctrl' || key === 'Command'; - } - - return false; -} diff --git a/src/viewer/connection.js b/src/viewer/connection.js new file mode 100644 index 0000000..79b54b0 --- /dev/null +++ b/src/viewer/connection.js @@ -0,0 +1,45 @@ +/** + * @param {unknown} value + * @returns {value is string[]} + */ +function isArrayOfString(value) { + return ( + Array.isArray(value) && value.every((item) => typeof item === 'string') + ); +} + +/** + * @param {string} key + * @returns {Promise} + * @throws {Error} + */ +export async function getImages(key) { + const cache = localStorage.getItem(key); + + if (cache) { + return JSON.parse(cache); + } + + /** + * `string[]` is an array of background image. + * `string` is an error message. + * `null` if invalid key. + * + * @type {unknown} + */ + const response = await chrome.runtime + .sendMessage(key) + .catch((error) => error.message); + + if (!isArrayOfString(response)) { + if (typeof response === 'string') { + throw new Error(response); + } else { + console.error(response); + throw new Error('Unknown error.'); + } + } + + localStorage.setItem(key, JSON.stringify(response)); + return response; +} diff --git a/src/viewer/error.js b/src/viewer/error.js new file mode 100644 index 0000000..133469c --- /dev/null +++ b/src/viewer/error.js @@ -0,0 +1,10 @@ +import { $ } from './utils.js'; + +/** + * @param {Error} error + */ +export function showError(error) { + $('error-details').textContent = error.toString(); + $('error').classList.remove('hidden'); + $('nav').classList.add('hidden'); +} diff --git a/src/viewer/gallery.js b/src/viewer/gallery.js new file mode 100644 index 0000000..3571efd --- /dev/null +++ b/src/viewer/gallery.js @@ -0,0 +1,18 @@ +import { $, $e } from './utils.js'; + +/** + * @param {string[]} images + */ +export function setupGallery(images) { + const figures = images.map((image) => { + const caption = image.startsWith('data:image/svg+xml') ? 'SVG' : image; + return $e( + 'figure', + {}, + $e('a', { href: image }, $e('img', { src: image })), + $e('figcaption', {}, caption), + ); + }); + + $('gallery').append(...figures); +} diff --git a/src/viewer/index.html b/src/viewer/index.html new file mode 100644 index 0000000..629743d --- /dev/null +++ b/src/viewer/index.html @@ -0,0 +1,43 @@ + + + + + + + + + +

+ + + + + + + + diff --git a/src/viewer/init.js b/src/viewer/init.js new file mode 100644 index 0000000..5cf3633 --- /dev/null +++ b/src/viewer/init.js @@ -0,0 +1,15 @@ +import { $ } from './utils.js'; + +export function init() { + const extName = chrome.i18n.getMessage('extName'); + document.title = extName; + $('h1').textContent = extName; + + $('review').textContent = '☆ ' + chrome.i18n.getMessage('review'); + $('donation').textContent = '♡ ' + chrome.i18n.getMessage('donation'); + + $('error-message').textContent = '⚠️ ' + chrome.i18n.getMessage('failure'); + $('error-reload').textContent = chrome.i18n.getMessage('reload'); + $('error-security').textContent = chrome.i18n.getMessage('security'); + $('error-report').textContent = chrome.i18n.getMessage('report'); +} diff --git a/src/viewer/main.js b/src/viewer/main.js new file mode 100644 index 0000000..66e30f9 --- /dev/null +++ b/src/viewer/main.js @@ -0,0 +1,25 @@ +import { getImages } from './connection.js'; +import { showError } from './error.js'; +import { setupGallery } from './gallery.js'; +import { init } from './init.js'; +import { DAY, removeExpiredCache } from './utils.js'; + +init(); + +try { + const key = new URLSearchParams(location.search).get('t'); + + const images = await getImages(key ?? ''); + + if (images.length === 0) { + throw new Error('No background images found.'); + } + + setupGallery(images); +} catch (error) { + if (error instanceof Error) { + showError(error); + } +} finally { + removeExpiredCache(Date.now() - 7 * DAY); +} diff --git a/src/viewer/style.css b/src/viewer/style.css new file mode 100644 index 0000000..33a9878 --- /dev/null +++ b/src/viewer/style.css @@ -0,0 +1,71 @@ +:root { + --text-color: #f1f1f1; + --bg-color: #0e0e0e; +} + +body { + margin: 2rem; + text-align: center; + color: var(--text-color); + background-color: var(--bg-color); + font-size: 1rem; + font-family: sans-serif; +} + +a { + color: var(--text-color); +} + +a:hover { + opacity: 0.9; +} + +h1 { + margin: 2rem 0; + font-size: 2rem; +} + +#nav a { + text-decoration: none; +} + +#nav div { + display: inline-block; + border-radius: 4px; + border: 1px solid var(--text-color); + padding: 0.2rem 0.4rem; + margin: 0.2rem; +} + +#gallery figure { + margin: 4rem 8rem; +} + +#gallery img { + max-width: 100%; + max-height: 80vh; + transition: 0.2s; +} + +#gallery figcaption { + margin-top: 1rem; +} + +#error { + margin-top: 6rem; + line-height: 1.8; +} + +#error ul { + width: fit-content; + margin: 2rem auto; + text-align: left; +} + +#error p { + margin: 2rem 0; +} + +.hidden { + display: none; +} diff --git a/src/viewer/utils.js b/src/viewer/utils.js new file mode 100644 index 0000000..1fb0f13 --- /dev/null +++ b/src/viewer/utils.js @@ -0,0 +1,39 @@ +export const DAY = 24 * 60 * 60 * 1000; + +/** + * @param {string} id + * @returns {HTMLElement} + */ +export function $(id) { + const element = document.getElementById(id); + if (!element) { + throw new Error(`Element ${id} not found`); + } + return element; +} + +/** + * @template {keyof HTMLElementTagNameMap} K + * @param {K} tagName + * @param {Record} options + * @param {(string | Node)[]} children + * @returns {HTMLElementTagNameMap[K]} + */ +export function $e(tagName, options = {}, ...children) { + const element = document.createElement(tagName); + element.append(...children); + return Object.assign(element, options); +} + +/** + * @param {number} expiration + * @returns {void} + */ +export function removeExpiredCache(expiration) { + for (let i = 0; i < localStorage.length; i++) { + const key = localStorage.key(i); + if (key && Number(key) < expiration) { + localStorage.removeItem(key); + } + } +} diff --git a/test/getBackgroundImages.spec.js b/test/getBackgroundImages.spec.js deleted file mode 100644 index d6998af..0000000 --- a/test/getBackgroundImages.spec.js +++ /dev/null @@ -1,46 +0,0 @@ -const assert = require('assert'); -const fs = require('fs'); -const path = require('path'); -const puppeteer = require('puppeteer-core'); - -const launchOptions = { - executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' -}; - -const testCaseDir = path.resolve(__dirname, 'html'); -const contentScript = path.resolve(__dirname, '../src/content.js'); - -describe('getBackgroundImages', function() { - let browser, page; - - this.timeout(0); - this.slow(1000); - - before(async function() { - browser = await puppeteer.launch(launchOptions); - page = await browser.newPage(); - }); - - after(async function() { - console.log(' on ' + await browser.version()); - await browser.close(); - }); - - const expected = ['blue.png']; - const point = { x: 50, y: 50 }; - - fs.readdirSync(testCaseDir).forEach(filename => { - it(filename, async function() { - await page.goto('file://' + path.resolve(testCaseDir, filename)); - await page.addScriptTag({ path: contentScript }); - - /* global getBackgroundImages */ - const results = await page.evaluate( - (x, y) => getBackgroundImages(document, x, y), point.x, point.y - ); - - const actual = results.map(r => path.basename(r)); - assert.deepStrictEqual(actual, expected); - }); - }); -}); diff --git a/test/html/image-set.html b/test/html/image-set.html deleted file mode 100644 index c866b30..0000000 --- a/test/html/image-set.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/test/html/img.html b/test/html/img.html deleted file mode 100644 index f83bfc4..0000000 --- a/test/html/img.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/locales.spec.js b/test/locales.spec.js deleted file mode 100644 index be639a9..0000000 --- a/test/locales.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -const assert = require('assert'); -const fs = require('fs'); -const path = require('path'); - -describe('locales', function() { - const locales = path.resolve(__dirname, '../src/_locales'); - const keys = [ - 'extName', 'extDescription', 'title', 'security', 'reload', 'failure' - ]; - - fs.readdirSync(locales).forEach(locale => { - it(locale, function() { - const file = fs.readFileSync(path.resolve(locales, locale, 'messages.json')); - const json = JSON.parse(file); - keys.forEach(key => { - assert(typeof json[key].message === 'string'); - }); - }); - }); -}); diff --git a/tests/getBackgroundImages.spec.ts b/tests/getBackgroundImages.spec.ts new file mode 100644 index 0000000..4ae80e8 --- /dev/null +++ b/tests/getBackgroundImages.spec.ts @@ -0,0 +1,72 @@ +import { test, expect } from '@playwright/test'; +import { basename } from 'node:path'; + +interface TestCase { + title: string; + point: [x: number, y: number]; + expected: string[]; + skip?: string[]; +} + +const testCases: TestCase[] = [ + { + title: 'body_attr', + point: [50, 50], + expected: ['blue.png'], + }, + { + title: 'body_css', + point: [50, 50], + expected: ['blue.png'], + }, + { + title: 'image-set', + point: [50, 50], + expected: ['blue.png'], + skip: ['firefox'], + }, + { + title: 'img', + point: [50, 50], + expected: ['blue.png'], + }, + { + title: 'overlap', + point: [50, 50], + expected: ['blue.png'], + }, + { + title: 'pseudo_content', + point: [50, 50], + expected: ['blue.png'], + }, + { + title: 'pseudo_element', + point: [50, 50], + expected: ['blue.png'], + }, + { + title: 'shadow_dom', + point: [50, 50], + expected: ['blue.png'], + }, +]; + +for (const { title, point, expected, skip } of testCases) { + test(title, async ({ page, browserName }) => { + test.skip(!!skip?.includes(browserName)); + + await page.goto(import.meta.resolve(`./html/${title}.html`)); + await page.addScriptTag({ + url: import.meta.resolve('../src/content.js'), + }); + + const actual = await page.evaluate( + // @ts-ignore + ([x, y]) => [...getBackgroundImages(document, x, y)], + point, + ); + + expect(actual.map((url) => basename(url))).toEqual(expected); + }); +} diff --git a/test/html/body_attr.html b/tests/html/body_attr.html similarity index 100% rename from test/html/body_attr.html rename to tests/html/body_attr.html diff --git a/test/html/body_css.html b/tests/html/body_css.html similarity index 100% rename from test/html/body_css.html rename to tests/html/body_css.html diff --git a/tests/html/image-set.html b/tests/html/image-set.html new file mode 100644 index 0000000..a6782d4 --- /dev/null +++ b/tests/html/image-set.html @@ -0,0 +1,8 @@ + diff --git a/tests/html/img.html b/tests/html/img.html new file mode 100644 index 0000000..2c215ba --- /dev/null +++ b/tests/html/img.html @@ -0,0 +1 @@ + diff --git a/test/html/overlap.html b/tests/html/overlap.html similarity index 100% rename from test/html/overlap.html rename to tests/html/overlap.html diff --git a/test/html/pseudo_content.html b/tests/html/pseudo_content.html similarity index 85% rename from test/html/pseudo_content.html rename to tests/html/pseudo_content.html index acc7865..a4fa29a 100644 --- a/test/html/pseudo_content.html +++ b/tests/html/pseudo_content.html @@ -4,7 +4,8 @@ height: 100%; width: 100%; } - body::before, body::after { + body::before, + body::after { content: url(../image/blue.png); position: absolute; height: 100%; diff --git a/test/html/pseudo_element.html b/tests/html/pseudo_element.html similarity index 87% rename from test/html/pseudo_element.html rename to tests/html/pseudo_element.html index 3e8e983..6bf623d 100644 --- a/test/html/pseudo_element.html +++ b/tests/html/pseudo_element.html @@ -4,7 +4,8 @@ height: 100%; width: 100%; } - body::before, body::after { + body::before, + body::after { background-image: url(../image/blue.png); content: ''; position: absolute; diff --git a/test/html/shadow_dom.html b/tests/html/shadow_dom.html similarity index 60% rename from test/html/shadow_dom.html rename to tests/html/shadow_dom.html index 1326fcb..22ef056 100644 --- a/test/html/shadow_dom.html +++ b/tests/html/shadow_dom.html @@ -1,6 +1,7 @@ diff --git a/test/image/blue.png b/tests/image/blue.png similarity index 100% rename from test/image/blue.png rename to tests/image/blue.png diff --git a/test/image/green.png b/tests/image/green.png similarity index 100% rename from test/image/green.png rename to tests/image/green.png diff --git a/test/image/red.png b/tests/image/red.png similarity index 100% rename from test/image/red.png rename to tests/image/red.png diff --git a/tests/locales.test.js b/tests/locales.test.js new file mode 100644 index 0000000..8bca33a --- /dev/null +++ b/tests/locales.test.js @@ -0,0 +1,33 @@ +import assert from 'node:assert'; +import test from 'node:test'; +import fs from 'node:fs/promises'; + +const keys = [ + 'extName', + 'extDescription', + 'review', + 'donation', + 'security', + 'reload', + 'failure', + 'report', +]; + +test('locales', async (t) => { + const locales = await fs.readdir(new URL('../src/_locales', import.meta.url)); + + for (const locale of locales) { + await t.test(locale, async (t) => { + const { default: messages } = await import( + import.meta.resolve(`../src/_locales/${locale}/messages.json`), + { assert: { type: 'json' } } + ); + + for (const key of keys) { + await t.test(key, () => { + assert(typeof messages[key].message === 'string'); + }); + } + }); + } +}); diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..1c28629 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,76 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@playwright/test@^1.44.1": + version "1.44.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.44.1.tgz#cc874ec31342479ad99838040e99b5f604299bcb" + integrity sha512-1hZ4TNvD5z9VuhNJ/walIjvMVvYkZKf71axoF/uiAqpntQJXpG64dlXhoDXE3OczPuTuvjf/M5KWFg5VAVUS3Q== + dependencies: + playwright "1.44.1" + +"@types/chrome@^0.0.268": + version "0.0.268" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.268.tgz#d5855546f30c83e181cadd77127a162c25b480d2" + integrity sha512-7N1QH9buudSJ7sI8Pe4mBHJr5oZ48s0hcanI9w3wgijAlv1OZNUZve9JR4x42dn5lJ5Sm87V1JNfnoh10EnQlA== + dependencies: + "@types/filesystem" "*" + "@types/har-format" "*" + +"@types/filesystem@*": + version "0.0.36" + resolved "https://registry.yarnpkg.com/@types/filesystem/-/filesystem-0.0.36.tgz#7227c2d76bfed1b21819db310816c7821d303857" + integrity sha512-vPDXOZuannb9FZdxgHnqSwAG/jvdGM8Wq+6N4D/d80z+D4HWH+bItqsZaVRQykAn6WEVeEkLm2oQigyHtgb0RA== + dependencies: + "@types/filewriter" "*" + +"@types/filewriter@*": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/filewriter/-/filewriter-0.0.33.tgz#d9d611db9d9cd99ae4e458de420eeb64ad604ea8" + integrity sha512-xFU8ZXTw4gd358lb2jw25nxY9QAgqn2+bKKjKOYfNCzN4DKCFetK7sPtrlpg66Ywe3vWY9FNxprZawAh9wfJ3g== + +"@types/har-format@*": + version "1.2.15" + resolved "https://registry.yarnpkg.com/@types/har-format/-/har-format-1.2.15.tgz#f352493638c2f89d706438a19a9eb300b493b506" + integrity sha512-RpQH4rXLuvTXKR0zqHq3go0RVXYv/YVqv4TnPH95VbwUxZdQlK1EtcMvQvMpDngHbt13Csh9Z4qT9AbkiQH5BA== + +"@types/node@^20.12.12": + version "20.12.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" + integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== + dependencies: + undici-types "~5.26.4" + +fsevents@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +playwright-core@1.44.1: + version "1.44.1" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.44.1.tgz#53ec975503b763af6fc1a7aa995f34bc09ff447c" + integrity sha512-wh0JWtYTrhv1+OSsLPgFzGzt67Y7BE/ZS3jEqgGBlp2ppp1ZDj8c+9IARNW4dwf1poq5MgHreEM2KV/GuR4cFA== + +playwright@1.44.1: + version "1.44.1" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.44.1.tgz#5634369d777111c1eea9180430b7a184028e7892" + integrity sha512-qr/0UJ5CFAtloI3avF95Y0L1xQo6r3LQArLIg/z/PoGJ6xa+EwzrwO5lpNr/09STxdHuUoP2mvuELJS+hLdtgg== + dependencies: + playwright-core "1.44.1" + optionalDependencies: + fsevents "2.3.2" + +prettier@^3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" + integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== + +typescript@^5.4.5: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==