mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Avoid duplicate code and non-reusable functions with hardcoded variables
This commit is contained in:
parent
17886b6564
commit
3d9c178df3
3 changed files with 15 additions and 28 deletions
15
index.html
15
index.html
|
@ -7,21 +7,8 @@ lang: en
|
|||
id: index
|
||||
title: Bitcoin
|
||||
---
|
||||
<script>
|
||||
function loadMainVideo() {
|
||||
var p = document.getElementById('mainvideo'),
|
||||
t = p.getElementsByTagName('DIV')[0],
|
||||
nd = document.createElement('IFRAME');
|
||||
nd.src = '//www.youtube.com/embed/Gc2en3nHxA4?rel=0&showinfo=0&wmode=opaque&autoplay=1{% if page.lang != 'en' %}&cc_load_policy=1&hl={{ page.lang }}&cc_lang_pref={{ page.lang }}{% endif %}';
|
||||
nd.setAttribute('frameborder', 0);
|
||||
nd.setAttribute('allowfullscreen', true);
|
||||
t.innerHTML = '';
|
||||
t.appendChild(nd);
|
||||
p.onclick = '';
|
||||
}
|
||||
</script>
|
||||
<p class="mainsummary">{% translate listintro %}</p>
|
||||
<div class="mainvideo" id="mainvideo" onclick="loadMainVideo();"><div>
|
||||
<div class="mainvideo"><div onclick="loadYoutubeVideo(event);" data-youtubeurl="//www.youtube.com/embed/Gc2en3nHxA4?rel=0&showinfo=0&wmode=opaque&autoplay=1{% if page.lang != 'en' %}&cc_load_policy=1&hl={{ page.lang }}&cc_lang_pref={{ page.lang }}{% endif %}">
|
||||
<img src="/img/video/video_wuc.jpg" alt="Youtube video">
|
||||
<div class="mainvideoicon"></div>
|
||||
<div class="mainvideoiconhover"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue