Created
February 12, 2009 23:21
-
-
Save Artanis/62937 to your computer and use it in GitHub Desktop.
Removes spaces from posted Powder Game save codes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "dust", | |
homepage: "http://gist.github.com/62937", | |
author: { name: "Artanis", email: "artanis.00@gmail.com"}, | |
license: "Public Domain", | |
description: "Removes spaces from <a href='http://dan-ball.jp/en/javagame/dust/'>Powder Game</a> save codes. Execute command to replace selection with formatted code, even in the save game text box.", | |
help: "dust (code|selection)", | |
takes: {"code": noun_arb_text}, | |
preview: function( pblock, input ) { | |
var template = "${code}"; | |
pblock.innerHTML = CmdUtils.renderTemplate(template, {"code": input.text.split(' ').join('')}); | |
}, | |
execute: function(input) { | |
CmdUtils.setSelection(input.html.split(' ').join('')); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment