-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
• Added support for internationalization • Added European and Brazilian Portuguese locales
- Loading branch information
Showing
7 changed files
with
76 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"extensionName": { | ||
"message": "Search by Image on Google" | ||
}, | ||
|
||
"extensionDescription": { | ||
"message": "Search for related images or in different sizes on Google by right clicking on an image." | ||
}, | ||
|
||
"searchImage": { | ||
"message": "Search Image on Google" | ||
}, | ||
|
||
"openInBackground": { | ||
"message": "Open search tab in background" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"extensionName": { | ||
"message": "Pesquisa por imagem no Google" | ||
}, | ||
|
||
"extensionDescription": { | ||
"message": "Pesquise imagens relacionadas ou em diferentes tamanhos no Google clicando com o botão direito em uma imagem." | ||
}, | ||
|
||
"searchImage": { | ||
"message": "Pesquisar imagem no Google" | ||
}, | ||
|
||
"openInBackground": { | ||
"message": "Abrir aba de pesquisa em segundo plano" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"extensionName": { | ||
"message": "Pesquisa por imagem no Google" | ||
}, | ||
|
||
"extensionDescription": { | ||
"message": "Pesquise imagens relacionadas ou em diferentes tamanhos no Google clicando com o botão direito numa imagem." | ||
}, | ||
|
||
"searchImage": { | ||
"message": "Pesquisar imagem no Google" | ||
}, | ||
|
||
"openInBackground": { | ||
"message": "Abrir separador de pesquisa em segundo plano" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
'use strict'; | ||
|
||
function saveOptions(e) { | ||
browser.storage.sync.set({ | ||
openinbackground: document.getElementById('openinbackground').checked | ||
openInBackground: document.getElementById('openInBackground').checked | ||
}); | ||
} | ||
|
||
function restoreOptions() { | ||
function setCurrentChoice(result) { | ||
document.getElementById('openinbackground').checked = result.openinbackground; | ||
document.getElementById('openInBackground').checked = result.openInBackground; | ||
} | ||
|
||
document.getElementById('openInBackgroundLabel').textContent = browser.i18n.getMessage('openInBackground'); | ||
|
||
var getPreference = browser.storage.sync.get({ | ||
openinbackground: true | ||
openInBackground: true | ||
}); | ||
getPreference.then(setCurrentChoice); | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', restoreOptions); | ||
document.getElementById('openinbackground').addEventListener('click', saveOptions); | ||
document.getElementById('openInBackground').addEventListener('click', saveOptions); |