Added 'take-me-home' button to the chrome extension

This commit is contained in:
Leonetienne
2021-03-13 19:15:40 +01:00
parent d1578ac94b
commit 8b31627450
5 changed files with 16 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
$("#button-download").click(function() {
$("#button--download").click(function() {
$("#button-download").addClass("lock");
$("#button--download").addClass("lock");
// Query active tab in active window...
chrome.windows.getCurrent(function(w) {
@@ -25,8 +25,14 @@ chrome.storage.local.get(['tubio_address'], function(result) {
$("#tubio-address").val(result.tubio_address);
});
$("#button-save-settings").click(function() {
$("#button--save-settings").click(function() {
chrome.storage.local.set({
tubio_address: $("#tubio-address").val()
});
});
$("#button--take-me-home").click(function() {
chrome.storage.local.get(['tubio_address'], function(result) {
chrome.tabs.create({url: result.tubio_address});
});
});