-
Notifications
You must be signed in to change notification settings - Fork 14
/
eBooksAssistant.user.js
457 lines (422 loc) · 42.7 KB
/
eBooksAssistant.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
// ==UserScript==
// @name eBooks Assistant
// @name:zh-CN 豆瓣读书助手
// @namespace https://github.com/caspartse/eBooksAssistant
// @version 24.07.2
// @description eBooks Assistant for douban.com, weread.qq.com
// @description:zh-CN 为豆瓣读书页面添加微信读书、多看阅读、京东读书、当当云阅读、喜马拉雅等直达链接; 为微信读书增加豆瓣评分及链接。
// @icon https://ebooks-assistant.oss-cn-guangzhou.aliyuncs.com/ebooks_assistant_logo_256.png
// @author Caspar Tse
// @license MIT License
// @supportURL https://github.com/caspartse/eBooksAssistant
// @match https://book.douban.com/subject/*
// @match https://weread.qq.com/web/bookDetail/*
// @match https://weread.qq.com/web/reader/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js
// @connect 127.0.0.1
// @connect api.youdianzishu.com
// @run-at document-end
// @grant GM_xmlhttpRequest
// @downloadURL https://update.greasyfork.org/scripts/412479/%E8%B1%86%E7%93%A3%E8%AF%BB%E4%B9%A6%E5%8A%A9%E6%89%8B.user.js
// @updateURL https://update.greasyfork.org/scripts/412479/%E8%B1%86%E7%93%A3%E8%AF%BB%E4%B9%A6%E5%8A%A9%E6%89%8B.meta.js
// ==/UserScript==
const version = "24.07.2";
// 如果自己部署服务,这里修改成你的服务器地址
const REST_URL = "https://api.youdianzishu.com/v2";
// Base64 icons
const base64_icon_weread = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABMlBMVEU4tP83tP8ysf8xsf8ysP8xsP8xr/8xrv8xrf8xrf4xrP8xrP4wrP4wq/4wqv4wqf4wqP4vqP4vp/4up/4rpv4rpf4tpv5Arf53xP6X0v6Fy/5Utv4upv4vpv4tpf5Utf7Q6v/8/v/////s9/+Mzf4wpv40p/7C5P/W7f+T0P7+/v/L6P+a0//z+v9lvP4rpP4vpf4tpP5Hr/7o9f/q9v/H5//+///k8//K6P8qo/4upP46qf7T7P/9/v94xP4vpP4so/52w/7v+P/B5P88qf4to/4uo/4tov6g1f7S6//d8P+X0f5Aq/4sov5DrP42pv4+qv43p/4rof4roP0roPwrof0uov4qoP0qoPyWzvmWzfmTzPlsu/ozo/z3+/73/P7t9v2IyPv0+v72+/7k8v31+v52qLiyAAAAAWJLR0QiXWVcrAAAAAd0SU1FB+QKERMSBxvkIzYAAAFFSURBVDjLhYqHUsJAFEWfcWMQNRQFayyxYsWuawk2ELsiKKFI/f9fcN9uZtgENGfuK3PmAvxFn3OVfoaiiAhcAhSFOJ5dQviWBRCiElVVCcGt4nYLGPDBv6D5AFogoGkifDSPgAAyyCPRERAcQoJOxJUFDCNBZ8RyCRjxgRV059X5o3sE6D5ACNFDHjoCQj5AWCbC4xIQQaKRzgnzd3QsFovjD9GexMcnJqemZ9gHhpso37Nz8wumubi0bBjegmBldS2xvrG5tb1jQLIHu3v7B4dHxydm4jTZs0DPzk3k4pIVLItSi0HxUkskdXWNhZvbOwvSHMpCnQfJ3Gcfso9Pz+m0U+ji5fXt/SPDHsghnzyMfKGQ5+Ir981FDoq2bRdx4SmVK5VySRJFG6oSP9VavV5jRwIaLpqtVtNtPIVGu934v9DFL75RivuAiiVCAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTEwLTE3VDExOjI2OjE5KzA4OjAwmsnyVQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0xMC0xN1QxMToxODowNyswODowMPAqZ5gAAAAASUVORK5CYII=";
const base64_icon_duokan = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABUFBMVEXtkC/tkC/tkC/tkC/tkC/tkC/tkC/tkC/tkC/tjy7tjiztjyztkC7vnUjzs3Hyq2LulDbvmUDysGrulzztjy3wpVb76NT//fz++fT3y57tkzXzuHn++PLyr2r3zaL////+9u7xpln0u4H//Przs3D406zxqmDysWz99u353b/ulz3ysW3869nxql/tkTHyrmf3zKD1w47vnUftkzTvnEXtkjPuljvyrmj75c775MzyrGPulTntkDDulDf638P63b/xqFv517PumT/98+nwo1L2xpX75tH1wIj//v3tkTDvnkn87Nr3zJ/vnEb86df+9/D0uHv517X98ujxplfzt3j++fP+9+/2ypvwolDulTjumD7638T+/Pj1xJDtkjL98+j64sn63sD76NX++vX3zqTzt3f86tf//v787+H0un741K764cb64sj517T1v4bwoEzN5UsNAAAACHRSTlMcnfP0nh388p6FZyYAAAABYktHRB8FDRC9AAAAB3RJTUUH5AoRExEwiHTV+gAAAUFJREFUOMu9k9dTAkEMxg9E3L2LekoUsEXFXk4RFAuIYgHsXbFg7+3/f/NmnGt7A/fimLfN/ia7+fJFknx+VjFqArWSL8iqRDAg1bGq4ZeYR/wnwGUFrDSXQQCgvqFRNQloag6BA8CW1nAk2mYAcntHp+ys0EVE3T1oAL2xPgHo14HIgFIRwMEhouER4xPK6Ni44qygTUzGp7jZRSI5LbaJKFv3ep8uHSA0Y9OBgQjw1OzcvFVCW0g7AcgsEmVV872l5Rx3VlB1YGXV0AHX1gUlGeYLRNHibxY3NrfEWfDtHaLdvTSCPqjc/sEhCgDDo2Oik9OzUuI8dXF5ZfzR5odyPEJUuL65vbuPPZTADUD58SmsT4SeX/IZq2G7ozD5+vb+8fn1DTbJHJbjclHNaAracy5PgnD+A1d7rp7n8nqt/w9oaTwtTt+bTAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0xMC0xN1QxMToyNjoyNCswODowMHWRlHYAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMTAtMTdUMTE6MTc6NDgrMDg6MDBzI0IGAAAAAElFTkSuQmCC";
const base64_icon_jd = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAE9GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja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Ck7zqJoQFSgAQKauoJXDyH73J3tmU2LyB26w6RoQH8hw5T3NNF4dlO1NbWTRPnLMBKJJFA6aOHqMeObpl4HTLbRKGqCEAonryR5yQAYfextZrYJQHbhKwFWJpmD9JUxtzaGQGYJiaAP79WIetbUHTzBt5T7agtzbsjQKmrRamrzSs5/NdNKDZrQ3Kr5SpAFBflj9/ny02AQKBP588m6rNzrmfOlswwMKMRfJe6UBsbsJIa1soKsrICX083orAgS2qL+N17RK5eQ+4pBa83PSHqLEB6QNcxvn/55eLW38HXb1FPtLlTxmNoYxMkX46gvRonNTuNLClHFBWDYWQIcL6GpgFS4Pm9tNiT8McyeDIbygyH0UbHSY6Mok1Moi98XHPECp7yg6B4nMgBew5kmFJHCIGFgfDZk9CYX0AbHSM5PIw2+QZ96TMAkkI8ZVU26boNd3dEqostd4aViKM2tyCDAZIvhjGiXwHwqCWIvXtASifvvxGiIhyofgacySZbKCpG6BMWOtK/z/6vglxJ/8TzXV/NJDCDvSjuNHqBGbHb6/lP9kL8xeX2i5QAAAAASUVORK5CYII=";
const base64_icon_dangdang = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5gISEgwldApyHgAABppJREFUWMO1l1tsnEcVx39nZr713uy1HcdxnBInTeLerKSXJC19CBVERKlAIKgIPBWkCsRF8MADQqhE4QWJywNSilSIVCFAaoUEohWNHEpLgkCmJG6aUleJm8SOG8d2bK+99nq9+30zw8O3ju3E3sRIPdLszO7OnP85/3PmzIwA0PNnUAq86wC+CBwAOoEmIAEoQFibeMABFSAPXAC6gRcRNYhz8NhnEHr+RFX5QZAfAQ8Cmg9HLHAW/A+B44BXiAPcQfDHwD0CTseGfyhNxxj+GLiDiMPg7BaQI8DGNfvjfdzLWqPDRuAI3vcZ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Y3WcQftO+LdSCQraZVNhmAnv3r2EfKwsj6iLkyzuV/hUvuTpw3Doq8vm8e7sbmGaPG4bxEkJO5XK5wEEyZ/lQEJesL2myzYigKu9hbK/7HhgiiyD7Soq5jS2msJZ7iaBa83beamwkInt1upD1ZZBtM2LeOlOk28o7ImoFVQFWHn4L2OoaOF/xkH2FuHUDa+3Mf2I3S4OJ6+elyMMJMNH84dnf8umrwIxCJajIvkLcKG7FNiNW2jDQYf2Rq1DmDKben5XBJTLZ/AZM+Tcm+wpxI7nW8q/19XUnUnEDjGplCHMTg8kTx8KikuwrxG3WNoMhZZasnhbZV4jbFdsM2VeI2yo3oCkk+wpx2+M2bJsh+wpxu2ebAbKvELfJcSwg+wpxu2GbWV1dJfsKcTvGrdhmyL5C3E5y3X0ssq8Qt2Ncb+ed7CvE7RjXZ5sh+wpxO8ENtM2QfYW47XJDbTNkXyFuO1zFHhgj+wpxO8q1BkiFkSRsUAzIvkLcFrhWYG1tbYVFJtlXiNs0t/IlNNlXiNtprpWxwowkZF8hbivcqLNCp5B9hbgtcTU7coPuI/sKcduzzZB9hbid5FYyVsiZQZCNREz2Chr3sGwkd+7c+Ufc8d+69nfBMZ54x0F2dnbCjhbiDjg3cIC0URtJcLPbfQsKcfufW8lYISXQRtJA6YoFhbiDxWVd1AFQSXH5fwEGAL+grJqdriJzAAAAAElFTkSuQmCC";
let x_unique_id = Math.random().toString(36).substring(2, 12);
console.log(x_unique_id);
// 信息查询:微信读书
const queryWeread = (isbn, title, subtitle, author, translator, publisher) => {
const handleResponse = (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
if (result.errmsg === "") {
const { url, price } = result.data;
let html_template_purchase = `<li><div class="cell price-btn-wrapper"><div class="vendor-name"><img class="eba_vendor_icon" src="${base64_icon_weread}">
<a target="_blank" href="${url}"><span>微信读书</span></a></div><div class="cell impression_track_mod_buyinfo"><div class="cell price-wrapper">
<a target="_blank" href="${url}"><span class="buylink-price"> ${price}元 </span></a></div><div class="cell">
<a target="_blank" href="${url}" class="buy-book-btn e-book-btn"><span>购买电子书</span></a></div></div></div></li>`;
if ($("#buyinfo .current-version-list").length) {
$("#buyinfo .current-version-list").prepend(html_template_purchase);
} else {
let elm_buyinfo_printed = `<div class="buyinfo-printed" id="buyinfo-printed"><h2><span>当前版本有售</span> · · · · · ·</h2><ul class="bs current-version-list"></ul></div>`;
$("#buyinfo").prepend(elm_buyinfo_printed);
$("#buyinfo .current-version-list").prepend(html_template_purchase);
}
}
}
GM_xmlhttpRequest({
method: "GET",
url: `${REST_URL}/weread?isbn=${isbn}&title=${title}&subtitle=${subtitle}&author=${author}&translator=${translator}&publisher=${publisher}&version=${version}&r=${Math.random()}`,
headers: {
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href,
"X-Unique-ID": x_unique_id
},
onload: handleResponse
});
}
// 信息查询:多看阅读
const queryDuokan = (isbn, title, subtitle, author, translator, publisher) => {
const handleResponse = (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
if (result.errmsg === "") {
const { url, price } = result.data;
let html_template_purchase = `<li><div class="cell price-btn-wrapper"><div class="vendor-name"><img class="eba_vendor_icon" src="${base64_icon_duokan}">
<a target="_blank" href="${url}"><span>多看阅读</span></a></div><div class="cell impression_track_mod_buyinfo"><div class="cell price-wrapper">
<a target="_blank" href="${url}"><span class="buylink-price"> ${price}元 </span></a></div><div class="cell">
<a target="_blank" href="${url}" class="buy-book-btn e-book-btn"><span>购买电子书</span></a></div></div></div></li>`;
if ($("#buyinfo .current-version-list").length) {
$("#buyinfo .current-version-list").prepend(html_template_purchase);
} else {
let elm_buyinfo_printed = `<div class="buyinfo-printed" id="buyinfo-printed"><h2><span>当前版本有售</span> · · · · · ·</h2><ul class="bs current-version-list"></ul></div>`;
$("#buyinfo").prepend(elm_buyinfo_printed);
$("#buyinfo .current-version-list").prepend(html_template_purchase);
}
}
}
GM_xmlhttpRequest({
method: "GET",
url: `${REST_URL}/duokan?isbn=${isbn}&title=${title}&subtitle=${subtitle}&author=${author}&translator=${translator}&publisher=${publisher}&version=${version}&r=${Math.random()}`,
headers: {
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href,
"X-Unique-ID": x_unique_id
},
onload: handleResponse
});
}
// 信息查询:京东读书
const queryJingdong = (isbn, title, subtitle, author, translator, publisher) => {
const handleResponse = (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
if (result.errmsg === "") {
const { url, price } = result.data;
let html_template_purchase = `<li><div class="cell price-btn-wrapper"><div class="vendor-name"><img class="eba_vendor_icon" src="${base64_icon_jd}">
<a target="_blank" href="${url}"><span> 京东读书</span></a></div><div class="cell impression_track_mod_buyinfo"><div class="cell price-wrapper">
<a target="_blank" href="${url}"><span class="buylink-price"> ${price}元 </span></a></div><div class="cell">
<a target="_blank" href="${url}" class="buy-book-btn e-book-btn"><span>购买电子书</span></a></div></div></div></li>`;
if ($("#buyinfo .current-version-list").length) {
$("#buyinfo .current-version-list").prepend(html_template_purchase);
} else {
let elm_buyinfo_printed = `<div class="buyinfo-printed" id="buyinfo-printed"><h2><span>当前版本有售</span> · · · · · ·</h2><ul class="bs current-version-list"></ul></div>`;
$("#buyinfo").prepend(elm_buyinfo_printed);
$("#buyinfo .current-version-list").prepend(html_template_purchase);
}
}
}
GM_xmlhttpRequest({
method: "GET",
url: `${REST_URL}/jd?isbn=${isbn}&title=${title}&subtitle=${subtitle}&author=${author}&translator=${translator}&publisher=${publisher}&version=${version}&r=${Math.random()}`,
headers: {
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href,
"X-Unique-ID": x_unique_id
},
onload: handleResponse
});
}
// 信息查询:当当云阅读
const queryDangdang = (isbn, title, subtitle, author, translator, publisher) => {
const handleResponse = (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
if (result.errmsg === "") {
const { url, price } = result.data;
let html_template_purchase = `<li><div class="cell price-btn-wrapper"><div class="vendor-name"><img class="eba_vendor_icon" src="${base64_icon_dangdang}">
<a target="_blank" href="${url}"><span>当当阅读</span></a></div><div class="cell impression_track_mod_buyinfo"><div class="cell price-wrapper">
<a target="_blank" href="${url}"><span class="buylink-price"> ${price}元 </span></a></div><div class="cell">
<a target="_blank" href="${url}" class="buy-book-btn e-book-btn"><span>购买电子书</span></a></div></div></div></li>`;
if ($("#buyinfo .current-version-list").length) {
$("#buyinfo .current-version-list").prepend(html_template_purchase);
} else {
let elm_buyinfo_printed = `<div class="buyinfo-printed" id="buyinfo-printed"><h2><span>当前版本有售</span> · · · · · ·</h2><ul class="bs current-version-list"></ul></div>`;
$("#buyinfo").prepend(elm_buyinfo_printed);
$("#buyinfo .current-version-list").prepend(html_template_purchase);
}
}
}
GM_xmlhttpRequest({
method: "GET",
url: `${REST_URL}/dangdang?isbn=${isbn}&title=${title}&subtitle=${subtitle}&author=${author}&translator=${translator}&publisher=${publisher}&version=${version}&r=${Math.random()}`,
headers: {
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href,
"X-Unique-ID": x_unique_id
},
onload: handleResponse
});
}
// 信息查询:喜马拉雅
const queryXimalaya = (isbn, title, subtitle, author, translator, publisher) => {
const handleResponse = (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
if (result.errmsg === "") {
const { url } = result.data;
const constructHtmlTemplatePartner = (type) => {
let template = `<div class="online-read-or-audio">
<div class="vendor-info">
<img class="vendor-icon" src="${base64_icon_ximalaya}">
<a class="vendor-name impression_track_mod_buyinfo" target="_blank" href="${url}">
喜马拉雅
</a>
</div>
<a class="vendor-link" target="_blank" href="${url}">
去试听
</a>
</div>`;
if (type === 'header') {
template = `<div class="online-type" data-ebassistant="audio"><h2>在线试听:</h2>${template}</div>`;
}
if (type === 'parent') {
template = `<div class="gray_ad online-partner"><h2>在线试听:</h2>${template}</div>`;
}
return template;
}
let html_template_partner;
if ($('.online-type[data-ebassistant="audio"]').length) { // 如果有试读听条目
html_template_partner = constructHtmlTemplatePartner();
$('.online-type[data-ebassistant="audio"] h2').after(html_template_partner);
} else if ($('.online-type[data-ebassistant="read"]').length) { // 如果没有试读听条目,但有试读条目
html_template_partner = constructHtmlTemplatePartner('header');
$('.online-type[data-ebassistant="read"]').after(html_template_partner);
} else { // 如果既没有试读听条目,也没有试读条目
if ($('.gray_ad.online-partner').length) { // 如果有 <div class="gray_ad online-partner"> 节点,插入元素
html_template_partner = constructHtmlTemplatePartner('header');
$('.gray_ad.online-partner').after(html_template_partner);
} else { // 如果没有 <div class="gray_ad online-partner"> 节点,创建节点
html_template_partner = constructHtmlTemplatePartner('parent');
$('#buyinfo').append(html_template_partner);
}
}
}
}
GM_xmlhttpRequest({
method: "GET",
url: `${REST_URL}/ximalaya?isbn=${isbn}&title=${title}&subtitle=${subtitle}&author=${author}&translator=${translator}&publisher=${publisher}&version=${version}&r=${Math.random()}`,
headers: {
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href
},
onload: handleResponse
});
}
// 同步图书元数据
const syncMetadata = (isbn, metadata) => {
GM_xmlhttpRequest({
method: "POST",
url: `${REST_URL}/sync_metadata?isbn=${isbn}&version=${version}&r=${Math.random()}`,
headers: {
"Content-Type": "application/json",
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href,
"X-Unique-ID": x_unique_id
},
data: JSON.stringify(metadata),
onload: (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
}
});
}
// 样式调整:添加新样式
const addNewStyle = () => {
const new_style = `<style type="text/css" media="screen">
/* 豆瓣读书页面 */
.eba_vendor_icon {
text-decoration: none;
display: inline-block;
vertical-align: middle;
width: 15px;
height: 15px;
margin-top: -2px;
border: 0;
border-radius: 50%;
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.6);
}
/* 微信读书页面 */
.douban_rating {
width: 75px;
height: 15px;
display: inline-block;
background-image: url("${base64_icon_douban_rating}");
background-size: 75px 165px;
background-repeat: no-repeat;
}
.douban_rating_star_0 {
background-position: 0 -150px;
}
.douban_rating_star_1 {
background-position: 0 -135px;
}
.douban_rating_star_2 {
background-position: 0 -120px;
}
.douban_rating_star_3 {
background-position: 0 -105px;
}
.douban_rating_star_4 {
background-position: 0 -90px;
}
.douban_rating_star_5 {
background-position: 0 -75px;
}
.douban_rating_star_6 {
background-position: 0 -60px;
}
.douban_rating_star_7 {
background-position: 0 -45px;
}
.douban_rating_star_8 {
background-position: 0 -30px;
}
.douban_rating_star_9 {
background-position: 0 -15px;
}
.douban_rating_star_10 {
background-position: 0 0;
}
</style>`;
$("html").append(new_style);
}
// 豆瓣读书页面主函数
const doubanMain = () => {
try {
const types = ['在线试读', '在线试听'];
const data = ['read', 'audio'];
types.forEach((type, index) => {
$('.online-partner .online-type h2:contains("' + type + '")').parent('.online-type').attr("data-ebassistant", data[index]); // 添加 data-ebassistant 属性
});
} catch(e) {
console.log(e);
}
let _doc = document.documentElement.innerHTML;
const regex_linked_data = /<script type="application\/ld\+json">([\s\S]+?)<\/script>/gi;
let linked_data = JSON.parse(regex_linked_data.exec(_doc)[1].trim());
const { isbn, name: title, url } = linked_data;
const author = linked_data.author.map(author => author.name).join(', ');
_doc = _doc.replace(/ /gi, " ");
// 豆瓣评分 rating_score
let rating_score = extractData(_doc, /<strong class="ll rating_num " property="v:average">([\s\S]+?)<\/strong>/gi);
// 出版社 publisher
let publisher = extractData(_doc, /<span class="pl">\s*出版社:?<\/span>\s*:?\s*<a[^>]+>([\s\S]+?)<\/a>/gi);
if (!publisher) {
publisher = extractData(_doc, /<span class="pl">\s*出版社:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
}
// 出品方 producer
let producer = extractData(_doc, /<span class="pl">\s*出品方:?<\/span>\s*:?\s*<a[^>]+>([\s\S]+?)<\/a>/gi);
if (!producer) {
producer = extractData(_doc, /<span class="pl">\s*出品方:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
}
// 副标题 subtitle
let subtitle = extractData(_doc, /<span class="pl">\s*副标题:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
// 原作名 original_title
let original_title = extractData(_doc, /<span class="pl">\s*原作名:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
// 译者 translator
let translator = extractData(_doc, /<span class="pl">\s*译者:?<\/span>\s*:?\s*<a[^>]+>([\s\S]+?)<\/a>/gi);
if (!translator) {
translator = extractData(_doc, /<span class="pl">\s*译者:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
}
// 出版年 published
let published = extractData(_doc, /<span class="pl">\s*出版年:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
// 页数 pages
let pages = extractData(_doc, /<span class="pl">\s*页数:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
// 定价 price
let price = extractData(_doc, /<span class="pl">\s*定价:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
// 装帧 binding
let binding = extractData(_doc, /<span class="pl">\s*装帧:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
// 丛书 series
let series = extractData(_doc, /<span class="pl">\s*丛书:?<\/span>\s*:?\s*<a[^>]+>([\s\S]+?)<\/a>/gi);
if (!series) {
series = extractData(_doc, /<span class="pl">\s*丛书:?<\/span>\s*:?\s*([\s\S]+?)<br\/?>/gi);
}
// 内容简介 description
let description = extractData(_doc, /<meta property="og:description" content="([^"]+?)"/gi);
description = description.replace(/<[^>]+>|\n/g, "");
// 封面图片 cover_url
let cover_url = extractData(_doc, /<meta property="og:image" content="([^"]+?)"/gi);
// 🚀🎉🎊🥳 图书元数据开放接口已上线,可前往 https://forms.gle/91z4wrtQngrbkK1g9 申请使用。
const metadata = {
isbn, rating_score, url, title, author, publisher, producer, subtitle, original_title, translator, published, pages, price, binding, series, description, cover_url
};
console.log(metadata);
queryWeread(isbn, title, subtitle, author, translator, publisher);
queryDuokan(isbn, title, subtitle, author, translator, publisher);
queryJingdong(isbn, title, subtitle, author, translator, publisher);
queryDangdang(isbn, title, subtitle, author, translator, publisher);
queryXimalaya(isbn, title, subtitle, author, translator, publisher);
syncMetadata(isbn, metadata);
};
const extractData = (doc, regex) => {
try {
return regex.exec(doc)[1].trim();
} catch(e) {
console.log(e);
return "";
}
};
// 微信读书页面主函数
const wereadMain = () => {
let vbookid = "";
const locationHref = window.location.href;
const match = locationHref.match(/(?:bookDetail|reader)\/([0-9a-zA-Z]+)/);
if (match && match[1].length <= 24) {
vbookid = match[1];
console.log(vbookid);
} else {
console.log('vbookid not match.');
return;
}
const handleResponse = (responseDetail) => {
const result = JSON.parse(responseDetail.responseText);
console.log(result);
if (result.errmsg === "") {
const { url, douban_rating_score, douban_rating_star } = result.data;
const book_ratings_container = $(".book_ratings_container");
const douban_info = `
<div id="eba_douban_rating" class="book_ratings_header" style="margin-bottom:24px;cursor:pointer!important;">
<a style="text-decoration:none!important;color:#1b88ee!important;" target="_blank" href="${url}">
<span style="display:flex;align-items:center;">
<img src="${base64_icon_douban}" style="display:inline-block;height:15px;">
<span style="display:inline-block;height:24px;padding:0 4px;">豆瓣评分 ${douban_rating_score} </span>
<span class="douban_rating ${douban_rating_star}"></span>
</span>
</a>
</div>`;
$("#eba_douban_rating").remove();
book_ratings_container.prepend(douban_info);
}
};
GM_xmlhttpRequest ({
method: "GET",
url: `${REST_URL}/weread/douban_info?vbookid=${vbookid}&version=${version}&r=${Math.random()}`,
headers: {
"User-agent": window.navigator.userAgent,
"X-Referer": window.location.href,
"X-Unique-ID": x_unique_id
},
onload: handleResponse
});
};
// 主函数
(() => {
'use strict';
addNewStyle();
const hostname = window.location.hostname;
if (/book\.douban\.com/.test(hostname)) {
doubanMain();
} else if (/weread\.qq\.com/.test(hostname)) {
setTimeout(() => wereadMain(), 100);
}
})();