コメント |
@HTML
</pre>
<script type="text/javascript" src="http://lightbox.on.coocan.jp/sbx33/createShadowbox.js" charset="utf-8"></script>
<pre>
@HEND
@DIV
<script type="text/javascript" src="http://lightbox.on.coocan.jp/sbx33/createShadowbox.js" charset="utf-8"></script>
@END
@DIV
if ( !window['lightboxTool'] ) {
window.lightboxTool = {};
}
if ( !window.lightboxTool.createShadowboxHtml ) {
window.lightboxTool.createShadowboxHtml = function ( obj ) {
var pn = obj.parentNode;
var ip = pn.getElementsByTagName("INPUT")[0];
var tt = pn.getElementsByTagName("INPUT")[2];
tt.value = (tt.value).replace(/\"/g,""");
var sl = pn.getElementsByTagName("SELECT")[0];
var sz = pn.getElementsByTagName("SELECT")[1];
var tx = pn.getElementsByTagName("TEXTAREA")[0];
var target = pn.getElementsByTagName("DIV")[0];
var str="";
var idstr = "sbx" + (new Date()).getTime();
str+="<a id=\""+idstr+"\" href=\"http://www.youtube.com/v/"+ip.value+"?autoplay=1&fs=1\" title=\""+tt.value+"\"><img src=\"http://img.youtube.com/vi/"+ip.value+"/"+sl.value+".jpg\" style='border:solid 0px #000000'></a>";
target.innerHTML = str;
if ( tt.value != '' ) {
Shadowbox.addCache( document.getElementById(idstr), eval( "({"+sz.value+",title:\""+tt.value+"\"})" ) );
}
else {
Shadowbox.addCache( document.getElementById(idstr), eval( "({"+sz.value+"})" ) );
}
var param = sz.value.replace(/\\/g,"").replace(/:/g,"=").replace(/,/g,";").replace(/\"/g,"");
var str2="";
str2+="<"+"script type=\"text/javascript\" src=\"http://lightbox.on.coocan.jp/sbx33/loadShadowbox.js\" charset=\"utf-8\"></"+"script>\n";
tx.value = str2 + str.replace("<a", "<a rel=\"shadowbox"+";"+ param + "\"" ) + "<div style='margin-left:5px;margin-top:-47px;'><a href=\"http://www.youtube.com/\" target=\"_blank\"><img src=\"https://lh6.googleusercontent.com/-3DDi_YvegwE/Tv1K9qayi-I/AAAAAAAAEIk/TfuDu3tXLMk/s135/yt_powered_by_black.png\" style='border:solid 0px #000000;width:60px;margin-top:4px;' /></a></div>";
}
}
if ( !window.lightboxTool.initShadowbox ) {
window.lightboxTool.initShadowbox = function ( ) {
Shadowbox.init();
}
}
(function() {
var str;
if ( !window.Shadowbox ) {
str="";
str+="<link rel=\"stylesheet\" type=\"text/css\" href=\"http://lightbox.on.coocan.jp/sbx33/shadowbox.css\"> \n";
str+="<"+"script type=\"text/javascript\" src=\"http://lightbox.on.coocan.jp/sbx33/shadowbox.js\" charset=\"utf-8\"></"+"script> ";
document.write(str);
if (window.attachEvent){
window.attachEvent('onload', lightboxTool.initShadowbox );
}
else {
window.addEventListener('load', lightboxTool.initShadowbox, false);
}
}
})();
(function() {
var str;
str="";
str+="<div> \n";
str+="動画ID <input type=\"text\" value=\"uxBFiU2N65c\"> \n";
str+="サムネイル番号 \n";
str+="<select onchange='lightboxTool.createShadowboxHtml(this);'> \n";
str+="<option value=\"0\">0</option> \n";
str+="<option value=\"1\">1</option> \n";
str+="<option value=\"2\">2</option> \n";
str+="<option value=\"3\">3</option> \n";
str+="</select> \n";
str+="<input type=\"button\" value=\"作成\" onclick='lightboxTool.createShadowboxHtml(this);'> \n";
str+="<br> \n";
str+="サイズ <select onchange='lightboxTool.createShadowboxHtml(this);'> \n";
str+="<option value='player:\"swf\",width:960,height:745'>960x745</option> \n";
str+="<option value='player:\"swf\",width:640,height:505'>640x505</option> \n";
str+="<option value='player:\"swf\",width:480,height:385'>480x385</option> \n";
str+="<option value='player:\"swf\",width:425,height:344'>425x344</option> \n";
str+="</select> \n";
str+="タイトル <input type=\"text\" style='width:280px;'> \n";
str+="<br> \n";
str+="<textarea style='width:480px;height:120px;' readonly onclick='this.select();'></textarea> \n";
str+="<div style='margin-top:5px;'></div> \n";
str+="</div> \n";
document.write(str);
})();
@END
|