Plugin to install, update and delete third-party plugins using the web interface

This commit is contained in:
shortcutme 2019-08-03 01:31:11 +02:00
parent 0877fec638
commit 4094d3a9bf
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
18 changed files with 3396 additions and 0 deletions

View file

@ -0,0 +1,23 @@
class Class
trace: true
log: (args...) ->
return unless @trace
return if typeof console is 'undefined'
args.unshift("[#{@.constructor.name}]")
console.log(args...)
@
logStart: (name, args...) ->
return unless @trace
@logtimers or= {}
@logtimers[name] = +(new Date)
@log "#{name}", args..., "(started)" if args.length > 0
@
logEnd: (name, args...) ->
ms = +(new Date)-@logtimers[name]
@log "#{name}", args..., "(Done in #{ms}ms)"
@
window.Class = Class