Created
February 17, 2010 17:30
-
-
Save leedo/306837 to your computer and use it in GitHub Desktop.
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 characters
proc animate args { | |
set urls {}; | |
set delay 0.5; | |
for {set x 0} {$x<[llength $args]} {incr x} { | |
set item [lindex $args $x]; | |
if {$item == "-delay"} { | |
set delay [lindex $args [expr $x + 1]]; | |
} elseif {[regexp -nocase {^http} $item]} { | |
lappend urls $item; | |
} | |
} | |
set url http://prettybrd.com/ani?d=$delay&[apply ? [inject $urls {} {{list img} {concat $list i $img}}]]#.gif; | |
cache put animate url $url; | |
return [magic noop [i.buttes $url]]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment