CmdUtils.CreateCommand({ name: "bandwidth-graph", takes: {"ip":noun_arb_text}, description: "Show Bandwidth Graph for DD-WRT users", help: "Displays Bandwidth Graph in the preview pane for users of DD-WRT. If your router ip is different than 192.168.1.1 you can enter your router ip as an argument.", homepage: "http://blog.mcfearsome.com/verbs/", author: { name: "Jesse McPherson", email: "jesse@mcfearsome.com"}, preview: function(pblock, din) { var ip = din.text; if(ip == null || ip.length == 0) { ip = '192.168.1.1'; } var d = new Date(); var date_queryparam = d.getMonth() + '-' + d.getFullYear(); var url = 'http://' + ip + '/ttgraph.cgi?' + date_queryparam; var resp = jQuery.ajax({async:false,url:url}); pblock.innerHTML = resp.responseText; }, execute: function( ) { return false; } });