mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Display no category by default on the wallet page
This commit is contained in:
parent
e3614f182b
commit
4b7da55f46
2 changed files with 18 additions and 7 deletions
|
@ -688,7 +688,7 @@ wallets:
|
|||
|
||||
<div class="wallets walletsmobile" id="walletsmobile"></div>
|
||||
|
||||
<script>if(isMobile())walletShowPlatform('mobile');else walletShowPlatform('desktop');</script>
|
||||
<script>if (isMobile()) walletShowPlatform('mobile'); else walletShowPlatform('default');</script>
|
||||
|
||||
<div class="walletsdisclaimer">
|
||||
<h2><img src="/img/icons/warning.svg" class="warningicon" alt="warning">{% translate educate %}</h2>
|
||||
|
|
23
js/main.js
23
js/main.js
|
@ -527,9 +527,11 @@ for (var i = 0, nds = document.getElementById('walletmenu').getElementsByTagName
|
|||
nds[i].removeAttribute('data-active');
|
||||
removeClass(nds[i].parentNode, 'active');
|
||||
}
|
||||
t.setAttribute('data-active', '1');
|
||||
addClass(t.parentNode, 'active');
|
||||
if (t.parentNode.parentNode.parentNode.nodeName == 'LI') addClass(t.parentNode.parentNode.parentNode, 'active');
|
||||
if (platform != 'default') {
|
||||
t.setAttribute('data-active', '1');
|
||||
addClass(t.parentNode, 'active');
|
||||
if (t.parentNode.parentNode.parentNode.nodeName == 'LI') addClass(t.parentNode.parentNode.parentNode, 'active');
|
||||
}
|
||||
// Replace wallets by those for given platform and rotate.
|
||||
var p = document.getElementById('wallets');
|
||||
var ti = 200;
|
||||
|
@ -542,9 +544,18 @@ p.setAttribute('timeout', setTimeout(function() {
|
|||
if (nds[i].nodeType != 1) continue;
|
||||
var id = nds[i].id.split('-')[1];
|
||||
if (document.getElementById('wallet-' + id)) continue;
|
||||
if (document.getElementById('wallet-' + id + '-' + platform)) var nd = document.getElementById('wallet-' + id + '-' + platform);
|
||||
else if (document.getElementById('wallet-' + id + '-' + fallback) && document.getElementById('wallet-' + id + '-' + fallback).getAttribute('data-walletcompat').indexOf(platform) !== -1) var nd = document.getElementById('wallet-' + id + '-' + fallback);
|
||||
else continue;
|
||||
var nd = null;
|
||||
if (platform == 'default') {
|
||||
var defpl = ['desktop', 'mobile'];
|
||||
for (var ii = 0, nn = defpl.length; ii < nn; ii++) {
|
||||
if (document.getElementById('wallet-' + id + '-' + defpl[ii])) var nd = document.getElementById('wallet-' + id + '-' + defpl[ii]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (document.getElementById('wallet-' + id + '-' + platform)) var nd = document.getElementById('wallet-' + id + '-' + platform);
|
||||
else if (document.getElementById('wallet-' + id + '-' + fallback) && document.getElementById('wallet-' + id + '-' + fallback).getAttribute('data-walletcompat').indexOf(platform) !== -1) var nd = document.getElementById('wallet-' + id + '-' + fallback);
|
||||
}
|
||||
if (nd === null) continue;
|
||||
nd = nd.cloneNode(true);
|
||||
nd.id = 'wallet-' + id;
|
||||
addClass(nd, 'nohover');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue