Skip to content

Instantly share code, notes, and snippets.

@motemen
Forked from kentaro/gist:58834
Created February 6, 2009 08:29
Show Gist options
  • Save motemen/59284 to your computer and use it in GitHub Desktop.
Save motemen/59284 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 == '@kentaro しごとしろ') {
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