Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.