Skip to content

Commit

Permalink
update to be able to replace {localhost} by accessing url
Browse files Browse the repository at this point in the history
  • Loading branch information
benkuper committed Nov 10, 2022
1 parent b8449f4 commit 80ba7d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/iframe-container.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
@control={{@control}}
@showLabel={{ this.showLabel }}
>
<iframe src={{@control.url}} width={{@control.width}} height={{@control.height}} />
<iframe src={{@control.parsedUrl}} width={{@control.width}} height={{@control.height}} />
{{yield}}
</ControlContainer>
4 changes: 4 additions & 0 deletions app/models/iframe-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ import Control from './control';

export default class TextureControl extends Control {
@attr("string") url

get parsedUrl() {
return this.url.replace("{localhost}", window.location.hostname);
}
}

0 comments on commit 80ba7d3

Please sign in to comment.