|
@@ -263,6 +263,7 @@ CampusInfoBrowser.LocalStorage=function(webview){
|
|
|
url:webview.src,
|
|
url:webview.src,
|
|
|
title:webview.tag.children[0].children[1].innerHTML,
|
|
title:webview.tag.children[0].children[1].innerHTML,
|
|
|
data:new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay()),
|
|
data:new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay()),
|
|
|
|
|
+ time:new Date().toLocaleString(),
|
|
|
key:time,
|
|
key:time,
|
|
|
}
|
|
}
|
|
|
for (a in localStorage) {
|
|
for (a in localStorage) {
|
|
@@ -274,17 +275,6 @@ CampusInfoBrowser.LocalStorage=function(webview){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
localStorage.setItem(time, JSON.stringify(datas));
|
|
localStorage.setItem(time, JSON.stringify(datas));
|
|
|
- // for (a in localStorage) {
|
|
|
|
|
- // var str = localStorage[a];
|
|
|
|
|
- // // var str = str.substring(0,str.length+1);
|
|
|
|
|
- // var storage = JSON.parse(str)
|
|
|
|
|
- // // var table = $("#aaa")[0];
|
|
|
|
|
- // // var tr = table.insertRow (table.rows.length);
|
|
|
|
|
- // // var aaa = tr.insertCell (tr.cells.length);
|
|
|
|
|
- // // aaa.innerText = storage.title;
|
|
|
|
|
- // // aaa.innerText += storage.url;
|
|
|
|
|
- // // aaa.innerText += storage.data;
|
|
|
|
|
- // }
|
|
|
|
|
}
|
|
}
|
|
|
CampusInfoBrowser.Init=function () {//初始化
|
|
CampusInfoBrowser.Init=function () {//初始化
|
|
|
CampusInfoBrowser.UrlArea=$(".bowerSeach input")[0];//获取搜索框
|
|
CampusInfoBrowser.UrlArea=$(".bowerSeach input")[0];//获取搜索框
|
|
@@ -308,8 +298,9 @@ CampusInfoBrowser.Init=function () {//初始化
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
CampusInfoBrowser.BrowersMenuButtom.onclick=function (event) {//点击菜单
|
|
CampusInfoBrowser.BrowersMenuButtom.onclick=function (event) {//点击菜单
|
|
|
- CampusInfoBrowser.OnclickMenu.style.display="block";
|
|
|
|
|
(event || window.event).cancelBubble = true
|
|
(event || window.event).cancelBubble = true
|
|
|
|
|
+ CampusInfoBrowser.OnclickMenu.style.display="block";
|
|
|
|
|
+ // (event || window.event).cancelBubble = true
|
|
|
};
|
|
};
|
|
|
document.onclick = function (){
|
|
document.onclick = function (){
|
|
|
CampusInfoBrowser.OnclickMenu.style.display="none";
|
|
CampusInfoBrowser.OnclickMenu.style.display="none";
|
|
@@ -330,6 +321,7 @@ CampusInfoBrowser.Init=function () {//初始化
|
|
|
};
|
|
};
|
|
|
setInterval('CampusInfoBrowser.Action()',1000);
|
|
setInterval('CampusInfoBrowser.Action()',1000);
|
|
|
CampusInfoBrowser.OnclickMenu.History=function(){
|
|
CampusInfoBrowser.OnclickMenu.History=function(){
|
|
|
|
|
+ // CampusInfoBrowser.OnclickMenu.style.display="none";
|
|
|
var History = new U.UF.UI.form("历史记录",$$("div",
|
|
var History = new U.UF.UI.form("历史记录",$$("div",
|
|
|
{"className":"HistoryBody",}),
|
|
{"className":"HistoryBody",}),
|
|
|
{ "style": { "width": "570px", "height": "80%", "maxHeight": "700px", "position":"aboulute","top":"20%","left":"50%"} },
|
|
{ "style": { "width": "570px", "height": "80%", "maxHeight": "700px", "position":"aboulute","top":"20%","left":"50%"} },
|
|
@@ -348,18 +340,27 @@ CampusInfoBrowser.Init=function () {//初始化
|
|
|
});
|
|
});
|
|
|
var first=HistoryBody.firstChild;//得到第一个元素
|
|
var first=HistoryBody.firstChild;//得到第一个元素
|
|
|
HistoryBody.insertBefore(HistoryBody.body,first);//在得到的第一个元素之前插入
|
|
HistoryBody.insertBefore(HistoryBody.body,first);//在得到的第一个元素之前插入
|
|
|
- HistoryBody.data=$$("span", {
|
|
|
|
|
- "className": "history_data","innerHTML":storage.data,"draggable":"false"
|
|
|
|
|
|
|
+ HistoryBody.time=$$("span", {
|
|
|
|
|
+ "className": "history_time","innerHTML":storage.time,"draggable":"false"
|
|
|
}, HistoryBody.body);
|
|
}, HistoryBody.body);
|
|
|
HistoryBody.title=$$("span", {
|
|
HistoryBody.title=$$("span", {
|
|
|
- "className": "history_data","innerHTML":storage.title,"draggable":"false"
|
|
|
|
|
|
|
+ "className": "history_title","innerHTML":storage.title,"draggable":"false"
|
|
|
}, HistoryBody.body);
|
|
}, HistoryBody.body);
|
|
|
- HistoryBody.url=$$("span", {
|
|
|
|
|
- "className": "history_data","innerHTML":storage.url,"draggable":"false"
|
|
|
|
|
|
|
+ HistoryBody.url=$$("a", {
|
|
|
|
|
+ "className": "history_url","innerHTML":storage.url,"draggable":"false"
|
|
|
}, HistoryBody.body);
|
|
}, HistoryBody.body);
|
|
|
-
|
|
|
|
|
|
|
+ HistoryBody.url.onclick=function(){
|
|
|
|
|
+ CampusInfoBrowser.CreatBrower(this.innerHTML);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ $(".BrowserHistoryClose")[0].onclick=function(){
|
|
|
|
|
+ $("body")[0].removeChild(History.form);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ CampusInfoBrowser.OnclickMenu.clear=function(){
|
|
|
|
|
+ // CampusInfoBrowser.OnclickMenu.style.display="none";
|
|
|
|
|
+ localStorage.clear();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
CampusInfoBrowser.CreatBrower('https://www.baidu.com');//开始进入一个页面
|
|
CampusInfoBrowser.CreatBrower('https://www.baidu.com');//开始进入一个页面
|
|
|
}();
|
|
}();
|