Created
October 14, 2012 20:38
-
-
Save chrisinajar/3889750 to your computer and use it in GitHub Desktop.
better chat window
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
// Make a bookmark with this in it: | |
javascript:(function(){$("#button-chat-expand").click(function() {$("#chat").animate({top:0})}); $("#button-chat-collapse").click(function() {$("#chat").animate({top:285})});$("#chat").css($("#playback").position()).width(842);$("#chat-messages").width(823); $.each(document.styleSheets, function(i, styleSheet) { $.each(styleSheet.cssRules, function(j, rule) { if (rule.selectorText == '.chat-message, .chat-mention, .chat-emote, .chat-skip, .chat-moderation, .chat-system, .chat-update' || rule.selectorText == '.chat-superuser' || rule.selectorText == '.chat-moderator') rule.style.width = '788px'; })});})(); |
window.customStyle = document.createElement('style');
document.head.appendChild(window.customStyle);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a quick way of making css changes on the fly for plug.fm, probably not the cleanest thing in the world but good for development.
The various rules are pretty useful for modding the chat window to take up the space where the video used to be.
var rules = [];
rules.push('#playback { display: none !important; }');
rules.push('#chat { width: 842px !important; left: 521px !important; }');
rules.push('#chat-input-field {width: 788px !important; }');
rules.push('#bottom-chat-line {width: 842px !important; }');
rules.push('#top-chat-line {width: 842px !important; }');
rules.push('#chat-header {width: 842px !important; }');
rules.push('#chat-messages { width: 827px !important; }');
rules.push('.chat-message, .chat-mention, .chat-emote, .chat-skip, .chat-moderation, .chat-system, .chat-update { width: 802px !important; }');
rules.push('#chat-mention-suggestion { left: 526px !important; }');
window.customStyle.innerHTML = rules.join(' ');