-
-
Save clizzin/2364590 to your computer and use it in GitHub Desktop.
Revisions
-
clizzin revised this gist
Apr 12, 2012 . 2 changed files with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ * Indent the messages so they all start at the same spot. * Use Shift-Up and Shift-Down to switch between channels. * Focus the message input field whenever you click anywhere in the window. * Eliminate the annoying image flash between when it's inserted and when it's resized. Props to [reissbaker](https://github.com/reissbaker) and [h4rry](https://github.com/h4rry) for the foundations of this gist. 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 charactersOriginal file line number Diff line number Diff line change @@ -17,4 +17,9 @@ /* This bit looks janky if your window is too narrow. :( */ .attachments { margin-left: 94px; } .attachments .image { max-height: 200px; max-width: 200px; } -
clizzin revised this gist
Apr 12, 2012 . 2 changed files with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ * Only show the user name and avatar for the first message in a group of messages by that user. * Indent the messages so they all start at the same spot. * Use Shift-Up and Shift-Down to switch between channels. * Focus the message input field whenever you click anywhere in the window. Props to [reissbaker](https://github.com/reissbaker) and [h4rry](https://github.com/h4rry) for the foundations of this gist. 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 charactersOriginal file line number Diff line number Diff line change @@ -65,4 +65,6 @@ $(document).bind('keydown', function(e){ App.router.routePath(App.channels.at(nextIndex).get('app_url')) return false; } }); $('.main-wrapper').click(function(){ App.channelView.focusMessageForm(); }) -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 31 additions and 30 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,43 +3,44 @@ // Only show user name and avatar for first message in a group of messages // Thanks to reissbaker for the first iteration of this functionality. window.onload = function(e) { !function($, App) { var initialized = false; var updateUI = function() { var $pic, $picLI, index, $prevLI, $prevPic, $picSeparator, $picContent, $pics = $('.userpic img' + (!initialized ? '' : ':visible')), SPACING = '3px'; initialized = true; for(index = $pics.length - 1; index >= 0; index--) { $pic = $($pics[index]); $picLI = $pic.closest('li'); if($picLI.attr('data-seen')) break; $picLI.attr('data-seen', true); $prevLI = $picLI.prev(); if($prevLI) { $prevPic = $prevLI.find('.userpic img'); $picSeparator = $picLI.find('.separator'); if($prevPic.attr('src') === $pic.attr('src')) { $pic.css('visibility', 'hidden'); $picLI.find('.user').css('visibility', 'hidden'); $picSeparator.hide(); $picLI.css('margin-top', '-5px'); } } } }; App.on('newMessage', updateUI); App.on('newPrivateMessage', updateUI); App.on('routeClicked', updateUI); updateUI(); }(jQuery, App) } // shift+up and shift+down to move between channels // Thanks to h4rry for this bit. -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,9 @@ # Make the Grove web client look like this [](http://cl.ly/2E0J262R2a1Z2X1y0N3Z) * Only show the user name and avatar for the first message in a group of messages by that user. * Indent the messages so they all start at the same spot. * Use Shift-Up and Shift-Down to switch between channels. Props to [reissbaker](https://github.com/reissbaker) and [h4rry](https://github.com/h4rry) -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ Make the Grove web client look like this [](http://cl.ly/2E0J262R2a1Z2X1y0N3Z) * Only show the user name and avatar for the first message in a group of messages by that user. * Indent the messages so they all start at the same spot. -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,5 @@ Additional functionality: Props to [reissbaker](https://github.com/reissbaker) and [h4rry](https://github.com/h4rry) for the foundations of this gist. *This is an [Airbnb nerds](http://airbnb.com/jobs/departments/engineering) production. If you like this, check out other [sweet JS work](http://airbnb.github.com/backpack.js/).* -
clizzin revised this gist
Apr 12, 2012 . 2 changed files with 11 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,4 +5,9 @@ Make the Grove web client look like this: http://cl.ly/2E0J262R2a1Z2X1y0N3Z Additional functionality: * Use Shift-Up and Shift-Down to switch between channels. Props to [reissbaker](https://github.com/reissbaker) and [h4rry](https://github.com/h4rry) for the foundations of this gist. This is an [Airbnb nerds](http://airbnb.com/jobs/departments/engineering) production. 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 charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,9 @@ .message { overflow: auto; } /* This bit looks janky if your window is too narrow. :( */ .attachments { margin-left: 94px; } -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Make the Grove web client look like this: http://cl.ly/2E0J262R2a1Z2X1y0N3Z * Only show the user name and avatar for the first message in a group of messages by that user. * Indent the messages so they all start at the same spot. Additional functionality: -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ // Add this to the User Scripts of your Fluid App // Only show user name and avatar for first message in a group of messages // Thanks to reissbaker for the first iteration of this functionality. !function($, App) { var initialized = false; @@ -42,9 +41,8 @@ }(jQuery, App) // shift+up and shift+down to move between channels // Thanks to h4rry for this bit. $(document).bind('keydown', function(e){ var shifted = e.shiftKey; -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ // Add this to the User Scripts of your Fluid App // Thanks to reissbaker for the first iteration of this bit. // // Only show user name and avatar for first message in a group of messages !function($, App) { @@ -43,10 +45,6 @@ // Thanks to h4rry for this next bit. // // shift+up and shift+down to move between channels $(document).bind('keydown', function(e){ var shifted = e.shiftKey; -
clizzin revised this gist
Apr 12, 2012 . 3 changed files with 43 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,8 @@ Make the Grove web client look like this: http://cl.ly/2E0J262R2a1Z2X1y0N3Z * Only show the user name and avatar for the first message in a group of messages by that user. * Indent the messages so they all start at the spot. Additional functionality: * Use Shift-Up and Shift-Down to switch between channels. 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ /* Add this to the User Styles of your Fluid App */ .content { float: left; width: 80%; 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ /* Add this to the User Scripts of your Fluid App */ // Only show user name and avatar for first message in a group of messages !function($, App) { var initialized = false; var updateUI = function() { @@ -33,4 +37,35 @@ App.on('newPrivateMessage', updateUI); App.on('routeClicked', updateUI); updateUI(); }(jQuery, App) // Thanks to h4rry for this next bit. // // shift+up and shift+down to move between channels // // copy and paste into the console // or if you're using Fluid.app put // in Userscripts $(document).bind('keydown', function(e){ var shifted = e.shiftKey; if (e.keyCode == 40 && shifted) { var length = App.channels.length - 1, curIndex = App.channels.indexOf(currentChannel), nextIndex = curIndex + 1; if (nextIndex > length) nextIndex = 0; App.router.routePath(App.channels.at(nextIndex).get('app_url')) return false; } if (e.keyCode == 38 && shifted) { var length = App.channels.length - 1, curIndex = App.channels.indexOf(currentChannel), nextIndex = curIndex - 1; if (nextIndex < 0) nextIndex = length; App.router.routePath(App.channels.at(nextIndex).get('app_url')) return false; } }); -
clizzin renamed this gist
Apr 12, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ Make the Grove web client look like this: http://cl.ly/2E0J262R2a1Z2X1y0N3Z * Only show the user name and avatar for the first message in a group of messages by that user. * Indent the messages so they all start at the spot. -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ .content { float: left; width: 80%; } .user { float: left; width: 100px; } .message { overflow: auto; } -
clizzin revised this gist
Apr 12, 2012 . 1 changed file with 2 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,20 +20,10 @@ $prevPic = $prevLI.find('.userpic img'); $picSeparator = $picLI.find('.separator'); if($prevPic.attr('src') === $pic.attr('src')) { $pic.css('visibility', 'hidden'); $picLI.find('.user').css('visibility', 'hidden'); $picSeparator.hide(); $picLI.css('margin-top', '-5px'); } } } -
reissbaker revised this gist
Apr 12, 2012 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ !function($, App) { var initialized = false; var updateUI = function() { @@ -43,5 +41,6 @@ App.on('newMessage', updateUI); App.on('newPrivateMessage', updateUI); App.on('routeClicked', updateUI); updateUI(); }(jQuery, App) -
reissbaker revised this gist
Apr 12, 2012 . 1 changed file with 13 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,15 @@ // close, couple edge cases left but should be pretty efficient !function($, App) { var initialized = false; var updateUI = function() { var $pic, $picLI, index, $prevLI, $prevPic, $picSeparator, $picContent, $pics = $('.userpic img' + (!initialized ? '' : ':visible')), SPACING = '3px'; initialized = true; for(index = $pics.length - 1; index >= 0; index--) { $pic = $($pics[index]); $picLI = $pic.closest('li'); @@ -35,7 +38,10 @@ $picLI.css('margin-top', SPACING); } } } }; App.on('newMessage', updateUI); App.on('newPrivateMessage', updateUI); updateUI(true); }(jQuery, App) -
reissbaker revised this gist
Apr 11, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ setInterval(function() { var $pic, $picLI, index, $prevLI, $prevPic, $picSeparator, $picContent, $pics = $('.userpic img:visible'), SPACING = '3px'; for(index = $pics.length - 1; index >= 0; index--) { -
reissbaker revised this gist
Apr 11, 2012 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,8 @@ setInterval(function() { var $pic, $picLI, index, $prevLI, $prevPic, $picSeparator, $picContent, $pics = $('.userpic img'), SPACING = '3px'; for(index = $pics.length - 1; index >= 0; index--) { $pic = $($pics[index]); @@ -25,13 +26,13 @@ } else { $picSeparator.css({ 'border-bottom': '1px solid #EAEAEA', 'margin-bottom': SPACING }); $picLI.find('.content').css({ display: 'block', 'margin-top': '9px' }); $picLI.css('margin-top', SPACING); } } -
reissbaker revised this gist
Apr 11, 2012 . 1 changed file with 12 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,8 @@ var INTERVAL = 100; setInterval(function() { var $pic, $picLI, index, $prevLI, $prevPic, $picSeparator, $picContent, $pics = $('.userpic img'); for(index = $pics.length - 1; index >= 0; index--) { @@ -20,8 +21,17 @@ $pic.hide(); $picLI.find('.user').hide(); $picSeparator.hide(); $picLI.css('margin-top', '-5px'); } else { $picSeparator.css({ 'border-bottom': '1px solid #EAEAEA', 'margin-bottom': '3px' }); $picLI.find('.content').css({ display: 'block', 'margin-top': '9px' }); $picLI.css('margin-top', '3px'); } } -
reissbaker created this gist
Apr 11, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ !function($) { var INTERVAL = 100; setInterval(function() { var $pic, $picLI, index, $prevLI, $prevPic, $picSeparator, $pics = $('.userpic img'); for(index = $pics.length - 1; index >= 0; index--) { $pic = $($pics[index]); $picLI = $pic.closest('li'); if($picLI.attr('data-seen')) break; $picLI.attr('data-seen', true); $prevLI = $picLI.prev(); if($prevLI) { $prevPic = $prevLI.find('.userpic img'); $picSeparator = $picLI.find('.separator'); if($prevPic.attr('src') === $pic.attr('src')) { $pic.hide(); $picLI.find('.user').hide(); $picSeparator.hide(); } else { $picSeparator.css('border-bottom', '1px solid #EAEAEA'); } } } }, INTERVAL); }(jQuery)