Skip to content
This repository was archived by the owner on Feb 12, 2023. It is now read-only.

Commit cb86e6e

Browse files
author
Ke, Mingze
committed
Added origin for postMessage
1 parent 99da9b8 commit cb86e6e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎chrome-extension/contentScript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}, false);
2323

2424
function receiveMessage(msg) {
25-
window.postMessage(msg, '*');
25+
window.postMessage(msg, window.location.origin);
2626
}
2727

2828
function onDisconnect() {

‎chrome-extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "API Proxy Agent for Google Chrome™",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"manifest_version": 2,
55
"minimum_chrome_version": "23",
66
"content_scripts": [{

‎lib/chrome._api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ chrome._api = (function (window) {
5252
id: id,
5353
method: method,
5454
params: params
55-
}, '*');
55+
}, window.location.origin);
5656
}
5757

5858
window.addEventListener('message', function (event) {

0 commit comments

Comments
 (0)