|
@@ -1,7 +1,7 @@
|
|
|
document.getElementById("grabbutton").addEventListener("click", function () {
|
|
document.getElementById("grabbutton").addEventListener("click", function () {
|
|
|
browser.tabs.query({ active: true, currentWindow: true }).then(tabs => {
|
|
browser.tabs.query({ active: true, currentWindow: true }).then(tabs => {
|
|
|
browser.tabs
|
|
browser.tabs
|
|
|
- .sendMessage(tabs[0].id, "get")
|
|
|
|
|
|
|
+ .sendMessage(tabs[0].id, { action: "get" })
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
tablebody = document.getElementById("tablebody");
|
|
tablebody = document.getElementById("tablebody");
|
|
|
tablebody.innerHTML = "";
|
|
tablebody.innerHTML = "";
|
|
@@ -22,3 +22,16 @@ document.getElementById("grabbutton").addEventListener("click", function () {
|
|
|
console.log(error);
|
|
console.log(error);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+document.getElementById("inputbutton").addEventListener("click", function () {
|
|
|
|
|
+ browser.tabs.query({ active: true, currentWindow: true }).then(tabs => {
|
|
|
|
|
+ browser.tabs
|
|
|
|
|
+ .sendMessage(tabs[0].id, { action: "send", content: document.getElementById("tablebody") })
|
|
|
|
|
+ .then(response => {
|
|
|
|
|
+ console.log(response);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.log(error);
|
|
|
|
|
+ });
|
|
|
|
|
+});
|