This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Beatmaps.find().forEach(function(x) { | |
Beatmaps.update({_id: x._id}, { | |
$set: { | |
approved: Number(x.approved), | |
total_length: Number(x.total_length), | |
hit_length: Number(x.hit_length), | |
diff_size: Number(x.diff_size), | |
diff_overall: Number(x.diff_overall), | |
diff_approach: Number(x.diff_approach), | |
diff_drain: Number(x.diff_drain), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.myTemplate.viewmodel({ | |
page: new ReactiveVar(0), | |
scrollListener: _.debounce(function () { | |
var self = this; | |
var diff = $(document).height() - $(window).height(); | |
if ($(window).scrollTop() === diff) { | |
self.viewmodel.page().set(self.viewmodel.page().get() + 1); | |
} | |
}, 50); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.each(dateRange(), function (month) { | |
var beatmaps = osu.getBeatmapsRaw({ | |
since: month | |
}, Meteor.bindEnvironment(function (err, res) { | |
if (err) throw new Meteor.Error(err); | |
var mapsJson = JSON.stringify(res); | |
var maps = JSON.parse(mapsJson); | |
for (var map in maps) { | |
var objectToUpdate = { |
NewerOlder