adjustable clock javascripting


after some time 😀 … adjustable clock got the javascript support.I got a chat with Michal D and he was very open to ideas for aclock anyway this is the first test 😀

Open destkop console

qdbus org.kde.plasma-desktop /MainApplication showInteractiveConsole

copy and paste this code in the destkop console :
example :

 
 var panel = new(Panel)
var clock =  panel.addWidget("adjustableclock") 
clock.writeConfig("clipboardExpressions","Clock.toString(Clock.Time\\, {'short': true}),Clock.toString(Clock.Time),,Clock.toString(Clock.Date\\, {'short': true}),Clock.toString(Clock.Date),,Clock.toString(Clock.DateTime\\, {'short': true}),Clock.toString(Clock.DateTime),Clock.toString(Clock.Year) + '-' + Clock.toString(Clock.Month) + '-' + Clock.toString(Clock.DayOfMonth) + ' ' + Clock.toString(Clock.Hour) + ':' + Clock.toString(Clock.Minute) + ':' + Clock.toString(Clock.Second),,Clock.toString(Clock.Timestamp)")
clock.writeConfig("theme","dbclock")