「今このサイト見てる」的なブックマークレット

かいた。

  • テスト。グーグルみてる: Google http://www.google.co.jp/ posted at 02:06:10
  •  こんな感じで「今このサイト見てる」みたいな事をコメント付きでツイートしたい。


    ブックマークレット

    javascript:var formElem = document.createElement("form");document.body.appendChild(formElem);var inputElem = document.createElement("input");formElem.style.top ="0"; formElem.style.position='absolute';formElem.appendChild(inputElem);var submitElem = document.createElement("input");formElem.appendChild(submitElem);submitElem.setAttribute("type","submit");submitElem.setAttribute("value","Tweet");formElem.setAttribute("onsubmit","window.open('http://twitter.com/home?status='+encodeURIComponent(inputElem.value)+': '+encodeURIComponent(document.title)+' '+encodeURIComponent(document.URL), 'twtw', 'width=720, height=480, menubar=no, toolbar=no, scrollbars=yes');");inputElem.focus();

    たったそれだけのことで!無駄だなあ。