-
Notifications
You must be signed in to change notification settings - Fork 16
/
favico.js.javascript.txt
28 lines (24 loc) · 2.43 KB
/
favico.js.javascript.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FAVICO.JS
VERSION ==> #
#Animates favicon. Good to show notifications.
new Favico(OBJ) #Initialize
#OBJ (for badges only):
# - bgColor CSS_STR (def: "#d00")
# - textColor CSS_STR (def: "#fff")
# - fontFamily CSS_STR (def: "sans-serif")
# - fontStyle CSS_STR (def: "bold")
# - type STR: among "rectangle" or "circle" (def)
# - position STR (def: "down"): among "up|down|left|upleft"
# - animation STR (def: "slide"): among "slide|fade|pop|popFade|none"
# - elementId ID_STR: use FAVICON.image(document.getElementById(ID_STR))
# - element ELEM
#Returns FAVICON
FAVICON.badge(NUM) #Add number on the favicon (as a badge). 0 does not show anything.
FAVICON.reset() #Same as FAVICON.badge(0)
FAVICON.image(IMG_ELEM) #Add image on the favicon (as a badge)
FAVICON.video(VIDEO_ELEM) #Use video as favicon.
FAVICON.video("stop") #
FAVICON.webcam() #Use webcam as favicon.
FAVICON.webcam("stop") #