<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;">
<title>文件管理</title>
<link rel="shortcut icon" href="https://palhube666.wodemo.net/entry/539442/3bb276234ca6ec04b770595e3865c56e/favicon.jpg" type="image/x-icon" />
</head>
<body>
<h1>文件管理器</h1>
<a class="app-download text-content center" href="javascript:file('/storage/emulated/0/');">打开根目录</a>
<a class="app-download text-content center" href="javascript:file('/data/data/kawaii.vie/');">打开应用私有目录</a>
<h6>当前目录:</h6>
<h6 id='path'>未访问</h6>
<div style="display: flex;flex-direction: column;" id="warp">
</div>
<style>
*{margin: 0;padding:0;border: 0;-webkit-tap-highlight-color:rgba(0,232,204,0.1);}
html,body{
margin: 0;
}
.item{
background-color: #FFFFFF;
display: flex;
flex-direction: column;
padding-left: 20px;
padding-right: 15px;
padding-top: 6px;
padding-bottom: 15px;
}
.item:active{
background-color: #ededed;
}
h3{
font-size: 16.5px;
font-weight: 400;
margin: 0;
}
span{
font-size: 13px;
color: #999999;
margin-top: 4px;
}
*{user-select:none;}
.text-content{color:#666;font-size:16px;line-height:1.5;font-weight:400;letter-spacing:.5px}
.app-download,.app-download:hover{border:1px solid #000;color:#000;background:0 0;border-radius:2px;padding:8px 12px;margin:2px 10px 10px 2px;cursor:pointer;display:inline-block;font-size:14px;min-width:72px;text-decoration:none}.app-download:hover{background:rgba(0,0,0,.5)}
</style>
</body>
<script>
function file(path){
if (typeof(window.viek) == "undefined" || window.viek == null) {
alert('很抱歉您的浏览器不支持这个操作');
}
document.getElementById('warp').innerHTML = "";
document.getElementById('path').innerText = path;
var list = viek.getfile(path,'folder');
var div = document.createElement("div");
div.className = 'item';
var h3 = document.createElement("h3");
h3.innerText = '...';
div.appendChild(h3);
var span = document.createElement("span");
span.innerText = '上级目录';
div.appendChild(span);
document.getElementById('warp').appendChild(div);
div.onclick = function(){var cs = path.slice(0,path.lastIndexOf('/')).toString();file(cs.slice(0,cs.lastIndexOf('/')+1).toString());}
if (typeof(list) == "undefined" || list == null) {
}
else{
for (var i = 0; i < list.length; i++) {
var div = document.createElement("div");
div.className = 'item';
var h3 = document.createElement("h3");
h3.innerText = list[i];
div.appendChild(h3);
var span = document.createElement("span");
span.innerText = '文件夹';
div.appendChild(span);
document.getElementById('warp').appendChild(div);
div.onclick = function(){var cs = path+this.childNodes[0].innerText+'/'.toString();file(cs)}
}
}
var list2 = viek.getfile(path,'file');
if (typeof(list2) == "undefined" || list2 == null) {
if (typeof(list) == "undefined" || list == null) {
var div = document.createElement("div");
div.className = 'item';
var h3 = document.createElement("h3");
h3.innerText = '获取失败!';
div.appendChild(h3);
var span = document.createElement("span");
span.innerText = '嘤嘤嘤';
div.appendChild(span);
document.getElementById('warp').appendChild(div);
}
}
else{
for (var i = 0; i < list2.length; i++) {
var div = document.createElement("div");
div.className = 'item';
var h3 = document.createElement("h3");
h3.innerText = list2[i];
div.appendChild(h3);
var span = document.createElement("span");
span.innerText = '文件';
div.appendChild(span);
document.getElementById('warp').appendChild(div);
div.onclick = function(){var cs = path+this.childNodes[0].innerText.toString();alert(viek.getfile(cs,'do'));}
}
}
}
</script>
</html>
Back to home |
File page
Subscribe |
Register |
Login
| N