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 {
73
73
<div class="field"><p>Accept-Language header:</p></div>
74
74
<input class="w-100" id="lang" type="text" value="*" />
75
75
<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
+ )
78
81
</h3>
79
82
<iframe class="preview" src="~preview/${ sandBoxDefaultQs } "></iframe>` ;
80
83
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ oc.cmd.push(function() {
7
7
window.location = thisComponentHref + $(this).val() + '/~info';
8
8
});
9
9
10
- $('.refresh-preview').click( function() {
10
+ var refreshPreview = function() {
11
11
var splitted = $('#href')
12
12
.val()
13
13
.split('?'),
@@ -27,6 +27,17 @@ oc.cmd.push(function() {
27
27
28
28
$('.preview').attr('src', url);
29
29
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');
30
39
return false;
31
40
});
41
+
42
+
32
43
});` ;
You can’t perform that action at this time.
0 commit comments