Skip to content

Instantly share code, notes, and snippets.

View moreinthemiddle's full-sized avatar

moreinthemiddle

View GitHub Profile
document.querySelectorAll('a.still-image').forEach(e=>{e.children[0].src=e.href})
document.querySelectorAll('div.attachments, div.gallery-row, div.attachment.image, a.still-image, a.still-image > img').forEach(e=>{e.style='max-height: unset; display: unset;'})
document.querySelector('nav').style='transform-origin: top left; transform: scale(1,0.25)'
document.querySelector('.timeline-container').style='width:100% !important'
@moreinthemiddle
moreinthemiddle / see-twitter-images.js
Last active September 12, 2021 04:54
Twitter is kind of dumb about letting you see images without zooming in. This scripts fixes that, if in a really hacky way
setInterval(()=>{
let increase = 500
let maxHeight = '800px'
let div4 = ' > div'.repeat(4)
let select = document.querySelector.bind(document)
let selectAll = document.querySelectorAll.bind(document)
let getBounds = el => el.parentElement.parentElement.getBoundingClientRect()
let reactCSS = Array.from(select('#react-native-stylesheet').sheet.rules)
reactCSS.forEach(r => {
if (r.style) {
@moreinthemiddle
moreinthemiddle / shindan-explorer.js
Last active April 15, 2020 18:56
script to explore a shindanmaker.com shindan more quickly than manually entering names
$('#form').on('submit', function ( event ) {
event.preventDefault()
const input = $('.input-lg.shindanuser')[0]
const name = input.value
input.value = Math.random()
const fd = new FormData($('#form')[0])
const xhr = new XMLHttpRequest()
xhr.open('POST', location)