Skip to content

Commit

Permalink
Makes height work on allowed domains.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Jan 9, 2024
1 parent e2ad0f8 commit 088acef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/php/Component/Iframe/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,6 @@ private function buildEmbedUrl($src)
* @return string|false The extracted domain or false if not available.
*/
private function getDomainFromUrl($url) {
parse_url($url)['host'];
return parse_url($url)['host'];
}
}
6 changes: 4 additions & 2 deletions source/php/Component/Iframe/iframe.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ function(e) {
return;
}
const acceptance = document.querySelector('#acceptance-{{$id}}');
const iframe = acceptance?.querySelector('#{{$id}}');
const iframe = document.querySelector('#{{$id}}');
const message = e.data;
if(acceptance && message && message.height) {
acceptance.style.height = message.height + 'px';
}
if(iframe && message && message.height) {
iframe.height = message.height;
acceptance.style.height = message.height + 'px';
}
},
false
Expand Down

0 comments on commit 088acef

Please sign in to comment.