2010年5月22日土曜日

Google Chrome で特定のドメインにおいて JavaScript を切る

Firefox でスクリプトの実行を管理する NoScript と同様の拡張機能を Google Chrome で探したけれど見当たらなかった。標準の機能で JavaScrip の実行を切ることに。

 設定 > オプション > 高度な設定 > コンテンツの設定 > Javascript > 例外 で Javascritpt を実行したくないドメインを指定して「処理」をブロックにする。

img05-22-2010[4][4]

パターンの指定は、

Click Exceptions on any tab to customize how resources for particular websites should be handled. In the "Pattern" field, you can enter hostnames and IP addresses, as well as specific domain masks (e.g. enter [*.]google.com to match everything from google.com and www.google.com, but not othergoogle.com).

( Images, JavaScript, and other web content settings : Security settings - Google Chrome Help より)

特定のページではできないようだ。

ところで、上記のように JavaScript を切ったサイトでは拡張機能 Auto-Reload が機能しなかった。Chrome では JavaScript が密接に絡んでいるのだろうか?

Web Developer - Google Chrome 拡張機能ギャラリー にも次のように書かれている。

‘Disable JavaScript’ is not possible to implement with the current Google Chrome APIs. Please star this bug and hopefully the APIs will be updated