2008/01/31
もう眠くなってきたら
:shutdown
ソースは
(function(){
var mes = [
'System is going down for system shutdown now.......',
'Starting local stop scripts. ',
'Exiting Syslogd! ',
'Syncing all filesystems: [OK]',
'Unmounting all filesystems: [OK]',
'The system is going down NOW !! ',
'Sending SIGTERM to all processes. ',
'The system is halted. Press Reset or turn off power',
'flushing ide devices: [OK]',
'System halted. ',
];
function shutdown( stdin ) {
GM_addStyle(<><![CDATA[
#gm_minibuffer_flash_status * {
font-family: 'terminal', 'monospace';
font-weight: bold;
}
]]></>);
var n = 0;
var timer = setInterval(function(){
window.Minibuffer.status('shutdown'+n, mes[n], 50000);
if (n++ >= mes.length) {
clearInterval(timer);
document.open();
document.close();
document.body.style.backgroundColor='black';
}
}, 1000);
return stdin;
}
if (typeof window.Minibuffer != 'undefined') {
window.Minibuffer.addCommand({
name: "shutdown",
command: shutdown,
});
}
})();
こんな感じ。
インストール:minibuffer.shutdown.user.js
てか実用的な物つくれ!俺
Posted at
by
mattn
|
Edit