Skip to content

Commit

Permalink
no more logs and no more page actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Cristian Petcu committed May 20, 2017
1 parent 0bf0810 commit eeac5f5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "1.2.2",
"version": "1.2.3",
"homepage_url": "https://github.com/andreicristianpetcu/google_translate_this",
"manifest_version": 2,
"description": "__MSG_appDescription__",
Expand Down
20 changes: 10 additions & 10 deletions scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ browser.contextMenus.create({
});
browser.pageAction.onClicked.addListener(translateCurrentPage);

browser.tabs.query({}).then((tabs) => {
var tab;
for (tab of tabs) {
showPageActionOnTab(tab);
}
});

browser.tabs.onUpdated.addListener((id, changeInfo, tab) => {
showPageActionOnTab(tab);
});
//browser.tabs.query({}).then((tabs) => {
// var tab;
// for (tab of tabs) {
// showPageActionOnTab(tab);
// }
//});
//
//browser.tabs.onUpdated.addListener((id, changeInfo, tab) => {
// showPageActionOnTab(tab);
//});
2 changes: 0 additions & 2 deletions scripts/inject_google_translate_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ document.body.appendChild(gtdiv);
var googleTranslateElementInitCode = "function(){ \
new google.translate.TranslateElement({pageLanguage: 'auto', autoDisplay: true}, 'google_translate_element'); \
setTimeout(function(){ \
console.log('translating'); \
var iframe = document.getElementsByClassName('goog-te-banner-frame')[0]; \
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document; \
iframeDocument.getElementsByClassName('goog-te-button')[0].children[0].children[0].click(); \
console.log('finished translation'); \
}, 1000); \
}";

Expand Down
4 changes: 3 additions & 1 deletion updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
{ "version": "1.2.0",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v1.2.0/google_translate_this_page-1.2.0-an.fx.xpi" },
{ "version": "1.2.2",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v1.2.2/google_translate_this_page-1.2.2-an.fx.xpi" }
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v1.2.2/google_translate_this_page-1.2.2-an.fx.xpi" },
{ "version": "1.2.3",
"update_link": "https://github.com/andreicristianpetcu/google_translate_this/releases/download/v1.2.3/google_translate_this_page-1.2.3-an.fx.xpi" }
]
}
}
Expand Down

0 comments on commit eeac5f5

Please sign in to comment.