木曜日, 12月 17, 2009

Chrome Extensions

Google Chrome browser seem to get the momentum now that many extensions are available.

Chrome Extensions

Sensible enough, it runs Javascript. The objects are custom made, though, and it will take time to get them all.

Google Chrome Extensions (Labs)

A code like this will set a listener. The specified callback function will be invoked when the icon is clicked.



chrome.browserAction.onClicked.addListener(function(tab) {

alert(tab.url);

});



When the extension is invoked, it creates popup window. It could create empty background window. The current selected window is called contents window and scripts and css's etc for the window can be specified in .json file.

Overview

Google Chrome 拡張機能では、それぞれ任意のページ(background), サイトを開いたときに起動する(contents), アイコンをクリックすると表示される(popup)などで指定するコードを起動できる。

PHP: Composer の使い方

PHP には Composer という優れたパッケージ管理ツールがあります。最近、PHP サイトを Composer を使って再構築する作業を行いましたので、方法を書いておきたいと思います。 Composerとは? ComposerはPHPのパッケージ管理ツールです。Py...