diff --git a/src/components/views/messages/MFileBody.js b/src/components/views/messages/MFileBody.js
index d17a1c4ce3c..770cd4fff38 100644
--- a/src/components/views/messages/MFileBody.js
+++ b/src/components/views/messages/MFileBody.js
@@ -288,7 +288,7 @@ export default class MFileBody extends React.Component {
diff --git a/src/usercontent/index.js b/src/usercontent/index.js
index 2e87e182af4..6ecd17dcd72 100644
--- a/src/usercontent/index.js
+++ b/src/usercontent/index.js
@@ -1,10 +1,3 @@
-const params = window.location.search.substring(1).split('&');
-let lockOrigin;
-for (let i = 0; i < params.length; ++i) {
- const parts = params[i].split('=');
- if (parts[0] === 'origin') lockOrigin = decodeURIComponent(parts[1]);
-}
-
function remoteRender(event) {
const data = event.data;
@@ -45,7 +38,7 @@ function remoteSetTint(event) {
}
window.onmessage = function(e) {
- if (e.origin === lockOrigin) {
+ if (e.origin === window.location.origin) {
if (e.data.blob) remoteRender(e);
else remoteSetTint(e);
}