Skip to content

Commit

Permalink
Update TPDB to new site
Browse files Browse the repository at this point in the history
  • Loading branch information
timo95 committed Mar 5, 2024
1 parent 94a697c commit f809726
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Add support for javdb
- Improve responsiveness for sites with many entries by queueing batch queries [#28]
- Separate tooltip entries per endpoint
- Update TPDB to new site
- Fix data18 performer overview page
- Fix page change on Stash-box not detected [#25]

Expand Down
2 changes: 1 addition & 1 deletion metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export default {
"*://gayeroticvideoindex.com/*",
"*://javdb.com/*",
"*://kemono.su/*",
"*://metadataapi.net/*",
"*://onlyfans.com/*",
"*://oreno3d.com/*",
"*://pmvstash.org/*",
"*://r18.dev/*",
"*://shemalestardb.com/*",
"*://stashdb.org/*",
"*://theporndb.net/*",
"*://www.animecharactersdatabase.com/*",
"*://www.babepedia.com/*",
"*://www.data18.com/*",
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ import {initGeneralSettings} from "./settings/general";
}
break;
}
case "metadataapi.net": {
case "theporndb.net": {
let stashIdSelector = (_: Element) => document.evaluate("//div[text()='TPDB UUID']/following-sibling::div/text()", document, null, XPathResult.STRING_TYPE, null)?.stringValue?.trim();
// Alternative endpoint url. Query both the default and this one.
let stashIdEndpoint = "https://api.metadataapi.net/graphql";
let stashIdEndpoint = "https://api.theporndb.net/graphql";
if (window.location.pathname.startsWith("/performers/")) {
check(Target.Performer, "div.pl-4 > h2", {observe: true, urlSelector: currentSite, stashIdSelector});
check(Target.Performer, "div.pl-4 > h2", {observe: true, urlSelector: null, nameSelector: null, stashIdSelector, stashIdEndpoint});
Expand All @@ -142,9 +142,9 @@ import {initGeneralSettings} from "./settings/general";
check(Target.Movie, "div.flex.justify-between > h2", {observe: true, urlSelector: currentSite, stashIdSelector});
check(Target.Movie, "div.flex.justify-between > h2", {observe: true, urlSelector: null, nameSelector: null, stashIdSelector, stashIdEndpoint});
}
check(Target.Performer, "a[href^='https://metadataapi.net/performers/']", {observe: true});
check(Target.Scene, "a[href^='https://metadataapi.net/scenes/'], a[href^='https://metadataapi.net/jav/']", {observe: true});
check(Target.Movie, "a[href^='https://metadataapi.net/movies/']", {observe: true});
check(Target.Performer, "a[href^='https://theporndb.net/performers/']", {observe: true});
check(Target.Scene, "a[href^='https://theporndb.net/scenes/'], a[href^='https://theporndb.net/jav/']", {observe: true});
check(Target.Movie, "a[href^='https://theporndb.net/movies/']", {observe: true});
break;
}
case "www.javlibrary.com": {
Expand Down

0 comments on commit f809726

Please sign in to comment.