Skip to content

Commit

Permalink
switch to document.location.origin
Browse files Browse the repository at this point in the history
  • Loading branch information
amitbl committed May 27, 2018
1 parent 3336216 commit a371948
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/scripts/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
from: 'BLOCKTUBE_CONTENT',
type: 'storageData',
data: compiledStorage || globalStorage,
}, `https://${document.domain}`);
}, document.location.origin);
},
inject() {
const s = document.createElement('script');
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
// !! Utils

function postMessage(type, data) {
window.postMessage({ from: 'BLOCKTUBE_PAGE', type, data }, `https://${document.domain}`);
window.postMessage({ from: 'BLOCKTUBE_PAGE', type, data }, document.locaion.origin);
}

function getObjectByPath(obj, path, def = undefined) {
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
}

function postMessage(type, data) {
window.postMessage({ from: 'BLOCKTUBE_PAGE', type, data }, `https://${document.domain}`);
window.postMessage({ from: 'BLOCKTUBE_PAGE', type, data }, document.location.origin);
}

if (window.writeEmbed || window.ytplayer || window.Polymer) {
Expand Down

0 comments on commit a371948

Please sign in to comment.