Skip to content

Commit ed1760e

Browse files
committed
first checkin. Copy from archive.org CVS to openlibrary.org hg.
1 parent a4e98ff commit ed1760e

18 files changed

+2831
-0
lines changed

GnuBook/EnableGnuBookBeta.user.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// ==UserScript==
2+
// @name EnableGnuBookBeta
3+
// @namespace http://openlibrary.org/dev/docs/bookreader
4+
// @description Enables beta link to GnuBook ajax bookreader on archive.org details pages.
5+
// @include http://www.archive.org/details*
6+
// ==/UserScript==
7+
8+
var dlDiv = document.getElementById('dl');
9+
var links = dlDiv.getElementsByTagName('a');
10+
11+
var re = new RegExp (/stream\/(\S+)/);
12+
13+
for (var i = 0; i < links.length; i++) {
14+
var url = links[i].getAttribute("href");
15+
var reMatch = re.exec(url);
16+
17+
GM_log(url);
18+
if (null != reMatch) {
19+
if (2 == reMatch.length) {
20+
if("Flip Book" == links[i].firstChild.nodeValue) {
21+
var id = reMatch[1];
22+
GM_log('got it! ' + id);
23+
links[i].href="http://www.us.archive.org/GnuBook/?id="+id;
24+
links[i].firstChild.nodeValue = "Flip Book Beta!";
25+
}
26+
}
27+
}
28+
}

GnuBook/GnuBook.css

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#GnuBook {
2+
border:1px solid black;
3+
position:absolute;
4+
}
5+
6+
#GBtoolbar {
7+
height:25px;
8+
width:100%;
9+
background-color: rgb(241, 239, 237);
10+
}
11+
12+
#GBcontainer {
13+
/*height:95%;*/
14+
top:25px;
15+
bottom:0px;
16+
width:100%;
17+
overflow-x:auto;
18+
overflow-y:scroll;
19+
/*text-align: center;*/
20+
background-color: #625E25;
21+
position:absolute;
22+
}
23+
24+
.GBpagediv1up {
25+
background-color: #ccc;
26+
overflow:hidden;
27+
border-right:3px solid #333;
28+
border-bottom:3px solid #333;
29+
}
30+
31+
.GBpagediv2up {
32+
background-color: rgb(234, 226, 205);
33+
overflow:hidden;
34+
}
35+
36+
/* search sidebar */
37+
#GnuBookSearch {
38+
border:1px solid black;
39+
position:absolute;
40+
background-color: #625E25;
41+
}
42+
43+
#GnuBookSearchResults {
44+
background-color: #f8f8f8;
45+
top: 25px;
46+
bottom: 0px;
47+
overflow:auto;
48+
position: absolute;
49+
left: 0px;
50+
right: 0px;
51+
font-size: 0.85em;
52+
padding: 2px;
53+
}
54+
55+
.GnuBookSearchHilite {
56+
opacity: 0.20;
57+
filter: alpha(opacity = 20);
58+
background-color: #00f;
59+
position:absolute;
60+
}
61+
62+
.GBpageform {
63+
float: right;
64+
}
65+
66+
.GBicon {
67+
width: 24px;
68+
height: 24px;
69+
vertical-align: middle;
70+
}
71+
72+
/* footer stuff, from Rebecca's demo */
73+
#GBfooter {
74+
position:absolute;
75+
bottom: 1px; /* ensure no vertical scroll bar in FF */
76+
left: 0px;
77+
/*width: 100%;*/ /* this causes horizontal scroll bar in FF */
78+
right: 0px;
79+
clear: both;
80+
color: #FFF;
81+
padding: 0px 0px 0px 10px;
82+
background: #625E25;
83+
height: 2em;
84+
line-height: 25px;
85+
vertical-align: middle;
86+
font-size: 12px;
87+
}
88+
89+
.GBlogotype {
90+
float:left;
91+
font-weight: bold;
92+
height: 25px;
93+
line-height: 25px;
94+
vertical-align: middle;
95+
}
96+
97+
a.GBwhite { color: #fff }
98+
a.GBwhite:hover { text-decoration: none; }
99+
a.GBwhite:visited { color: #fff }
100+
101+
.GBnavlinks {
102+
float:right;
103+
padding: 0px 20px 0px 0px;
104+
margin: 0px;
105+
height: 25px;
106+
line-height: 25px;
107+
vertical-align: middle;
108+
}
109+
110+
/* thumnail view, from Rebecca's demo */
111+
.GBpdstatus-footer {
112+
position:absolute;
113+
height: 65px;
114+
bottom: 25px;
115+
width: 100%;
116+
background-color: #f8f8f8;
117+
border-top: 1px solid #ccc;
118+
text-align: right;
119+
padding: 0px 0px 0px 0px;
120+
}
121+
122+
.GBwidgetlabel {
123+
color: #919070;
124+
padding: 8px 8px 4px 8px;
125+
font-family: verdana, arial, helvetica, sans-serif;
126+
font-size: 10px;
127+
float: left;
128+
}

0 commit comments

Comments
 (0)