Amazonの注文履歴が過去から現在まですべて集計されてしまうという、あのブックマークレットは衝撃的であった。こんな風にブラウザの世界を自在に操作できるJavaScriptって素晴らしい。でも、このブックマークレットがどんな仕組みで集計しているのか、未だすべては理解できていない。(特にDeferredとか)コードの流れ追跡しながら調べてみた。 URL欄のコード 改行なしだと読み難いので、セミコロンで改行を入れてみた。 そしてsrcのURLは、フォークした自分のgistに変更している。 javascript: (function(){ var d=document; var s=d.createElement('script'); s.src='https://gist.github.com/zarigani/5718444/raw/eaf1da1434a3d620a93779da2b33f