Last active
August 29, 2015 14:05
-
-
Save micflan/b6a5ff36f68ee49e4746 to your computer and use it in GitHub Desktop.
Removes the width/height restrictions on Twitter's media viewer
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
// ==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