Last active
May 7, 2018 23:37
-
-
Save tomhodgins/765c52786feaceadf912d84e4e19c8ec to your computer and use it in GitHub Desktop.
This file contains 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
// Create tags | |
var q1 = document.createElement('iframe'), | |
q2 = document.createElement('iframe'), | |
q3 = document.createElement('iframe'), | |
style = document.createElement('style'); | |
// Set attribute | |
q1.setAttribute('data-s',''); | |
q2.setAttribute('data-s',''); | |
q3.setAttribute('data-s',''); | |
// Set URL | |
q1.src = 'https://twitter.com/search?f=tweets&vertical=default&q=%23Turkey&src=typd'; | |
q2.src = 'https://twitter.com/search?f=tweets&vertical=default&q=%23TurkeyCoup&src=typd'; | |
q3.src = 'https://twitter.com/search?f=tweets&vertical=default&q=%23Istanbul&src=typd'; | |
// Set styles | |
style.innerHTML = '[data-s]{box-sizing:border-box;width:33.33vw;height:100vh;border:none;float:left;border-right:1px solid black}[data-s]:last-of-type{border-right:none}'; | |
// Remove body content | |
document.body.innerHTML = ''; | |
// Replace with same-origin iframes | |
document.body.appendChild(q1); | |
document.body.appendChild(q2); | |
document.body.appendChild(q3); | |
document.body.appendChild(style); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment