Skip to content

Instantly share code, notes, and snippets.

@micflan
Last active August 29, 2015 14:05
Show Gist options
  • Save micflan/b6a5ff36f68ee49e4746 to your computer and use it in GitHub Desktop.
Save micflan/b6a5ff36f68ee49e4746 to your computer and use it in GitHub Desktop.
Removes the width/height restrictions on Twitter's media viewer
// ==UserScript==
// @name Twitter Large Media Viewer
// @namespace http://michael.flanagan.ie/
// @version 0.1
// @description Removes the width/height restrictions on Twitter's media viewer
// @match https://twitter.com/*
// @copyright 2014+, Michael Flanagan
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('.Gallery-content { width: auto !important; height: auto !important; }');
addGlobalStyle('.Gallery-media img { width: auto !important; height: auto !important; }');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment