File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,11 @@ export default function info(vm: Vm): string {
7373 <div class="field"><p>Accept-Language header:</p></div>
7474 <input class="w-100" id="lang" type="text" value="*" />
7575 <h3>
76- Preview
77- <a class="refresh-preview" href="#refresh">(Refresh)</a>
76+ Preview (
77+ <a class="refresh-preview" href="#refresh">Refresh</a>
78+ |
79+ <a class="open-preview" href="#open">Open</a>
80+ )
7881 </h3>
7982 <iframe class="preview" src="~preview/${ sandBoxDefaultQs } "></iframe>` ;
8083
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ oc.cmd.push(function() {
77 window.location = thisComponentHref + $(this).val() + '/~info';
88 });
99
10- $('.refresh-preview').click( function() {
10+ var refreshPreview = function() {
1111 var splitted = $('#href')
1212 .val()
1313 .split('?'),
@@ -27,6 +27,17 @@ oc.cmd.push(function() {
2727
2828 $('.preview').attr('src', url);
2929
30+ return false;
31+ };
32+ $('.refresh-preview').click(refreshPreview);
33+
34+ $('.open-preview').click(function() {
35+ refreshPreview();
36+ var url = $('.preview').attr('src');
37+
38+ window.open(url, '_blank');
3039 return false;
3140 });
41+
42+
3243});` ;
You can’t perform that action at this time.
0 commit comments