aboutsummaryrefslogtreecommitdiff
path: root/data/stuff/js/util.js
blob: c0214997fb85daf3345921ded88468e345a6be8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
jQuery(function($) {
  "use strict";

  window.send = function(fn, args) {
    return $.ajax({
      url: "/api/" + fn,
      method: 'POST',
      dataType: 'json',
      data: args,
    });
  };

  LuigiTemplate.FILTERS.json = function(val) {
    return JSON.stringify(val);
  };
});