エクステンションテンプレート

<html>
 
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
	<link type="text/css" rel="stylesheet" href="./xxxxx.css">
 
	<!-- 以下の2つのjsは必ずインポートしてください -->
	<!-- 必須 -->
	<script type="text/javascript" src="../prototype.js"></script>
	<script type="text/javascript" src="../wblib.js"></script>
</head>
 
<body>
	<script type="text/javascript">
		<!-- メソッドonExtensionUpdatedをオーバーライトして表示をカスタマイズ -->
		wb.onExtensionUpdated = function()
		{
			wb.onClearAll();
 
			if(wb.getFocusThum() == 0) return;
 
			// メインのフォーカス中のファイルの情報を取得
 			var mv = wb.getInfo(wb.getFocusThum());
 
			new Insertion.Bottom($("view"), ' \
				<div class="thum" id="thum' + mv.id + '"> \
					<img class="img_thum" id="img' + mv.id + '" src="' + mv.thum + '" onmousedown="onMouseClick(' + mv.id + ')" ondblclick="wb.exec(' + mv.id + ', 0)"> \
				</div>'
			);
 
			// サムネイルは手動で生成する必要あり
			wb.makeThum("img"+mv.id, mv.id, 120, 90, 6, 1, false, true);
		}
 
		// 真ん中ボタンでその位置から再生
		function onMouseClick(id)
		{
			var ev = window.event;
 
			if(ev && ev.button == 4){
				wb.exec(id, 0, wb.getTimecode('img' + id, ev.offsetX, ev.offsetY));
	            ev.returnValue = false;
			}
	    }
	</script>
 
	<!-- 表示エリア -->
	<div id="view"></div>
 
	<!-- コンフィグ -->
	<div id="config">
		skin-version :		1;
		thum-width :	 	120;
		thum-height : 		90;
		thum-column : 		6;
		thum-row : 			1;
	</div>
</body>
 
</html>
最終更新:2009年12月12日 02:58