Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kozlov authored and Andrey Kozlov committed Jun 7, 2022
1 parent 4afbf06 commit 1d97656
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/iframeResizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ addEventListener('message', function(e) {
const iframe = document.createElement('iframe');
document.body.appendChild(iframe);
window.landscapeappModalIframe = iframe;
const search = e.data.location.search || '?a=a';
const src = e.data.location.pathname.replace('/pages/', '/pages-modal/') + search + '&selected=' + e.data.selected;
const url = new URL(document.querySelector('#landscape').src);
const search = url.search || '?a=a';
const src = url.pathname.replace('/pages/', '/pages-modal/') + search + '&selected=' + e.data.selected;
iframe.src = src;
iframe.style.position = 'fixed';
iframe.style.left = 0;
Expand Down

0 comments on commit 1d97656

Please sign in to comment.