JS Cool TV Series Collection Support Lianbo (HTA)
Applicationname= name value of "XF"//hta: Custom
The window border type value for the border= "dialog"//hta is: Thick/thin/dialog/none
maximizebutton= the "No"//hta window displays a maximized button value of yes/no
scrollflat= "yes"//scroll bar is 3d style, or 2d flat style value is yes/no
caption= the "Yes"//hta window shows whether the title bar or caption value is yes/no
selection= whether the text in the "No"//hta has an optional value of yes/no
Innerborder= "No"//whether the inner border value is displayed yes/no
icon= "Http://topams.googlecode.com/files/freeman.ico"/program icon value is an icon path
Scroll= "No"//whether the scroll bar value is displayed Yes/no/auto
Showintaskbar= "Yes"//hta whether the value displayed on the taskbar is yes/no
Singleinstance= "Yes"//hta can open a value of yes/no in multiple windows mode
sysmenu= "Yes"//whether to display several buttons of the system, maximize, minimize the value of yes/no
Windowstate= "Normal"//hta open with a mode value of Normal/maximize/minimize
/>
<title> Youku TV Collection </title>
<style type= "Text/css Tutorial" >
*{border:0; margin:0; padding:0; list-style:none;}
body{
font-size:9pt;
line-height:17px;
margin-left:0px;
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
Background-color: #99ccff;
}
a{font-size:12px;font-family: "Arial"; margin:0 5px;cursor:pointer;}
A:link{color: #6699cc; text-decoration:none;}
A:visited{color: #0033cc; text-decoration:none;}
A:hover{color:gray;}
#scrolllist {overflow:hidden;height:395px;width:150px;border:1px #0c8ac5 solid;text-align:center;overflow-y: Scroll;overflow-x:hidden}
</style>
<script type= "text/web Effects" >
while (true) {
try {
Window.resizeto (500, 400);
Window.moveto ((window.screen.width-400)/2, (window.screen.height-600)/2);
Break
catch (e) {}
}
</script>
<body>
</body>
<script language=javascript>
ARRPL = new Array ()
function Songobj (id,url, name) {
This.id = ID
This.url = URL
THIS.name = Name
}
function A () {
var ww = document.body;
var _this;
_this = this;
var table = document.createelement ("table");
var row = Table.insertrow ();
This.workspace = Row.insertcell (0);
var m = Row.insertcell (1);
This.listspace = Row.insertcell (2);
This.workspace.style.csstext = ' width:100%; Height: ' + document.body.clientheight + '; Background:black; ';
this.workspace.valign = ' top ';
This.workspace.align = ' Left ';
this.listspace.innerhtml = "<div id=" scrolllist "><div id=" div "> </div></div>";
M.style.csstext = ' width:3px; Background: #eee;; Font-size:8px;font-weight:bold; Cursor:hand;color:black; ';
M.valign = ' Middle ';
M.innertext = ' > ';
m.isclosed = false;
M.onclick = function () {
if (this.isclosed) {
This.innertext = ' > ';
_this.listspace.style.display = ';
_this.workspace.style.width = document.body.clientwidth + "px";
} else {
This.innertext = ' < ';
_this.listspace.style.display = ' None ';
_this.workspace.style.width = document.body.clientwidth + "px";
}
this.isclosed =!this.isclosed;
}
Ww.appendchild (table);
}
A ();
function Ajxg (URL) {var xhr=window.activexobject?new activexobject ("Microsoft.XMLHTTP"): New XMLHttpRequest (); Xhr.open ("Get", Url,false); Xhr.send (null); return xhr.responsetext};
function Nova_update (url,l) {
arrpl.length=0;
var ok = ajxg (URL);
var a = new RegExp (/<a charset= "411-2-2-.*?href=42" (. *?) 42.*?> (. *?) </A>/IG);
var aa = new RegExp (/<a onclick= "nova_update (' eplist ', this.href); return false" title=.*?href=42 (. *?) 42> (. *?) </A>/G);
var m = Ok.match (a);
var mm = Ok.match (AA);
var B = "";
var bb = "";
var c = "<li><a onclick= ' Play ({$id}) ' href= ' # ' >{$song}</a></li> ';
var cc = "<a href= ' # ' onclick= ' nova_update (" http://www.youku.com{$url} ", {$oo}) ' > {$song} page </a> ';
if (l==1) {ll=0;} else if (l==2) {ll=20} else if (l==3) {ll=40}
for (var i = 0; i < m.length; i++) {
K =i + 1+ll;
if (K < a) {k = "0" + K;}
Arrpl[i]=new Songobj (I,m[i].replace (A, "$"), M[i].replace (A, "$")
b = = C.replace ("{$num}", K). Replace ("{$id}", i). replace (/{$song}/ig, M[i].replace (A, "$")). Replace ("{$url}", M[i]. Replace (A, "$"))
}
for (var II = 0; II < mm.length; ii++) {
BB + + cc.replace ("{$num}", ii). Replace (/{$song}/ig, Mm[ii].replace (AA, "$")). Replace ("{$url}", Mm[ii].replace (AA, "$ 1 ")). Replace (" {$oo} ", Mm[ii].replace (AA," $ "))
}
bb = "<ul><li>" + BB + "</li></ul>";
div.innerhtml = b + bb;
}
function Play (obj) {
Onnum=obj;
Name=arrpl[onnum].name;
Url=f (Arrpl[onnum].url);
Addflash (URL, ' 100% ', ' 100% ');
Document.title= ' is playing ' +name+ ' cool TV collection player ';
return false;
}
function f (u) {
var url = ajxg (u);
var a = new RegExp (/var videoid = ' (. *?) ';
var h = url.match (a);
Return H[0].replace (A, "$")
}
function SWFObject (SWF, ID, W, h, ver, c) {
This.params = new Object ();
This.variables = new Object ();
This.attributes = new Object ();
This.setattribute ("id", id);
This.setattribute ("name", id);
This.setattribute ("width", w);
This.setattribute ("height", h);
This.setattribute ("Version", ver);
This.setattribute ("SwF", SWF);
This.setattribute ("ClassID", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
This.addparam ("bgcolor", c);
}
Swfobject.prototype.addparam = function (key,value) {
This.params[key] = value;
}
Swfobject.prototype.getparam = function (key) {
return This.params[key];
}
swfobject.prototype.addvariable = function (key,value) {
This.variables[key] = value;
}
swfobject.prototype.getvariable = function (key) {
return This.variables[key];
}
Swfobject.prototype.setattribute = function (key,value) {
This.attributes[key] = value;
}
Swfobject.prototype.getattribute = function (key) {
return This.attributes[key];
}
Swfobject.prototype.getvariablepairs = function () {
var variablepairs = new Array ();
For (key in This.variables) {
Variablepairs.push (key + "=" + This.variables[key]);
}
return variablepairs;
}
swfobject.prototype.gethtml = function () {
var con = ';
if (navigator.plugins && navigator.mimetypes && navigator.mimetypes.length) {
Con = = ' <embed type= "Application/x-shockwave-flash" pluginspage= "Http://www.macromedia.com/go/getflashplayer" src= "' + this.getattribute (' swf ') + '" width= "' + this.getattribute (' width ') + '" height= "' + this.getattribute (' height ') + '"';
Con = = ' id= ' + this.getattribute (' id ') + ' name= ' + this.getattribute (' id ') + ' ";
for (var key in this.params) {con + = [key] + ' = ' + This.params[key] + ' ';}
var pairs = This.getvariablepairs (). Join ("&");
if (Pairs.length > 0) {con = = ' flashvars= ' + pairs + ' "';}
con = = '/> ';
}else{
con = ' <object id= ' + this.getattribute (' id ') + ' classid= ' + this.getattribute (' classid ') + ' codebase= ' http:// Download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version= ' +this.setattribute ("version") + ', 0,0,0 ' Width= "' + this.getattribute (' width ') + '" height= "' + this.getattribute (' height ') + ' > ';
Con = = ' <param name= ' movie ' value= ' + this.getattribute (' swf ') + '/> ';
for (var key in This.params) {
Con = = ' <param name= ' + key + ' "value=" ' + this.params[key] + '/> ';
}
var pairs = This.getvariablepairs (). Join ("&");
if (Pairs.length > 0) {con = = ' <param name= ' flashvars ' value= ' + pairs + ' "/> ';}
Con = + "</object>";
}
return con;
}
Swfobject.prototype.write = function (ElementID) {
if (typeof ElementID = = ' undefined ') {
document.write (this.gethtml ());
}else{
var n = (typeof ElementID = = ' string ')? document.getElementById (ElementID): ElementID;
n.innerhtml = this.gethtml ();
}
}
function Onplayercomplete (cdnid,isfullscreen) {
Playerplaynext ();
}
var show_pre=1;
var show_next=1;
function Addflash (url,w,h) {
var Orginflash = {init:true,isfullscreen:false,position: "", Top: "", Left: "", Width: "", Height: ""};
var so = new SWFObject ("http://static.youku.com/v1.0.0281/v/swf/qplayer.swf", "Movie_player", W, H, 8, "# FFFFFF ");
so.addvariable (" Show_pre ", show_pre);
so.addvariable (" Show_next ", Show_next);
so.addvariable ("Isshowrelatedvideo", "false");
so.addvariable ("Showad", "0");
so.addvariable ("videoids", url);
so.addvariable ("Isautoplay", true);
so.addvariable ("Isdebug", false);
so.addvariable ("Wintype", "interior");
so.addvariable ("Playmovie", "true");
so.addparam ("allowFullScreen", "true");
so.addparam ("allowScriptAccess", "always");
so.addvariable ("Mmcontrol", "false");
so.addvariable ("Mmout", "false");
so.addvariable ("Recordcode", " 1001,1002,1003,1004,1005,1006,2001,3001,3002,3003,3004,3005,3007,3008,9999 ");
This.workspace.innerhtml =so.gethtml ();
}
show_pre=1;
Show_next=1;
</script>
<script language=javascript>
function Playerplaynext () {
if (show_next==1)
onnum=onnum+1;
Play (Onnum);
}
</script>
<script language=javascript>
document.getElementById ("Scrolllist"). style.height=document.body.clientheight-5+ "px";
Workspace.style.height =document.body.clientheight-5+ "px";
Workspace.style.width =document.body.clientwidth-5+ "px";
Nova_update ("http://www.youku.com/show_page/id_zcbffdc08962411de83b1.html", 1);
</script>
Save it as an HTA, and hope you can optimize the code