session import and export

This commit is contained in:
subhra74 2020-04-27 02:13:52 +02:00
parent 6245a712f7
commit 89c8ccc8b4
4 changed files with 69 additions and 44 deletions

View File

@ -1,7 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="bg.js"></script>
</head>
<body></body>
</html>

View File

@ -426,7 +426,7 @@
(
function (info) { requests.push(info); },
{ urls: ["http://*/*", "https://*/*"] },
["requestHeaders"]
["requestHeaders"] // on chrome "extraHeaders" also needs to be added?
);
chrome.webRequest.onCompleted.addListener
(
@ -541,6 +541,24 @@
contexts: ["all"],
onclick: runContentScript,
});
/*
On startup, connect to the "native" app.
*/
var port = browser.runtime.connectNative("xdmff.native_host");
/*
Listen for messages from the app.
*/
port.onMessage.addListener((response) => {
console.log("Received: " + response);
});
/*
On start up send the app a message.
*/
console.log("Sending to native...")
port.postMessage("hello from extension");
};
initSelf();

View File

@ -3,7 +3,7 @@
"minimum_chrome_version": "18.0",
"name": "XDM Browser Monitor",
"description": "XDM integration module for Firefox Quantum",
"version": "2.1",
"version": "2.2",
"icons": {
"48": "icon.png"
},
@ -20,6 +20,7 @@
"activeTab",
"webRequest",
"webRequestBlocking",
"nativeMessaging",
"*://*/*"
],
"applications": {