Skip to content

Instantly share code, notes, and snippets.

@matijs matijs/keepmain.js
Created Aug 16, 2017

Embed
What would you like to do?
(function(doc, body) {
const main = doc.querySelector('main').parentNode.removeChild(doc.querySelector('main'));
while (body.firstChild) body.removeChild(body.firstChild);
body.appendChild(main)
}(document, document.body));
javascript:void(function(doc,body){const main=doc.querySelector('main').parentNode.removeChild(doc.querySelector('main'));while(body.firstChild)body.removeChild(body.firstChild);body.appendChild(main)}(document, document.body));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.