Spaces:
Running
Running
Download assets/map.js from DFORU/dfo-wiki: direct link, hf CLI and curl.
- Browser
- Download file 964 Bytes
-
https://huggingface.co/spaces/DFORU/dfo-wiki/resolve/main/assets/map.js
- Command line
-
hf download hf://spaces/DFORU/dfo-wiki/assets/map.js
-
curl -L -o map.js https://huggingface.co/spaces/DFORU/dfo-wiki/resolve/main/assets/map.js
964 Bytes
| /* Переключение вкладок на странице карты. */ | |
| (function () { | |
| 'use strict'; | |
| var tabs = Array.prototype.slice.call(document.querySelectorAll('[data-map-tab]')); | |
| if (!tabs.length) return; | |
| var panes = { | |
| live: document.getElementById('pane-live'), | |
| scheme: document.getElementById('pane-scheme') | |
| }; | |
| function select(key) { | |
| tabs.forEach(function (t) { | |
| var on = t.getAttribute('data-map-tab') === key; | |
| t.classList.toggle('on', on); | |
| t.setAttribute('aria-selected', on ? 'true' : 'false'); | |
| }); | |
| Object.keys(panes).forEach(function (k) { | |
| if (panes[k]) panes[k].hidden = (k !== key); | |
| }); | |
| try { | |
| if (history.replaceState) history.replaceState(null, '', '#' + key); | |
| } catch (e) {} | |
| } | |
| tabs.forEach(function (t) { | |
| t.addEventListener('click', function () { select(t.getAttribute('data-map-tab')); }); | |
| }); | |
| if (location.hash === '#scheme') select('scheme'); | |
| })(); | |