2007/11/24

Recent entries from same category

  1. グー!ググググー!ルッキングーでございます。(エドはるみグリモン書いた) Hatena
  2. Qaaに回答を投げるMinibufferコマンド書いた Hatena
  3. Minibufferから「We Heart It」出来るグリモン「weheartit.user.js」書いた Hatena
  4. 2008/04/04 Firefox3 Beta5でGoogle Readerで記事表示部分が真っ白け Hatena
  5. ENTERキーだけでtumblr dashboard上の画像を拡大縮小したり動画の再生停止したり出来るグリースモンキースクリプト「play on tumblr」を書いた。 Hatena

はてな
もう眠くなってきたら
:shutdown
ソースは
// ==UserScript==
// @name           Minibuffer Shutdown Command
// @namespace      Minibuffer.Shutdown.Command
// @include        http://*
// ==/UserScript==


(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
てか実用的な物つくれ!俺

WriteBacks

TrackBack ping me at
Post a comment

writeback message: Ready to post a comment.