CmdUtils.CreateCommand({ | |
name: "mirrorhenkan", | |
description: "ミラー変換機", | |
help: "2chのdat落ちしたスレを変換", | |
query_url: "http://www.geocities.jp/mirrorhenkan/url.html?u=", | |
icon: "http://img.f.hatena.ne.jp/images/fotolife/j/jigendaddy/20090618/20090618220343.png", | |
stand: "startcommand", | |
takes: {parameter: noun_arb_text}, | |
_getQuery: function(directObject) { | |
var query = this.name; | |
if (directObject.text != "") | |
query += " " + directObject.text; | |
return query; | |
}, | |
execute: function(directObject) { | |
var url = "http://www.geocities.jp/mirrorhenkan/url.html?u=" + this.stand + "?cmd={QUERY}"; | |
var query = this._getQuery(directObject); | |
var urlString = url.replace("{QUERY}", query); | |
Utils.openUrlInBrowser(urlString); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment