view service/shuttlepro/gui.js @ 1346:f54660b33a24

release 0.3.0 Ignore-this: 24ef128b3e09333e2ed61b04e04b479a darcs-hash:512129e12304545dcc5e22a840c3910d258e5221
author drewp <drewp@bigasterisk.com>
date Thu, 25 Apr 2019 23:01:04 -0700
parents 9bb3eac740f0
children
line wrap: on
line source

(function () {
    function abbreviateTrig(trig) {
        // prefixes, abbreviations, make everything into links, etc
        return trig;
    }
    
    var model = {
        current: ko.observable("...")
    };
    model.refreshGraph = function() {
        $.ajax({
            url: "graph",
            success: function(data) {
                model.current(abbreviateTrig(data));
            }
        });
    };
    model.refreshGraph();
    ko.applyBindings(model);   
})();