元々書こうと思ってたネタがポシャったので、SuperViewNaviExのsiteinfoネタでも書くとする

本当は

Twitterは最近とみに不安定な感じですね。
先日は久々に大規模なクジラ発生してましたし。
フォローしてる人の中にはiPhone等でクライアントの認証が通らなかったりもしたみたいです。


で、うちの環境でも問題が幾つかあってウザくなってたので、
スクリプト書いてみたんですが動作が芳しくないので没になりました。

USTREAMのChannelをSuperViewNaviExに

USTREAMを最近よく見るんですが、SuperViewNaviExが録画の方には対応してますが、Channelのライブには対応してないみたいなので追記してみました。

		// USTREAM(Channel Live)
		{
			url: /^http:\/\/www\.ustream\.tv\/channel\/.*$/,
			conv: function(url) {
				if (url.match(/^http:\/\/www\.ustream\.tv\/channel\/(.*)$/)) {
					return 'http://www.ustream.tv/channel-popup/' + RegExp.$1;
				}
			}
		},

Channelがないライブは対応できてないです。

そんな場合でも一応、配信ページを開いて以下のアクションを実行すればSuperView化するかと。
SuperViewizeOnUstream.js

(function() {
	var pnir = sleipnir.api;
	var id = pnir.GetDocumentID(pnir.ActiveIndex);
	
	if(location.hostname == "www.ustream.tv") {
		
		var v2 = document.getElementById("v2");
		var w = parseInt(v2.getAttribute("width")) + 14;
		
		if(document.getElementById("PopoutChannelVideo")) {
			var h = parseInt(v2.getAttribute("height")) + 35 + 88;
			var u = document.getElementById("PopoutChannelVideo").href;
		}else if(location.pathname.match(/\/channel-popup\/.*/)) {
			w = 608 + 14
			var h = 368 + 35 + 88;
			var u = location.href;
		}else if(location.pathname.match(/\/recorded\/(\d+)/)) {
			var h = parseInt(v2.getAttribute("height")) + 35;
			var u = "http://www.ustream.tv/flash/video/" + RegExp.$1;
		}
		
		var n = 0;
		n += pnir.IsJavaScriptEnabled(id) ? 1 : 0;
		n += pnir.IsJavaEnabled(id) ? 2 : 0;
		n += pnir.IsRunActiveXEnabled(id) ? 4 : 0;
		n += pnir.IsDownloadActiveXEnabled(id) ? 8 : 0;
		n += pnir.IsPictureEnabled(id) ? 16 : 0;
		n += pnir.IsVideoEnabled(id) ? 32 : 0;
		n += pnir.IsSoundEnabled(id) ? 64 : 0;
		
		var act = "SuperDragShowSuperView(\"" + u + "\", " + n + ", 0, 0, " + w + ", " + h + ")";
		pnir.ExecuteAction(act);
		pnir.ExecuteAction('Close');
		
	}

})();