Skip to content

Commit c196f50

Browse files
committed
update
1 parent 5af17d9 commit c196f50

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

DownloadAllContent/DownloadAllContent.user.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// @name:zh-TW 怠惰小説下載器
55
// @name:ja 怠惰者小説ダウンロードツール
66
// @namespace hoothin
7-
// @version 2.8.3
7+
// @version 2.8.3.1
88
// @description Fetch and download main textual content from the current page, provide special support for novels
99
// @description:zh-CN 通用网站内容抓取工具,可批量抓取任意站点的小说、论坛内容等并保存为TXT文档
1010
// @description:zh-TW 通用網站內容抓取工具,可批量抓取任意站點的小說、論壇內容等並保存為TXT文檔
@@ -611,6 +611,7 @@ if (window.top != window.self) {
611611
float: initial;
612612
background-image: initial;
613613
height: fit-content;
614+
color: black;
614615
}
615616
#filterListContainer.customRule .dacCustomRule {
616617
display: flex;
@@ -1532,7 +1533,7 @@ if (window.top != window.self) {
15321533
})
15331534
exmpEles.forEach(e=>{
15341535
var cssSelStr="a",pa=e.parentNode,excludeTxt=excludeTxts[e];
1535-
if(e.className)cssSelStr+="."+CSS.escape(e.className);
1536+
if(e.className)cssSelStr+="."+CSS.escape(e.className.replace(/\s+/g, ".")).replace(/\\\./g, '.');
15361537
while(pa && pa.nodeName!="BODY"){
15371538
cssSelStr=pa.nodeName+">"+cssSelStr;
15381539
pa=pa.parentNode;

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// @description:zh-TW 線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存
1111
// @description:pt-BR Poderosa ferramenta de visualização de imagens on-line, que pode pop-up/dimensionar/girar/salvar em lote imagens automaticamente
1212
// @description:ru Мощный онлайн-инструмент для просмотра изображений, который может автоматически отображать/масштабировать/вращать/пакетно сохранять изображения
13-
// @version 2024.1.19.1
13+
// @version 2024.1.20.1
1414
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD////29vbKysoqKioiIiKysrKhoaGTk5N9fX3z8/Pv7+/r6+vk5OTb29vOzs6Ojo5UVFQzMzMZGRkREREMDAy4uLisrKylpaV4eHhkZGRPT08/Pz/IfxjQAAAAgklEQVQoz53RRw7DIBBAUb5pxr2m3/+ckfDImwyJlL9DDzQgDIUMRu1vWOxTBdeM+onApENF0qHjpkOk2VTwLVEF40Kbfj1wK8AVu2pQA1aBBYDHJ1wy9Cf4cXD5chzNAvsAnc8TjoLAhIzsBao9w1rlVTIvkOYMd9nm6xPi168t9AYkbANdajpjcwAAAABJRU5ErkJggg==
1515
// @namespace https://github.com/hoothin/UserScripts
1616
// @homepage https://www.hoothin.com
@@ -11738,7 +11738,7 @@ ImgOps | https://imgops.com/#b#`;
1173811738
let isPost = option && /^post$/i.test(option.method);
1173911739
_GM_xmlhttpRequest({
1174011740
method: (option && option.method) || 'GET',
11741-
url: url,
11741+
url: url.trim(),
1174211742
data: (option && option.body) || '',
1174311743
headers: (option && option.headers) || {
1174411744
referer: url,
@@ -11892,7 +11892,7 @@ ImgOps | https://imgops.com/#b#`;
1189211892
}
1189311893
_GM_xmlhttpRequest({
1189411894
method: 'GET',
11895-
url: url,
11895+
url: url.trim(),
1189611896
responseType:'blob',
1189711897
timeout:20000,
1189811898
headers: {
@@ -11917,7 +11917,7 @@ ImgOps | https://imgops.com/#b#`;
1191711917
a.onerror = function (e){
1191811918
urlToBlob(url, cb, forcePng, tryTimes);
1191911919
}
11920-
} else if (!blob) {
11920+
} else if (!blob || !blob.size) {
1192111921
urlToBlob(url, cb, forcePng, tryTimes);
1192211922
} else {
1192311923
cb(blob, ext);
@@ -12398,12 +12398,7 @@ ImgOps | https://imgops.com/#b#`;
1239812398

1239912399
const old_create = unsafeWindow.URL.createObjectURL;
1240012400
const old_revoke = unsafeWindow.URL.revokeObjectURL;
12401-
Object.defineProperty(unsafeWindow.URL, 'createObjectURL', {
12402-
get: () => storeAndCreate
12403-
});
12404-
Object.defineProperty(unsafeWindow.URL, 'getFromObjectURL', {
12405-
get: () => getBlob
12406-
});
12401+
unsafeWindow.URL.createObjectURL = storeAndCreate;
1240712402
const dict = {};
1240812403

1240912404
function storeAndCreate(blob) {
@@ -12428,7 +12423,8 @@ ImgOps | https://imgops.com/#b#`;
1242812423
}
1242912424

1243012425
async function getBase64FromBlobUrl(blobUrl) {
12431-
let blob = unsafeWindow.URL.getFromObjectURL(blobUrl);
12426+
let blob = getBlob(blobUrl);
12427+
if (!blob) return "";
1243212428
return new Promise(resolve => {
1243312429
blobToDataURL(blob, base64 => {
1243412430
resolve(base64);
@@ -16968,6 +16964,7 @@ ImgOps | https://imgops.com/#b#`;
1696816964
return !(container.contains(img) || (preloadContainer&&preloadContainer.contains(img)));
1696916965
});
1697016966

16967+
await sleep(1);
1697116968
// 已经在图库里面的
1697216969
var self = this;
1697316970
for (const img of imgs) {
@@ -16990,6 +16987,10 @@ ImgOps | https://imgops.com/#b#`;
1699016987
result.imgSrc = await getBase64FromBlobUrl(result.imgSrc);
1699116988
}
1699216989
}
16990+
if (result.sizeH == 0 && result.sizeW == 0) {
16991+
result.sizeH = img.naturalHeight;
16992+
result.sizeW = img.naturalWidth;
16993+
}
1699316994
validImgs.push(result);
1699416995
self.data.push(result);
1699516996
}
@@ -24664,7 +24665,7 @@ ImgOps | https://imgops.com/#b#`;
2466424665
function getUrl(url, callback, onError){
2466524666
_GM_xmlhttpRequest({
2466624667
method: 'GET',
24667-
url: url,
24668+
url: url.trim(),
2466824669
onload: callback,
2466924670
onerror: onError
2467024671
});

0 commit comments

Comments
 (0)