title | layout |
---|---|
index |
default |
Desktop
Android
iOS
<script>
document.querySelector('#select-platform').addEventListener('click', function once(e) {
if (e.target.className.match(/select/)) {
e.target.classList.add('selected');
e.currentTarget.classList.add('selected');
document.querySelector('#select-adblock').classList.remove('collapsed');
document.querySelector('#' + e.target.dataset.target).classList.remove('collapsed');
e.currentTarget.removeEventListener('click', once);
}
});
document.querySelector('#select-adblock').addEventListener('click', function once(e) {
if (e.target.className.match(/select/)) {
e.target.classList.add('selected');
e.target.parentNode.classList.add('selected');
fetch(e.target.href)
.then(function (r) {
return r.text();
}).then(function (t) {
return document.createRange().createContextualFragment(t).querySelector('.o-techdocs-main');
}).then(function (content) {
document.querySelector('#ajax-target').appendChild(content);
});
e.preventDefault();
}
});
</script>