「greasemonkey」の基本
− Hatena::Diary − より
Firefoxでユーザーサイドスクリプトを実現するためのエクステンション(拡張機能?)の一つで、読み込んだウェブページをクライアント(ユーザー)側でカスタマイズ可能にするもの。
[関連事項] ・greasemonkey(グリースモンキー:整備士ブラウザ) ・Firefox(ブラウザ)上で動く ・Platypus(プラティパス:カモノハシ)で簡単作成 ・JavaScriptとCSS (言語)
------- 「greasemonkey」基本スタイル -------
// ==UserScript== // @name Say Hello! // @namespace http://youngpup.net/userscripts // @description Greets the world // @include http://google.com/* // @include http://www.google.com/* // @include http://maps.google.tld/* // @exclude http://gmail.google.com/* // ==/UserScript== // Notes: // * is a wildcard character // .tld is magic that matches all top-level domains (e.g. .com, .co.uk, etc.)
alert("Hello, world!"); ==UserScript== から ==/UserScript== の内容
Property | Description | Multiplicity | Default | @name | スクリプトの名称 | 0-1 | The script's filename without the extension. | @namespace | A scope within which @name should be unique. | 0-1 | The domain of the script's file. | @description | A, uhm, description. | 0-1 | none | @include | A url to include the script with. There can be more than one. | 0+ | one, set to * | @exclude | A url to explicitly exclude the script from. There can be more than one. | 0+ | none |
<<リンク>>
【ココでお勉強】
●公式サイト
●はてなグリースモンキー解説サイト
●スクリプト(英語サイト)
●スクリプト(日本語サイト)
●greasemonkey note(基本の書き方)
●JavaScript for CSS(部分的閉鎖)
●イヌでもわかるJavaScript講座
●DOMによるスタイルの変更(その1)
|
|