document.body.querySelectorAll('link[rel=stylesheet]').forEach(function (el) { document.head.appendChild(el); });