Created
March 21, 2011 01:41
-
-
Save kennethkufluk/878891 to your computer and use it in GitHub Desktop.
Hides the details pane from NewTwitter (Chrome)
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
// ==UserScript== | |
// @name Twitter No Details | |
// @description Removes the details pane from NewTwitter | |
// @version 1.0 | |
// @author KennethKufluk | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js | |
// @include http://twitter.com/* | |
// @include https://twitter.com/* | |
// ==/UserScript== | |
(twitterLoaded = function() { | |
if (document.body.className.match('loading')) { | |
setTimeout(twitterLoaded, 500); | |
} else { | |
var script = document.createElement("script"); | |
script.textContent = "(" + updateTwitterND.toString() + ")();"; | |
document.body.appendChild(script); | |
} | |
})(); | |
var updateTwitterND = function() { | |
$('.profile-dashboard').hide(); | |
$('#page-container').css({ | |
'min-width':'540px', | |
'max-width':'540px', | |
'margin': '0 auto' | |
}); | |
var page = twttr.app.currentPage(); | |
var oldOpen = page.openDetailsPane; | |
page.openDetailsPane = function() { | |
$('#page-container').css({ | |
'margin': '0 40px' | |
}); | |
oldOpen.apply(page); | |
}; | |
var oldClose = page.closeDetailsPane; | |
page.closeDetailsPane = function() { | |
$('#page-container').css({ | |
'margin': '0 auto' | |
}); | |
oldClose.apply(page); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment