Created
November 9, 2015 00:26
-
-
Save kyubuns/0c3c810e2e736b681e1c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
###: | |
# @plugindesc ツイートするやつ | |
# @author kyubuns | |
# | |
# @help | |
# | |
# Plugin Command: | |
# Tweet (message) | |
# | |
# Example: | |
# Tweet \V[0001]点を取りました! http://kyubuns.net/ | |
# | |
# License: | |
# Copyright (c) 2015 kyubuns | |
# | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/mit-license.php | |
### | |
_Game_Interpreter_command356 = Game_Interpreter.prototype.command356 | |
Game_Interpreter.prototype.command356 = -> | |
if this._params[0].split(" ")[0] == 'Tweet' | |
$gameSystem.tweet(this._params[0]) | |
_Game_Interpreter_command356.call(this) | |
Game_System.prototype.tweet = (rawMessage) -> | |
message = Window_Base.prototype.convertEscapeCharacters(rawMessage.slice(6)) | |
link = 'http://twitter.com/home?status=' + encodeURIComponent(message) | |
window.open(link, '_blank') | |
console.log(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment