Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore events which are not relevant for this module's event listener #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion view/adminhtml/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<script src="Trustpilot_Reviews::js/admin.min.js"/>
<script src="Trustpilot_Reviews::js/admin.js"/>
<css src="Trustpilot_Reviews::css/trustpilot.min.css"/>
<css src="Trustpilot_Reviews::css/trustpilot-message.min.css"/>
</head>
Expand Down
5 changes: 5 additions & 0 deletions view/adminhtml/web/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ function receiveSettings(e) {
if (e.origin === location.origin){
return receiveInternalData(e);
}

const iframe = document.getElementById('configuration_iframe');
if (!iframe) {
return;
}

const attrs = iframe.dataset;
if (e.origin !== attrs.transfer) {
return;
Expand Down
2 changes: 0 additions & 2 deletions view/adminhtml/web/js/admin.min.js

This file was deleted.

1 change: 0 additions & 1 deletion view/adminhtml/web/js/admin.min.js.map

This file was deleted.