44 < script >
55 var elementIds = [
66 "ShowTime" , /* "ShowDate", "ShowMonth", "ShowWeekNum", */ "ShowCharge" ,
7- /* "ShowBluetooth", */ "ShowSpiral" , "HourColor" , "MinuteColor" , "HourMinuteColor" ,
7+ "ShowBluetooth" , "ShowSpiral" , "HourColor" , "MinuteColor" , "HourMinuteColor" ,
88 "NoneColor" , "SpiralColor" , "BackgroundColor" , "GridColor" , "DotColor" ,
9- "TimeColor" , "OutlineColor"
9+ "TimeColor" , "OutlineColor" , "VibeBluetooth"
1010 ] ;
1111
1212 var defValue = [
1313 0 , // ShowTime
1414/*
15- 0, // ShowDate
16- 0, // ShowMonth
17- 0, // ShowWeekNum
18- */
19- 1 , // ShowCharge
20- // 0 , // ShowBluetooth
21- 1 , // ShowSpiral
22- 48 , // HourColor
23- 12 , // MinuteColor
24- 3 , // HourMinuteColor
15+ 0, // ShowDate
16+ 0, // ShowMonth
17+ 0, // ShowWeekNum
18+ */
19+ 1 , // ShowCharge
20+ 1 , // ShowBluetooth
21+ 1 , // ShowSpiral
22+ 48 , // HourColor
23+ 12 , // MinuteColor
24+ 3 , // HourMinuteColor
2525 63 , // NoneColor
26- 56 , // SpiralColor
27- 0 , // BackgroundColor
28- 0 , // GridColor
29- 63 , // DotColor
30- 27 , // TimeColor
31- 21 // OutlineColor
26+ 56 , // SpiralColor
27+ 0 , // BackgroundColor
28+ 0 , // GridColor
29+ 63 , // DotColor
30+ 64 , // TimeColor
31+ 21 , // OutlineColor
32+ 1 // VibeBluetooth
3233 ] ;
3334
3435
5455 "Red" , "Folly" , "FashionMagenta" , "Magenta" , "Orange" , "SunsetOrange" , "BrilliantRose" , "ShockingPink" ,
5556 "ChromeYellow" , "Rajah" , "Melon" , "RichBrilliantLavender" , "Yellow" , "Icterine" , "PastelYellow" , "White"
5657 ] ;
57-
58+
5859 for ( var i = 0 ; i < 64 ; i ++ ) {
5960 var opt = document . createElement ( 'option' ) ;
6061 var hexR = expColor ( ( i >> 4 ) & 0x03 ) ;
6869 }
6970 opt . setAttribute ( "style" , "background-color:#" + rgb2hex ( hexR , hexG , hexB ) + "; color:#" + txtCol )
7071 opt . setAttribute ( "value" , 192 + i )
71- if ( i == 5 ) opt . setAttribute ( "selected" , true ) ;
7272 opt . innerHTML = colors [ i ] ;
7373 element . appendChild ( opt ) ;
7474 }
75+ if ( element . id == "TimeColor" ) {
76+ var opt = document . createElement ( 'option' ) ;
77+ opt . setAttribute ( "value" , 256 )
78+ opt . innerHTML = "(Legible color)" ;
79+ element . appendChild ( opt ) ;
80+ }
7581 }
7682
7783 function OnLoadHandler ( ) {
7884 document . getElementById ( "Save" ) . addEventListener ( "click" , SaveHandler ) ;
7985 for ( var id in elementIds ) {
8086 var element = document . getElementById ( elementIds [ id ] ) ;
81- var def = localStorage . getItem ( elementIds [ id ] ) ;
87+ var def = localStorage . getItem ( elementIds [ id ] ) ;
8288 if ( document . getElementById ( elementIds [ id ] + "Preview" ) ) {
8389 AddColorOptions ( element ) ;
8490 element . addEventListener ( "change" , UpdatePreviews ) ;
85- if ( def ) def = def - 192 ;
86- }
87- if ( ! def ) def = defValue [ id ] ;
88- element . options [ def ] . selected = true ;
91+ if ( def ) def = def - 192 ;
92+ }
93+ if ( ! def ) def = defValue [ id ] ;
94+ element . options [ def ] . selected = true ;
8995 }
9096 UpdatePreviews ( ) ;
9197 } ;
@@ -133,6 +139,7 @@ <h1>Fibonacci Clock Settings</h1>
133139 < p > < select id ="ShowTime ">
134140 < option value ="0 "> Hide</ option >
135141 < option value ="1 "> Show</ option >
142+ < option value ="2 "> Show on tap</ option >
136143 </ select > time with digits</ p >
137144<!--
138145 <p><select id="ShowDate">
@@ -154,12 +161,17 @@ <h1>Fibonacci Clock Settings</h1>
154161 < option value ="0 "> Hide</ option >
155162 < option value ="1 "> Show</ option >
156163 </ select > battery charge</ p >
157- <!--
164+
158165 < p > < select id ="ShowBluetooth ">
159166 < option value ="0 "> Hide</ option >
160167 < option value ="1 "> Show</ option >
161168 </ select > bluetooth connection</ p >
162- -->
169+
170+ < p > < select id ="VibeBluetooth ">
171+ < option value ="0 "> Silent</ option >
172+ < option value ="1 "> Vibe</ option >
173+ </ select > when loosing bluetooth connection</ p >
174+
163175 < p > < select id ="ShowSpiral ">
164176 < option value ="0 "> Hide</ option >
165177 < option value ="1 "> Show</ option >
0 commit comments