/[scripts]/trunk/firefox-sessionstore.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/firefox-sessionstore.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 104 - (hide annotations)
Sun Feb 1 22:48:36 2009 UTC (13 years, 11 months ago) by dpavlin
File MIME type: text/html
File size: 1733 byte(s)
re-idented from http://forums.mozillazine.org/viewtopic.php?f=38&t=622036

1 dpavlin 104 <html><head>
2     <style type="text/css">
3     a.selected, li.selectedtab { color: blue; font-weight: bold; }
4     li.closedtab { color: red; text-decoration: line-through; }
5     </style>
6     </head><body>
7     <ul id="windows">
8     <script type="text/javascript">
9     function dowindow(wind,wname,wclass) {
10     document.write("<li class=\"" + wclass + "\">");
11     document.write("<b>" + wname + "</b>");
12     document.write("<ol class=\"tabs\">");
13     var sel = wind["selected"];
14     var tabs = wind["tabs"];
15     for (var j = 0; j < tabs.length; j++) {
16     var tabclass = "tab"
17     if (j + 1 == sel) tabclass = "selectedtab"
18     dotab(tabs[j],"Tab #" + (j+1),tabclass);
19     }
20     var tablen = tabs.length;
21     tabs = wind["_closedTabs"];
22     for (var j = 0; j < tabs.length; j++) {
23     dotab(tabs[j]["state"],"Tab #" + (tablen + j + 1),"closedtab");
24     }
25     document.write("</ol>");
26     document.write("</li>");
27     }
28    
29     function dotab(tab,tname,tclass) {
30     document.write("<li class=\"" + tclass + "\">");
31     document.write("<b>" + tname + "</b>");
32     document.write("<ul class=\"urls\">");
33     var sel = tab["index"];
34     var urls = tab["entries"];
35     for (var j = 0; j < urls.length; j++) {
36     var urlclass = "url"
37     if (j + 1 == sel) urlclass = "selectedurl"
38     dourl(urls[j],urlclass);
39     }
40     document.write("</ul>");
41     document.write("</li>");
42     }
43    
44     function dourl(url,uclass) {
45     document.write("<li class=\"" + uclass + "\">");
46     var uname = url["title"];
47     if (!(uname) || uname == "") uname = url["url"];
48     document.write("<a href=\"" + url["url"] + "\">" + uname + "</a>");
49     document.write("</li>");
50     }
51    
52     var data =
53     // insert .mozilla/firefox/*/sessionstore.js here !
54     ;
55    
56     var windows = data["windows"];
57     for (var i = 0; i < windows.length; i++) {
58     dowindow(windows[i],"Window #" + (i+1),"window");
59     }
60     </script>
61     </ul>
62     </body>
63     </html>

  ViewVC Help
Powered by ViewVC 1.1.26