Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SEO script to view page on-page content fast.
(function() {
document.querySelectorAll('[style]').forEach(el => el.removeAttribute('style'));
document.querySelectorAll('link[rel="stylesheet"]').forEach(el => el.parentNode.removeChild(el));
document.querySelectorAll('style').forEach(el => el.parentNode.removeChild(el));
var temp = document.createElement('div');
temp.innerHTML = `
<link rel="stylesheet" href="https://unpkg.com/chota@latest">
<style>
body { padding: 20px; }
.row { display: block; }
.col, [class*=" col-"], [class^=col-] {
margin: 0;
}
* {
text-align: left !important;
}
table td {
border: 1px solid #999;
}
img {
max-width:100%;
height:auto
}
</style>
`;
var head = document.head;
while (temp.firstChild) {
head.appendChild(temp.firstChild);
}
}());
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.