Home >Web Front-end >JS Tutorial >Gamer Folder Program ver 4.03_javascript skills

Gamer Folder Program ver 4.03_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:28:241056browse

/*********************************************
Gamer Folder Program ver 4.03
This JavaScript was written 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 time you upgrade the program, 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 passed in the address bar
function QueryString(qs)
{
var s = location.href;
s = s.replace("?"," ?&").split("&");
var re = "";
for(i=1;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";
}

//Enter the next target
function gotopage(str){location.href = "files.html?url=" escape(url str "/");}
//Return to previous First-level 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;})();

//Get the path of the referenced data 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);

//Show icons
(
function showicons()
{
if (FolderInfo.status == "unload") return setTimeout(showicons,80);

var len = FolderInfo.count;
var s = [""];
for(var i=0;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(["

" FolderInfo.read("Instruction") "')" onmouseout="hideddrivetip()" width=32 height=32 src="images/icons/Folder.gif">
" fn " else
s = s.concat(["
" FolderInfo.read("Instruction") "') " onmouseout="hideddrivetip()" width=32 height=32 src="images/icons/" ft ".gif">
" fn "
"]);
}
s = s.join("");
if(s=="")
s = "
No file";
inner.innerHTML = s;
window.status = len " objects";
}
)();

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn