- mainlist = [lists["l1name"],lists["l2name"],lists["l3name"]]
- for(var i=0;i<lists["lists"].length;i++) {
- var div = document.createElement("div");
- div.setAttribute("class", "favorites-list users-list");
- document.getElementById("links").appendChild(div);
-
- var ul = document.createElement("ul");
- ul.setAttribute("id", mainlist[i]);
- div.appendChild(ul);
-
- var title = document.createElement("div");
- title.setAttribute("class", "title");
- ul.appendChild(title);
-
- var p = document.createElement("p");
- p.innerText = mainlist[i];
- title.appendChild(p);
-
- title.insertAdjacentHTML("beforeend", "<span id='add-"+mainlist[i]+"'>+</span>");
-
- var list = lists["lists"][i];
- for(var j=0;j<lists["lists"][i].length;j++) {
- var li = document.createElement("li");
- li.setAttribute("id", mainlist[i]+"-"+j);
- var siteurl = list[j][1];
- var name = list[j][0];
- // ronmurphy change start
- var img = document.createElement("img");
- img.className = "icon";
- img.src = "http://www.google.com/s2/favicons?domain="+siteurl+"";
- li.insertAdjacentHTML("beforeend", "<a href="+siteurl+"> <img src="+img.src+" alt="+extractDomain(siteurl,1)+"/> "+name+"</a>");
- // ronmurphy end
- //li.insertAdjacentHTML("beforeend", "<a href="+siteurl+">"+name+"</a>");
- li.insertAdjacentHTML("beforeend", "<span id='delete-"+j+"-"+mainlist[i]+"'>⨯</span>");
- ul.appendChild(li);
- }
-
- var sortable = Sortable.create(ul, {
- group: "userlists",
- onUpdate: function (evt) {
- save();
- }
- });
- }
-
- menu();
+ mainlist = [lists["l1name"],lists["l2name"],lists["l3name"]]
+ for(var i=0;i<lists["lists"].length;i++) {
+ var ul = document.createElement("ul");
+ ul.setAttribute("id", mainlist[i]);
+ document.getElementById("links").appendChild(ul);
+
+ var title = document.createElement("div");
+ title.setAttribute("class", "title");
+ ul.appendChild(title);
+
+ var p = document.createElement("p");
+ p.innerText = mainlist[i];
+ title.appendChild(p);
+
+ title.insertAdjacentHTML("beforeend", "<span class='add' id='add-"+mainlist[i]+"'>+</span>");
+
+ var list = lists["lists"][i];
+ for(var j=0;j<lists["lists"][i].length;j++) {
+ var li = document.createElement("li");
+ li.setAttribute("id", mainlist[i]+"-"+j);
+ var siteurl = list[j][1];
+ var name = list[j][0];
+ var img = document.createElement("img");
+ img.className = "icon";
+ img.src = "http://www.google.com/s2/favicons?domain="+siteurl+"";
+ li.insertAdjacentHTML("beforeend", "<a class='item' href="+siteurl+"><img src="+img.src+" alt="+extractDomain(siteurl,1)+"/> "+name+"</a>");
+ li.insertAdjacentHTML("beforeend", rmspan[0] + j + "-" + mainlist[i] + rmspan[1]);
+ ul.appendChild(li);
+ }
+
+ var sortable = Sortable.create(ul, {
+ group: "userlists",
+ onUpdate: function (evt) {
+ save();
+ }
+ });
+ }
+
+ menu();