summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/log.ls
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2016-12-29 07:49:51 +0900
committersyuilo <syuilotan@yahoo.co.jp>2016-12-29 07:49:51 +0900
commitb3f42e62af698a67c2250533c437569559f1fdf9 (patch)
treecdf6937576e99cccf85e6fa3aa8860a1173c7cfb /src/web/app/common/scripts/log.ls
downloadmisskey-b3f42e62af698a67c2250533c437569559f1fdf9.tar.gz
misskey-b3f42e62af698a67c2250533c437569559f1fdf9.tar.bz2
misskey-b3f42e62af698a67c2250533c437569559f1fdf9.zip
Initial commit :four_leaf_clover:
Diffstat (limited to 'src/web/app/common/scripts/log.ls')
-rw-r--r--src/web/app/common/scripts/log.ls18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/log.ls b/src/web/app/common/scripts/log.ls
new file mode 100644
index 0000000000..6e1e3735d8
--- /dev/null
+++ b/src/web/app/common/scripts/log.ls
@@ -0,0 +1,18 @@
+riot = require \riot
+
+logs = []
+
+ev = riot.observable!
+
+function log(msg)
+ logs.push do
+ date: new Date!
+ message: msg
+ ev.trigger \log
+
+riot.mixin \log do
+ logs: logs
+ log: log
+ log-event: ev
+
+module.exports = log