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
13
js/main.js
13
js/main.js
|
@ -115,6 +115,19 @@ for (var i = 0, n = domPrefixes.length; i < n; i++) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function loadYoutubeVideo(e) {
|
||||
// Load Youtube video on target node on click.
|
||||
var t = getEventTarget(e),
|
||||
nd = document.createElement('IFRAME');
|
||||
while (t.getAttribute('data-youtubeurl') === null || t.getAttribute('data-youtubeurl') === '') t = t.parentNode;
|
||||
nd.src = t.getAttribute('data-youtubeurl');
|
||||
nd.setAttribute('frameborder', 0);
|
||||
nd.setAttribute('allowfullscreen', true);
|
||||
t.innerHTML = '';
|
||||
t.appendChild(nd);
|
||||
t.onclick = '';
|
||||
}
|
||||
|
||||
function boxShow(e) {
|
||||
// Display the box content when the user click a box on the "Secure your wallet" page.
|
||||
var p = t = getEventTarget(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue