Created
February 5, 2009 17:02
-
-
Save kentaro/58834 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Ichigo-Mashimaro | |
// @namespace http://kentarok.org/ | |
// @include http://twitter.com/* | |
// ==/UserScript== | |
(function () { | |
var textarea = document.getElementById('status'); | |
textarea.value = ''; | |
var start = null; | |
textarea.addEventListener( | |
'keyup', | |
function (event) { | |
if (!start) start = (new Date); | |
if (event.target.value == 'いちごましまろ') { | |
var time = (new Date) - start; | |
event.target.value = event.target.value + ' (' + time / 1000 + '秒)'; | |
} | |
}, | |
true | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment