Created
November 26, 2010 12:17
-
-
Save czottmann/716636 to your computer and use it in GitHub Desktop.
A few quick'n'dirty IRCCloud-related bookmarklets.
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
var p = prompt( "People to hide, comma-separated" ), | |
sel = [], | |
chng = { | |
opacity: 0.3, | |
fontSize: "90%" | |
}; | |
if ( p ) { | |
p = $.trim( p ).split( /\s*,\s*/ ); | |
sel = $.map( p, function( name ) { | |
return ".author:contains('" + name + "')"; | |
}).join( ", " ); | |
$( "div.scroll" ) | |
.find( sel ) | |
.closest( "tr" ) | |
.css( chng ); | |
$( "div.scroll" ).bind( "DOMNodeInserted", function( evt ) { | |
$( evt.srcElement ) | |
.find( sel ) | |
.closest( "tr" ) | |
.css( chng ); | |
}); | |
} | |
// Bookmarklet version | |
javascript:var p=prompt("People to hide, comma-separated"),sel=[],chng={opacity:0.3,fontSize:"90%"};if(p){p=$.trim(p).split(/\s*,\s*/);sel=$.map(p,function(a){return".author:contains('"+a+"')"}).join(", ");$("div.scroll").find(sel).closest("tr").css(chng);$("div.scroll").bind("DOMNodeInserted",function(a){$(a.srcElement).find(sel).closest("tr").css(chng)})} |
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
var p = prompt( "People to highlight, comma-separated" ), | |
sel = [], | |
chng = { | |
backgroundColor: "#efe" | |
}; | |
if ( p ) { | |
p = $.trim( p ).split( /\s*,\s*/ ); | |
sel = $.map( p, function( name ) { | |
return ".author:contains('" + name + "')"; | |
}).join( ", " ); | |
$( "div.scroll" ) | |
.find( sel ) | |
.closest( "tr" ) | |
.css( chng ); | |
$( "div.scroll" ).bind( "DOMNodeInserted", function( evt ) { | |
$( evt.srcElement ) | |
.find( sel ) | |
.closest( "tr" ) | |
.css( chng ); | |
}); | |
} | |
// Bookmarklet version | |
javascript:var p=prompt("People to highlight, comma-separated"),sel=[],chng={backgroundColor:"#efe"};if(p){p=$.trim(p).split(/\s*,\s*/);sel=$.map(p,function(a){return".author:contains('"+a+"')"}).join(", ");$("div.scroll").find(sel).closest("tr").css(chng);$("div.scroll").bind("DOMNodeInserted",function(a){$(a.srcElement).find(sel).closest("tr").css(chng)})} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment