Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Latest commit

 

History

History
56 lines (50 loc) · 1.94 KB

index.md

File metadata and controls

56 lines (50 loc) · 1.94 KB
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>