release: 1.2.5
This commit is contained in:
22
dist/jop.user.js
vendored
22
dist/jop.user.js
vendored
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name JAV 添加跳转在线观看
|
// @name JAV 添加跳转在线观看
|
||||||
// @namespace https://greasyfork.org/zh-CN/scripts/429173
|
// @namespace https://greasyfork.org/zh-CN/scripts/429173
|
||||||
// @version 1.2.4
|
// @version 1.2.5
|
||||||
// @author mission522
|
// @author mission522
|
||||||
// @description 为 JavDB、JavBus、JavLibrary 这三个站点添加跳转在线观看的链接
|
// @description 为 JavDB、JavBus、JavLibrary 这三个站点添加跳转在线观看的链接
|
||||||
// @license MIT
|
// @license MIT
|
||||||
@@ -170,8 +170,8 @@
|
|||||||
url: "https://netflav5.com/search?type=title&keyword={{code}}",
|
url: "https://netflav5.com/search?type=title&keyword={{code}}",
|
||||||
fetchType: "parser",
|
fetchType: "parser",
|
||||||
domQuery: {
|
domQuery: {
|
||||||
linkQuery: ".grid_cell>a",
|
linkQuery: ".video_grid_container a",
|
||||||
titleQuery: ".grid_cell>a>.grid_title",
|
titleQuery: ".video_grid_container",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1159,27 +1159,25 @@
|
|||||||
const SiteBtn = ({ siteItem, CODE, multipleNavi, hiddenError }) => {
|
const SiteBtn = ({ siteItem, CODE, multipleNavi, hiddenError }) => {
|
||||||
const { name, codeFormater } = siteItem;
|
const { name, codeFormater } = siteItem;
|
||||||
const formatCode = codeFormater ? codeFormater(CODE) : CODE;
|
const formatCode = codeFormater ? codeFormater(CODE) : CODE;
|
||||||
const link = siteItem.url.replace("{{code}}", formatCode);
|
const originLink = siteItem.url.replace("{{code}}", formatCode);
|
||||||
const [loading, setLoading] = p(false);
|
const [loading, setLoading] = p(false);
|
||||||
const [fetchRes, setFetchRes] = p();
|
const [fetchRes, setFetchRes] = p();
|
||||||
_(() => {
|
_(() => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
fetcher({
|
fetcher({
|
||||||
siteItem,
|
siteItem,
|
||||||
targetLink: link,
|
targetLink: originLink,
|
||||||
CODE: formatCode,
|
CODE: formatCode,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
setFetchRes(res);
|
setFetchRes(res);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
});
|
});
|
||||||
}, [fetcher, siteItem, CODE, link]);
|
}, [fetcher, siteItem, CODE, originLink]);
|
||||||
const multipleFlag = multipleNavi && (fetchRes == null ? void 0 : fetchRes.multipleRes);
|
const multipleFlag = multipleNavi && (fetchRes == null ? void 0 : fetchRes.multipleRes);
|
||||||
const tag = multipleFlag ? "多结果" : fetchRes == null ? void 0 : fetchRes.tag;
|
const tag = multipleFlag ? "多结果" : fetchRes == null ? void 0 : fetchRes.tag;
|
||||||
const resultLink = multipleFlag
|
const resultLink =
|
||||||
? fetchRes.multipResLink
|
(multipleFlag ? fetchRes.multipResLink : fetchRes == null ? void 0 : fetchRes.targetLink) ??
|
||||||
: fetchRes == null
|
originLink;
|
||||||
? void 0
|
|
||||||
: fetchRes.targetLink;
|
|
||||||
const colorClass = (fetchRes == null ? void 0 : fetchRes.isSuccess)
|
const colorClass = (fetchRes == null ? void 0 : fetchRes.isSuccess)
|
||||||
? "jop-button_green "
|
? "jop-button_green "
|
||||||
: "jop-button_red ";
|
: "jop-button_red ";
|
||||||
@@ -1189,7 +1187,7 @@
|
|||||||
return u("a", {
|
return u("a", {
|
||||||
className: "jop-button " + (loading ? " " : colorClass),
|
className: "jop-button " + (loading ? " " : colorClass),
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
href: resultLink === "" ? link : resultLink,
|
href: resultLink === "" ? originLink : resultLink,
|
||||||
children: [
|
children: [
|
||||||
tag &&
|
tag &&
|
||||||
u("div", {
|
u("div", {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const includeList = libSites.map((libItem) => libItem.href);
|
|||||||
|
|
||||||
const UserscriptConfig: MonkeyUserScript = {
|
const UserscriptConfig: MonkeyUserScript = {
|
||||||
author: "mission522",
|
author: "mission522",
|
||||||
version: "1.2.4",
|
version: "1.2.5",
|
||||||
license: "MIT",
|
license: "MIT",
|
||||||
name: "JAV 添加跳转在线观看",
|
name: "JAV 添加跳转在线观看",
|
||||||
// match: ["*://*/cn/?v=jav*"],
|
// match: ["*://*/cn/?v=jav*"],
|
||||||
|
|||||||
Reference in New Issue
Block a user