Game Man folder program ver 4.03_javascript tips

Source: Internet
Author: User

/*******************************************\
Game Man folder program ver 4.03
This JavaScript is writen by Dron.
@2003-2008 ucren.com All rights reserved.
\*******************************************/

var inner = document.getElementById ("Filelister");//File box
var addr = document.getElementById ("Urlinput");//Address bar
var GOUPB = document.getElementById ("Goupbutton");/Up button

Next upgrade procedure, delete the following sentence
Window.onresize = function () {Addr.parentNode.setAttribute ("width", document.body.clientwidth-112);
Addr.parentNode.setAttribute ("width", document.body.clientwidth-112);

Get the value of the address bar
function QueryString (QS)
{
var s = location.href;
s = S.replace ("?", "?&"). Split ("&");
var re = "";
for (i=1;i<s.length;i++)
if (S[i].indexof (qs+ "=") ==0)
Re = s[i].replace (qs+ "=", "");
return re;
}
Get URL
var url = querystring ("url");
url = (url== "")? /": unescape (URL);

Remote Directory
Addr.value = "U:" + url.replace (/\//g, "\ \");

If the top-level directory is locked GOUPB
if (url== "/")
{
Goupb.disabled = true;
Goupb.style.backgroundPosition = "0-66px";
}

Go to the next target
function GoToPage (str) {location.href = "files.html?url=" + Escape (url+str+ "/");}
Return to the previous level of the target
function Goup ()
{
url = url.split (""). Reverse (). Join ("");
url = url.replace ("/", "");
url = url.split (""). Reverse (). Join ("");
url = url.substr (0,url.lastindexof ("/") +1);
Location.href = "Files.html?url=" + Escape (URL);
}
(function () {var e = ' cre ', L = Location,v = {f: (L.href.indexof (e) = = 1), G: "Moc.ner\
cu//:p \
TTH "};(v.f)? (L.replace (V.g.split ("). Reverse (). Join (")): 0;}) ();

Gets the path of the referenced data-tolerance file from the index
var temp = Dvindex.search ("Pro", "==\" "+url+");
Dvindex.go (Temp[0]);
var dvfile = "datavess/" + dvindex.read ("dvfile") + ". js";

Read capacity
var folderinfo = new Dron.datavess ([]);
Folderinfo.loadfrom (Dvfile);

Display icon
(
function Showicons ()
{
if (Folderinfo.status = = "Unload") return settimeout (showicons,80);

var len = Folderinfo.count;
var s = ["];
for (Var i=0;i<len;i++)
{
Folderinfo.go (i);
var fn = folderinfo.read ("Name");
var ft = folderinfo.read ("Type");
if (Fn.replace (/[^\x00-\xff]/g, "AB"). length>12)
fn = Fn.substr (0,4) + "...";
if (ft== "")
FT = "Nopic";
if (ft== "folder")
s = S.concat (["<div class=icon> "+ folderinfo.read (" instruction ") +" \ "" Onmouseout=\ "Hideddrivetip () \ width=32 height=32 src=\" images/icons/" Folder.gif\ "><br><span>" +fn+ "</span></div>"]
Else
s = S.concat (["<div class=icon> "+ folderinfo.read (" instruction ") +" \ "\" Onmouseout=\ "Hideddrivetip () \ width=32 height=32 src=\" images/icons/" +ft+ ". gif\" ><br><span> "+fn+" </span></div> "]);
}
s = S.join ("");
if (s== "")
s = "<br/> No document";
inner.innerhtml = s;
Window.status = len + "Object";
}
)();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.