Changeset 3130

Show
Ignore:
Timestamp:
12/14/07 17:09:47 (6 years ago)
Author:
cho45
Message:

lang/javascript/userscripts/hatena.haiku.usetumblrinsteadoffotolife.user.js:

トップページ以外でも有効に
進行状況を表示


Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/hatena.haiku.usetumblrinsteadoffotolife.user.js

    r3127 r3130  
    33// @description Use tumblr to post illusts instead of fotolife 
    44// @namespace   http://lowreal.net/ 
    5 // @include     http://h.hatena.ne.jp/ 
     5// @include     http://h.hatena.ne.jp/* 
    66// ==/UserScript== 
    77 
     
    8989                location.href = "javascript:(function () { if (window.console) console.log.apply(console.log, "+o.toSource()+") })();"; 
    9090        } 
    91 } 
     91 
     92        if (!arguments.callee.element) { 
     93                arguments.callee.element = h("<div style='position:fixed;top:0;left:0;background:#000;color:#fff;padding:0 0.5em;'/>").firstChild; 
     94                document.body.appendChild(arguments.callee.element); 
     95        } 
     96        arguments.callee.element.innerHTML = escapeHTML(m); 
     97} 
     98 
     99function escapeHTML (str) { 
     100        var map = { "&" : "&amp;", "<" : "&lt;" , ">" : "&gt;"}; 
     101        return str.replace(/[&<>]/g, function (m) { 
     102                return map(m); 
     103        }); 
     104}; 
     105 
     106 
    92107 
    93108function $N(name, attr, childs) {