view service/shuttlepro/gui.js @ 1373:f502b4d7f64c

release 0.6.0 Ignore-this: d68489fed902cda3823f8b8ed7d96893 darcs-hash:cf1c36110269f2adeeca31c635fa09559faae123
author drewp <drewp@bigasterisk.com>
date Mon, 06 May 2019 00:03:35 -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);   
})();