Skip to content

Instantly share code, notes, and snippets.

@kennethkufluk
Created March 21, 2011 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethkufluk/878891 to your computer and use it in GitHub Desktop.
Save kennethkufluk/878891 to your computer and use it in GitHub Desktop.
Hides the details pane from NewTwitter (Chrome)
// ==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