Skip to content

Commit

Permalink
don't show error message while iframe fades in hakimel#1577
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Dec 13, 2016
1 parent 001d4d9 commit f2bd9d2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
18 changes: 18 additions & 0 deletions css/reveal.css
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ body {
display: inline-block;
width: 40px;
height: 40px;
line-height: 36px;
padding: 0 10px;
float: right;
opacity: 0.6;
Expand Down Expand Up @@ -1188,6 +1189,23 @@ body {
opacity: 1;
visibility: visible; }

.reveal .overlay.overlay-preview.loaded .viewport-inner {
position: absolute;
z-index: -1;
left: 0;
top: 45%;
width: 100%;
text-align: center;
letter-spacing: normal; }

.reveal .overlay.overlay-preview .x-frame-error {
opacity: 0;
-webkit-transition: opacity 0.3s ease 0.3s;
transition: opacity 0.3s ease 0.3s; }

.reveal .overlay.overlay-preview.loaded .x-frame-error {
opacity: 1; }

.reveal .overlay.overlay-preview.loaded .spinner {
opacity: 0;
visibility: hidden;
Expand Down
10 changes: 9 additions & 1 deletion css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,7 @@ body {
display: inline-block;
width: 40px;
height: 40px;
line-height: 36px;
padding: 0 10px;
float: right;
opacity: 0.6;
Expand Down Expand Up @@ -1250,11 +1251,18 @@ body {
position: absolute;
z-index: -1;
left: 0;
top: 60px;
top: 45%;
width: 100%;
text-align: center;
letter-spacing: normal;
}
.reveal .overlay.overlay-preview .x-frame-error {
opacity: 0;
transition: opacity 0.3s ease 0.3s;
}
.reveal .overlay.overlay-preview.loaded .x-frame-error {
opacity: 1;
}

.reveal .overlay.overlay-preview.loaded .spinner {
opacity: 0;
Expand Down
2 changes: 1 addition & 1 deletion js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@
'<div class="viewport">',
'<iframe src="'+ url +'"></iframe>',
'<small class="viewport-inner">',
'This link is refused to display in a frame due to its policy',
'<span class="x-frame-error">Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).</span>',
'</small>',
'</div>'
].join('');
Expand Down

0 comments on commit f2bd9d2

Please sign in to comment.