Skip to content

Instantly share code, notes, and snippets.

@kentaro
Created February 5, 2009 17:02
Show Gist options
  • Save kentaro/58834 to your computer and use it in GitHub Desktop.
Save kentaro/58834 to your computer and use it in GitHub Desktop.
// ==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