mirror of
https://github.com/skishore/makemeahanzi.git
synced 2025-11-02 04:37:30 +08:00
20 lines
468 B
JavaScript
20 lines
468 B
JavaScript
// Simple helpers for interacting with reactive variables.
|
|
|
|
ReactiveVar.prototype.pop = function() {
|
|
const value = this.get();
|
|
value.pop();
|
|
this.set(value);
|
|
}
|
|
|
|
ReactiveVar.prototype.push = function(element) {
|
|
const value = this.get();
|
|
value.push(element);
|
|
this.set(value);
|
|
}
|
|
|
|
// Our hacky implementation of a routing table. Iron Router is too slow...
|
|
|
|
Session.setDefault('route', 'search');
|
|
|
|
Handlebars.registerHelper('route', () => Session.get('route'));
|