PageSourceSearch

https://p-on.ru/js/models/balance.js?1789650322

js p-on.ru collected 2026-09-24 10:56:44 UTC 887 bytes, 28 lines download raw bytes

1/**
2 * Created by Maksim on 27.01.14.
3 */
4
5function hacked_splice(index, howMany /* model1, ... modelN */) {
6    var args = _.toArray(arguments).slice(2).concat({at: index}),
7        removed = this.models.slice(index, index + howMany);
8    this.remove(removed).add.apply(this, args);
9    return removed;
10}
11App.Models.Balance = Backbone.Model.extend({
12    parse: function (d){
13        d.date = new Date(d.date*1000);
14        return d;
15    }
16});
17App.Collections.BalanceHistory = Backbone.Collection.extend({
18    model: App.Models.Balance,
19    initialize: function (){
20        this.to = (new Date()).ts();
21        this.from = this.to - 60 * 60 * 24 * 30 * 2;
22    },
23    url: function (){
24        return app.settings.platform_root+'/api/users/balance?from='+this.from+'&to='+this.to;
25    },
26    // Backbone.Collection doesn't support `splice`, yet! Easy to add.
27    splice: hacked_splice
28});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.