You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
2007.11.13 追記 すいませんこれちょっとうまくいかないかもです。 non-privilegedの関数からだとprivilegedで定義された関数のなかでも制約があるみたいです。 やっとGreasemonkeyスクリプトのsandboxオブジェクトにFirefox extensionから簡単にアクセスする方法をひねり出した。まだ何も実装していないけれど、これでMinibufferから pinned-node | images | save-as localdisk で、ピンをつけたparagraphの中にある画像をローカルに保存する、とか pinned-node | images | save-as flickr それをFlickrにアップロードするみたいなコマンドを実装することができるようになる。 Greasemonkeyスクリプトのsandbox Greasemonkeyはg
先日のアップデートで最速インターフェース研究会 :: livedoor ReaderにはてなスターをくっつけるGreasemonkeyスクリプトが動かなくなっていたので調べてみた。 一度エントリにスターを表示したページではそれ以上スターを表示しないようになっている。http://s.hatena.ne.jp/js/HatenaStar.jsの1661行目と1689行目。 1659 loadEntriesByHeader: function() { 1660 var c = Hatena.Star.EntryLoader; 1661 if (c.entries) return c.entries; 1662 var entries = []; 1663 var headers = c.getHeaders(); 1687 loadEntriesByConfig: function() { 1
GM_xmlhttpRequestはresponseXMLを返してくれない。 DOMを作ってくれない、ということ(作ってくれなくていいんだけど)。 xpathするにはDOMを作る処理が必要になる。 DOMParser使うとか、適当なelementのinnerHTMLに突っ込んだりする。 そのときの処理時間がそれなりにかかるので、正規表現とかでひょいひょいパースするほうが早く終わるケースが多いような気がする。 だけど正規表現だと読みにくくてつかれてしまうので、例えばこんな感じの関数でも定義しておけばそれなりに読みやすくなりそうだしそれなりに速いし、ってことになるかなぁ、どうだろう。 function getTags(html, tagName, className){ var cls = ""; if(className){ cls = "[^>]*?class=\"" + classNam
「http://d.hatena.ne.jp/brazil/20070420/1177060289」でFirefox専用の第二引数に環境の指定をとるevalの使い方について説明されています。その元はこちら「http://www.tom.sfc.keio.ac.jp/~sakai/d/?date=20070414#p02」で、僕もこれを見たときに初めてしりました。そのころ僕はグリモンのスクリプトをいじっていたので、ちょっと気になっていくつか試してみて、ネタ元のページに以下のようなブクマコメントをしました。 evalの第2引数しらなかった。これを応用すると、GreasemonkeyでusafeWindow.xxx() とする場合、xxx内部からeval("GM_xmlhttpRequest", arguments.callee.caller)でGM_xmlhttpRequestが取得されてして
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く