+ methods: {
+ withWho: function(c) {
+ if (c.from.sid == this.st.user.sid || c.from.id == this.st.user.id)
+ return c.to || this.st.tr["Any player"];
+ return c.from.name || "@nonymous";
+ },
+ getRandomnessClass: function(c) {
+ if (
+ // TODO: one extra test here
+ !Number.isInteger(c.options.randomness) &&
+ !parseInt(c.options.randomness, 10)
+ ) {
+ return {};
+ }
+ return {
+ ["random-" + c.options.randomness]: true
+ };
+ }
+ }