Skip to content

Instantly share code, notes, and snippets.

@oflow
Last active August 29, 2015 14:07
Show Gist options
  • Save oflow/38f6bca493d7c639cbe6 to your computer and use it in GitHub Desktop.
Save oflow/38f6bca493d7c639cbe6 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Twitterの画像をでかく表示するやつ
// @description 画像:large付ける
// @include https://twitter.com/*/status/*
// ==/UserScript==
(function() {
let media = document.querySelector('.media-thumbnail.is-preview img');
if (!media) {
return;
}
let width = media.getAttribute('width');
document.getElementById('page-container').style.cssText = 'min-width: ' + width + 'px;';
media.style.cssText = 'width: auto; height: auto; max-width: 100%; max-height: 100%;';
media.src = media.src + ':large';
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment