Created
October 6, 2019 02:40
-
-
Save sajjadmd/8dd53c1159024b8501ea341205a7a755 to your computer and use it in GitHub Desktop.
SEO script to view page on-page content fast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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