Last active
October 11, 2015 18:03
-
-
Save saschanaz/26a079f5fec7d3a32ea9 to your computer and use it in GitHub Desktop.
갤털
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
| document.addEventListener("keyup", (ev) => { | |
| if (!(ev.keyCode === 80 && ev.altKey)) { | |
| return; | |
| } | |
| styleItems(); | |
| function styleItems() { | |
| let items = Array.from(document.querySelectorAll(".expanding-stream-item")); | |
| let nonPhotos = items.filter((item) => !item.querySelector("div[data-card-type=photo]")); | |
| for (let nonPhoto of nonPhotos) { | |
| nonPhoto.parentElement.removeChild(nonPhoto); | |
| } | |
| let photos = items.filter((item) => item.querySelector("div[data-card-type=photo]")); | |
| for (let photo of photos) { | |
| if (photo.dataset.snGaltulProcessed || photo.querySelector(".multi-photo")) { | |
| continue; | |
| } | |
| let a = photo.querySelector("a.is-preview"); | |
| let img = a.querySelector("div.is-preview img"); | |
| a.style.maxHeight = "none"; | |
| img.style.marginTop = ""; | |
| photo.dataset.snGaltulProcessed = true; | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment