Created
March 11, 2012 00:23
-
-
Save sj26/2014198 to your computer and use it in GitHub Desktop.
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
FFW = | |
g: (i) -> document.getElementById(i) | |
gv: (i) -> @g(i).value | |
sv: (i, v) -> @g(i).value = v | |
a: (i, c=document) -> c.getElementsByTagName(i) | |
ss: (i, v, n) -> @g(i).style[v] = n | |
misc: {} | |
effect: {} | |
event: {} | |
browser: {} | |
number: {} | |
form: {} | |
ajax: {} | |
string: {} | |
dbm: false | |
ssfaiw: (style, stylename, whereitem, wherevalue, tag, findcontext) -> | |
findcontext &&= @g findcontext | |
findcontext ||= document | |
elements = @a tag, findcontext | |
for element in elements | |
if element[whereitem] is wherevalue | |
element.style[style] = stylename | |
ssfai: (style, stylename, tag, findcontext) -> | |
findcontext and= @g findcontext | |
findcontext or= @g findcontext | |
elements = @a tag, fc | |
element.style[style] = stylename for element in elements | |
ssfawonly: (style, stylename, stylenotname, whereitem, wherevalue, tag, findcontext) -> | |
@ssfai style, stylenotname, tag, findcontext | |
@ssfaiw style, stylename, whereitem, wherevalue, tag, findcontext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment