|
@@ -147,24 +147,26 @@
|
|
|
for (date in localStorage) {
|
|
for (date in localStorage) {
|
|
|
var a = $$("div",{"className":"HistoryCard"});
|
|
var a = $$("div",{"className":"HistoryCard"});
|
|
|
addChild(BrowserHistory,a);
|
|
addChild(BrowserHistory,a);
|
|
|
- var a_head=$$("p",{"className":"HistoryCardHead","innerText":date},a);
|
|
|
|
|
- var a_container=$$("ul",{"className":"HistoryCardContainer"},a);
|
|
|
|
|
- var data = JSON.parse(localStorage[date]);
|
|
|
|
|
- for(var i=0;i<data.length;i++){
|
|
|
|
|
- var a_list=$$("li",{},a_container);
|
|
|
|
|
- $$("input",{"type":"checkbox","className":"Historyinput",'value': i,'onclick':function () {
|
|
|
|
|
- choose()
|
|
|
|
|
- }},a_list)
|
|
|
|
|
- var a_time=$$("span",{"innerText":data[i].time},a_list);
|
|
|
|
|
- var a_content=$$("div",{},a_list);
|
|
|
|
|
- $$("img",{"src":data[i].favicons,"draggable":"false"},a_content);
|
|
|
|
|
- $$("p",{"innerText":data[i].title},a_content);
|
|
|
|
|
- $$("p",{"innerText":data[i].url}, a_content)
|
|
|
|
|
- a_content.url=data[i].url;
|
|
|
|
|
- a_content.onclick=function () {
|
|
|
|
|
- ipc.send('open-history',this.url);
|
|
|
|
|
- ipc.send('BrowserHistory-close');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(date != "arr"){
|
|
|
|
|
+ var a_head=$$("p",{"className":"HistoryCardHead","innerText":date},a);
|
|
|
|
|
+ var a_container=$$("ul",{"className":"HistoryCardContainer"},a);
|
|
|
|
|
+ var data = JSON.parse(localStorage[date]);
|
|
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
|
|
+ var a_list=$$("li",{},a_container);
|
|
|
|
|
+ $$("input",{"type":"checkbox","className":"Historyinput",'value': i,'onclick':function () {
|
|
|
|
|
+ choose()
|
|
|
|
|
+ }},a_list)
|
|
|
|
|
+ var a_time=$$("span",{"innerText":data[i].time},a_list);
|
|
|
|
|
+ var a_content=$$("div",{},a_list);
|
|
|
|
|
+ $$("img",{"src":data[i].favicons,"draggable":"false"},a_content);
|
|
|
|
|
+ $$("p",{"innerText":data[i].title},a_content);
|
|
|
|
|
+ $$("p",{"innerText":data[i].url}, a_content)
|
|
|
|
|
+ a_content.url=data[i].url;
|
|
|
|
|
+ a_content.onclick=function () {
|
|
|
|
|
+ ipc.send('open-history',this.url);
|
|
|
|
|
+ ipc.send('BrowserHistory-close');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|