sync theme
This commit is contained in:
parent
8db6bd0e55
commit
8f3d03b188
53 changed files with 1747 additions and 213 deletions
|
@ -46,10 +46,23 @@ class LiteYTEmbed extends HTMLElement {
|
|||
|
||||
this.addNoscriptIframe();
|
||||
|
||||
playBtnEl.removeAttribute('href');
|
||||
// for the PE pattern, change anchor's semantics to button
|
||||
if(playBtnEl.nodeName === 'A'){
|
||||
playBtnEl.removeAttribute('href');
|
||||
playBtnEl.setAttribute('tabindex', '0');
|
||||
playBtnEl.setAttribute('role', 'button');
|
||||
// fake button needs keyboard help
|
||||
playBtnEl.addEventListener('keydown', e => {
|
||||
if( e.key === 'Enter' || e.key === ' ' ){
|
||||
e.preventDefault();
|
||||
this.activate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// On hover (or tap), warm up the TCP connections we're (likely) about to use.
|
||||
this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {once: true});
|
||||
this.addEventListener('focusin', LiteYTEmbed.warmConnections, {once: true});
|
||||
|
||||
// Once the user clicks, add the real iframe and drop our play button
|
||||
// TODO: In the future we could be like amp-youtube and silently swap in the iframe during idle time
|
||||
|
|
File diff suppressed because one or more lines are too long
2
themes/blowfish/assets/lib/zoom/zoom.min.js
vendored
Normal file
2
themes/blowfish/assets/lib/zoom/zoom.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue