// ==UserScript== // // @name IMDb Scout Mod // @version 24.1.2 // @namespace https://github.com/Purfview/IMDb-Scout-Mod // @description Auto search for movie/series on torrent, usenet, ddl, subtitles, streaming, predb and other sites. Adds links to IMDb pages from hundreds various sites. Adds movies/series to Radarr/Sonarr. Adds external ratings from Metacritic, Rotten Tomatoes, Letterboxd, Douban, Allocine, MyAnimeList, AniList. Media Server indicators for Plex, Jellyfin, Emby. Dark theme/style for Reference View. Adds/Removes to/from Trakt's watchlist. Removes ads. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAMFBMVEUAAAD/AAAcAAA1AABEAABVAAC3AADnAAD2AACFAAClAABlAAB3AADHAACVAADYAABCnXhrAAAD10lEQVRIx73TV4xMURgH8H/OnRmZWe3T7h2sOWaNXu7oJRg9UccuHgTRBatMtAgSg+gJu9q+kFmihcQoD8qLTkK0CIkoy0YJITsRD0rCKTHFrnkSv5e5c88/53znO+fiPwvsvrN038cPNqrG9pJmHkRVnPcpaTlHJY60cfPSpsrzl1LKihrmLvxhCM2i3OHvDx0d+H7e3F6JBv5iZMiJfhFTfPYDMHrMImpwimWWUdSgDQkbno7fFpUPVgh+pHFbZR4SovSctDCM9Hac9IKd9rO8EevtBCkXgY5IMmgquwypP7qqfcp/Tp4KLONDVsWh3RSBB2rnZfit69ocUdqLn2prrRZYM0Jg4JibamKsqe7gfEh5GOAfeYJjVHIPZvil97rcXkMog30byWRwXYRWoxHbzNFHJJpAarO8NdEBBsdCaP3WMJltTmQd4zlnekTq9Z5dgACwAlrpK4BxdV5mvLuspRgMSHbCIFF0iS8MZ5S8oYBYKY7rByC4dDM9uSIUmPOIwxgQBoYeF93auP4qFyPbIVXziWeGTH1EFM57kJo2hqQju6BwIyRf6RmCjdT4JOdiwNgiH/PPD3qoqlsNaXRd+fKtFfECxlZVNVF9SOsgTZEr2TUjJJbyeNX1IZrKIbyGlBABfpQPv2UDrly13LkJXDVhpQ5MhtGwcyF4HKjlU4E8xwB0AvDjd6AGmevZ87EcQRHgcO52e9uNsYELOrAa/Yh81YlmYLQJ5HWyq0+kzQ/DQKEusg6CRI27ryy8nReRS0wsoetkmRwogHSprliCckfEjXG9yAQc74J0WB99vu6DF3i3pMucsXM6tpBbxd2mVJAwXwGogNRBvGRA4jtHKTXkAIwLGCR/mT4Lh75oneQXXP9sAYfGRDCsnw7pX/jRZkU3M44kjw2l5zRIzb4CbZ8dULdL6wbNPZOpK0B6gN1UR1mdoxAaL/GrWiLPL3SEwW9YMTU/d64BtLahAVyucWhj9Mm8ign9IfQaBtd2/GbvCAEBpG5eMcrj2I0ktpKLeaqXQ3Pst42KGIshpdTmQLAeTgFGJ2wvh+tayMOR0n1RZ8B9z13vnOPBnsBq4E1ffgZpPFZHWVpO2cvhjYpOcbBd5TlhpDu5zq9mHGZcVi0y+VFkcFkDdyKJfTt99wEyHSEzDM90KH0nexpwZHJHKYYhjzlwGe0pP/IKfxociaEb7YDbi6KGJY1R2cR76E6NAtXqY4pPH3plLcl8LD7V+cOLUbUWRFZRPTAbVZO3mxK18Xc1ZaAiS8ARJXpZliXAomR94siiiMx8ZBOkXGTlnH0F/9ov1xPtWwEqP9wAAAAASUVORK5CYII= // @license MIT // // @homepage https://github.com/Purfview/IMDb-Scout-Mod // @supportURL https://github.com/Purfview/IMDb-Scout-Mod/issues // // @compatible firefox // @compatible opera // @compatible chrome // @compatible safari (it doesn't support the sites with logins) // @compatible edge // // @require https://cdn.jsdelivr.net/gh/sizzlemctwizzle/GM_config@43fd0fe4de1166f343883511e53546e87840aeaf/gm_config.js // @require https://greasyfork.org/scripts/403996-exev/code/ExEv.js?version=808391 // @require https://code.jquery.com/jquery-3.5.1.min.js // @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js // // @include https://*.imdb.tld/title/tt* // @include https://*.imdb.tld/search/title* // @include https://*.imdb.tld/user/ur*/watchlist* // @include https://*.imdb.tld/user/ur*/ratings* // @include https://*.imdb.tld/list/ls* // // @include https://*.imdb.tld/*/title/tt* // // @exclude /title\/tt\d+\/\w(?!(eference))/ // @exclude /anon/ // @exclude /pro.imdb/ // // @connect * // @grant GM_getValue // @grant GM_setValue // @grant GM_addStyle // @grant GM_openInTab // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand // @grant GM.getValue // @grant GM.setValue // @grant GM.openInTab // @grant GM.xmlHttpRequest // @grant GM.registerMenuCommand // @grant GM.notification // // @run-at document-start // @noframes // // @downloadURL https://update.greasyfork.icu/scripts/407284/IMDb%20Scout%20Mod.user.js // @updateURL https://update.greasyfork.icu/scripts/407284/IMDb%20Scout%20Mod.meta.js // ==/UserScript== // /*========================= Version History ================================== 1.00 - Initial public release, everything works on barebones greasemonkey 1.50 - Added the ability to select which sites to load from the GM script commands - Moved the required method to userscripts - Removed FH, NZB, Avax 1.60 - Added style elements and shading to display on imdb 1.62 - Fixed bug:SCC-ARC not removing when unchecked - Alphabetized list 1.70 - Cleaned up code - Added option to not run script on page load 1.71 - Deprecated action-box field 1.80 - Added icons that link to OpenSubs, Criticker, RT, YT 1.81 - Added support for tv, only displays on shows listed as 'tv series' - Added support for icheckmovies at top bar. 1.82 - Fixed title parsing for tv shows. 1.83 - Fixed dhive not working properly 1.90 - Set height of preference window to 450px, added scroll bar 1.91 - Added another 11 torrent sites 2.00 - Added auto updater 2.01 - Added TC, FreshOn, TVT, STF, CC - Cleaned up code (tabbing) - Removed THR - Added TV-Rage to top bar 2.02 - Added PS, THC, HH, HDStar - Fixed CC false positive 2.03 - TehC now uses tt - Added Raymoz mod for AT 2.04 - Added HDbits - Added TL 2.10 - Added genre page search functionality 2.11 - Fixed ICM because Nuked was whining 2.12 - Removed tvrage - Fixed iCM (added tt) - Added HDVNbits - Changed RevTT to .me - Added HDT - removed autoupdate 2.13 - removed xvidme - reinstated autoupdate - removed google chrome code - fixed hdvn and hdt issues 2.14 - Added @grant entries for API access - Fixed tt parser to work on imdb pages with referral info in url 2.2 - Switch preferences window to use GM_config - Consolidate icon & site lists - Added IPT, KASS, sHD, and HDW - Fix "Open All" link - Add option for strikethroughs on search page - Removed arrays from search URLs - Spring cleaning 2.21 - Added SSL to TVT, HDME, TC, AHD, IPT, SCC - Added SSL option for CG - Added GFT, GFT-Gems, GFT-TV - Fixed SCC, SCC-ARC search URL - Removed TheBox, TheDVDClub - Added more comments, cleaned up some more stuff 2.22 - Fixed TehC, BTN, BTN-Req, THC - Added a bunch of TV sites, courtesy of seedless - Added "both" option for sites, and made changes to allow coexistence of movie and TV sites with the same name - Code re-organization, documentation - Re-added code to allow an array for searchUrl 2.22.1 - Minor fixes 2.23 - Fixed THC, BTN - Distinguish between movies and TV on search page 2.24 - Separate load_on_start option for search page - Fix search_string on search page 2.25 - Added some helpful text when no sites have been enabled 2.26 - Added code to show links when on pages besides just the "front" one (e.g. http://www.imdb.com/title/tt2310332/reference) 2.26.1 - Correctly detect TV shows when on aforementioned pages. 2.3 - Incorporate a bunch of changes courtesy of Inguin: - Added SSL to AT, TE, D-noid, TG, YT, RT - Changed tracker short titles to canonical form ADC, KG - Updated D-noid from .me to .pw - Fixed broken AT search; also updated to use .me so avoids redirect - Added BitHQ, ET (eutorrents) - Removed two broken THC; replaced with one fixed - Removed iplay, horrorhaven, hdstar, scandbits, leecherslair - Removed needless CG http/https duplication - plenty of listed sites self-sign - A-Z sites list for readability - Cleanup YT search string - Copyedits - Clean up code (tabs, trailing spaces) - Use consistent naming style - Added Letterboxd, Subscene to icons - Added options for showing icons 2.31 - Added preliminary check for TSH - Change all SCC links to .org 2.31.1 - Typo fix 2.32 - On uncertain pages, display both movie and TV sites 2.33 - Add year to possible search params - Add rutorrent 2.33.1 - Change KG to .in 2.33.2 - Change TSH to .me 2.34 - Updated AT, TPB - Removed HDWing, TVT and CHDBits - Added RARBG - Re-added reverse match checking to support rarbg 2.35 - Fixed YouTube icon, add SubtitleSeeker icon - Added FL.ro, bB, BHD, HDS - Fixed TL, TehC, HDb, HDVN, AHD, KG - Renamed reverseMatch to positiveMatch 2.36 - Added Wikipedia to icon sites 2.36.1 - Typo fix 2.37 - Add PxHD 2.38 - Fix subtitle seeker - Added CG-c - Added FilmAffinity - Added option to skip http check entirely 2.38.1 - Typo fix 2.38.2 - Global replace parameters 2.38.3 - Typo fix 3.00 - Clean up some formatting - Add support for new IMDb page format - Update jquery 3.0.1 - Added Classix 3.0.2 - Updated documentation/comments 3.0.3 - Removed GOEM, FY, PS, MT - Added Metacritic, CanIStream.It?, AllMovie, Facebook, Amazon, Cartoon Chaos, MySpleen, Secret Cinema - Fixed Wikipedia icon 3.1 - Handle HTTP failures less silently 3.1.1 - Fix KASS 3.1.2 - Fix TPB, TE, HDT - Add MTV, DVDSeed 3.1.3 - Add M-T, UHDB, HDC, Blu-ray.com - Fix scenehd, RT 3.1.4 - Add HDClub 3.2 - Fix the button on new-style pages 3.2.1 - Fix AHD 3.3 - Be less obnoxious about failed calls 3.4 - Add Netflix icon - Remove a default parameter to satisfy Chrome 3.5 - Add KZ, NNM, BB-HD, t411, TD, Rutor - Fix HDClub - Fix preferences in Chrome, sort sites properly 3.5.1 - Remove DHive, Fix AHD 4.0 - Bring in UI changes courtesy of janot - Add spaceEncode and goToUrl to site options - Add option to show results as links instead of text - Differentiate between missing and logged out - General refactoring 4.1 - Add RARAT 4.2 - Fix t411 - Use magic .tld domain in @include 4.3 - Set @connect in metadata block 4.3.1 - Fix THC 4.3.2 - Add AR, TtN - Add year and "trailer" to youtube search - Fix M-team 4.3.3 - Fix BitHQ, PTP-Req, SCC 4.3.4 - Fix M-team, myspleen, avistaz, eutorrents - Removed KAT 4.3.5 - Fix IPT, Freshon - Add ExtraTorrent 4.3.6 - Fix Demonoid, EuTorrents (now CinemaZ) - Fix "Actually search for torrents" option - Add PrivateHD for movies and tv 4.3.7 - Apply CinemaZ fixes to AvistaZ as well 4.3.8 - Fix SurrealMoviez and MySpleen, switch to new PTP url 4.3.9 - Fix criticker, add CN 4.3.10 - Fix Netflix, MTV 4.3.11 - Add CHD back 4.3.12 - Fix typo 4.4 - Fix BeyondHD - Allow unicode when searching by name 4.4.1 - Add trakt.tv 4.4.2 - Added XS, HD-S, PTN, TBD, Blutopia - Removed Freshon, CN, ExT, t411, SCC - Fixed SC, TE, TG, Tik - Add .com for script runners that don't support .tld 4.5 - (Chameleon) - Added an option to run on ILC request pages - Fixed running on reference pages (new imdb style) - Added a delay of 1 second between loading the same site (by domain) - no more popcorn quota timeouts - Fixed running on search pages 4.5.1 - Removed (dead): BitHQ, TehC, FSS, ExtraTorrent, Cine-Clasico, and Secret-Cinema - Fixed the hack on goToUrl 4.5.2 - Fixed filelist.ro, Tik, TD - Added HDHome, HDU, OurBits 4.5.3 - Fixed TG, TE, HDSpace - Added XS 4.5.4 - Fixed HDU 4.5.5 - Fixed BHD 4.6 - Option to highlight if the movie is missing from PTP 4.7 - Added option to ignore the movie/tv distinction 4.7.1 - Fix blutopia, hdchina, indenting 4.7.2 - Fix SDBits, M-T - Add TTGg 4.7.3 - Enable on https versions of imdb sites - Add TTG 4.8.0 - Add FinVip, JoyHD, TO, TP, TS, TVCK - Fix TE, HDH, CZ, Subscene - Remove SubtitleSeeker - Rip out all site-specific code - Fix up minor code smells - Allow config name to be different from site name 4.8.1 - Add SP 4.8.2 - Add TMDB 4.8.3 - Add TGx - Fix TTG, JoyHD, HDH - Remove duplicate TMDB 4.9.0 - Add support for a user's watchlist 4.10.0 - Add support for icon sites on the reference view - Add HTTPS for icon sites that support it 4.11.0 - Fix search_string 4.11.1 - Remove Blutopia Fix IPT 4.11.2 - Add unogs 4.11.3 - Fix TVDB 4.11.4 - Add AB, remove ADC - Fix BHD, Demonoid, TPB, M-T, U2, BTN, BitHD 4.11.5 - Fix conditional check 4.12 - Update SDBits, BTN, PTP, TMDB - Apply some correctness changes 4.12.1 - Add CCT - Update CHD, AB, TTG #==============================================================================# # IMDb Scout Mod: #==============================================================================# 4.12.1-mod1 - First public release. New additions, tweaks, bugfixes. What I can remember: - Added: Blu, Retroflix, ACM, PTE, KG Requests, SC Requests. - Tweak: Classix search, and split to Movie/TV. - Tweak: Bunch of 'loggedOutRegex' added. - Fixed: Bunch of icons. - Fixed: TL, TPB. - Fixed: Bug in 'loggedOutRegex' logic. - New feature: Distinct icons on Requests. 4.12.1-mod2 - Removed: Canistream.it - Fixed: Few icons. - Fixed: Search bug if ampersand is in the title 4.12.1-mod3 - Removed: RARAT. - Added: Rarelust & Zooqle. - New feature: Sites are split to public & private (config menu). 4.12.1-mod4 - Added: YGG, CG Requests. - Tweak: CG-Cocks & CG Request icons. - Tweak: RuT search, split to TV/Movie. - Fixed: Filter out filled KG Requests. - New feature: %search_string_orig% (search by the original titles on the movie/tv pages), enabled on RuT and YGG. 4.12.1-mod5 - Fixed: CG Request. Demonoid typo. 4.12.1-mod6 - Removed: HDVN, HoundDawgs. - Added: 1337x, ETTV, LimeTor, HDSpain, RlsBB, DB, FF, THR, PTer. - Fixed: TD, Demonoid, RARBG. - Tweak: Bold'ed the titles of config menu sections for better visibility. - Tweak: 'Other titles' sorted in alphabetical order. - Tweak: Added 'loggedOutRegex' to all private & some public sites. - Fixed: All borked icons are fixed. - Fixed: Bug in 'loggedOutRegex' (false negative if site responds with redirect). 4.12.1-mod7 - Added: BRT. - Tweak: SDBits, U2. 5.0 - Fix: @namespace & @name changed to fix updating for plugins. 5.1 - Tweak: TVV, BB-HD. - Fixed: Invisible icons on dark background JoyHD, Rarelust, CZ, Zooqle, KG. - New feature: The new layout (icons are placed at top). Option to turn it off. - New feature: Option to select background for the new layout. 5.2 - Tweak: Small tweaks (some preferences will reset to default). - Fixed: Rarelust icon. 5.2.1 - Fixed: Rarelust icon (forgot to update it) - Added: RlsBB-Proxy ('RlsBB' now points to the main domain) 5.3 - Added: Tik-Req, AHD-Req. - Tweak: No icon borders if "Show results on one line" is off. - Fixed: Text color on the new layout. - New feature: Option to change size of the icons. 5.3.1 - Added: JPTV. - Fixed: ACM icon. 5.4 - Added: AG, CPS, Deildu (as public because open reg). - Tweak: PTP, DVDSeeds, AHD, PTer. - Fixed: Button code for legacy & new layout. - Fixed: Reference view for the new layout. 5.5 - Added: PreDB & dozen of the subtitles sites (all of it is set to the 2nd bar). - Fixed: Subscene - New Feature: New 'Subtitles' & 'Other searchable sites' sections (config menu), all set to 2nd bar. - New Feature: Two extra searchable bars for the movies page (Search/Watchlist page shows only 1st bar). - New Feature: Extra bars can be enabled/disabled/swapped at the preferences. - New Feature: Two new 'inSecondSearchBar' and 'inThirdSearchBar' attributes. Subtitles & Other searchable sites are set to 2nd bar. 3rd bar is empty, free space for custom configuration. 5.5.1 - Added: TVV-Req, GT, WC, RareFilm, Titlovi, MoviePosterDB, Ulož, srrDB, xREL. Tweak: PreDB, TE, 1337x, LimeTor, HDB, BTN. 5.5.2 - Added: XDCC, ixIRC. Tweak: GT. 5.5.3 - Added: EUC, 1337x-Proxy, LimeTor-Proxy. 6.0 - Added: BTN-Title (if someone prefer to search by the titles). - Tweak: PTP, "Your popcorn quota" added to loggedOutRegex. - Tweak: Refinement of code, comments and documentation. - Fixed: "TV Special" is not recognized as "TV" (now it works same as "TV Movie"). - Fixed: Broken TV/Movie distinction on the Search/Watchlist pages. - Fixed: Broken Watchlist search if "episode" is present. - Fixed: Broken 'Load' button on Watchlist pages. - Fixed: Broken %year% search on Search/Watchlist pages. - Fixed: Broken %goToUrl% on Search/Watchlist pages when "check for results" is on. - Fixed: Broken %goToUrl% on all pages when "check for results" is off. - Fixed: Broken %year% on TV-series pages. - Removed: 'Treat the watchlist as a search page?' option. - New Feature: Documentaries are treated as TV & Movie. - New Feature: %search_string_orig% works on Search/List/Watchlist pages too. - New Feature: Script supports List pages. 6.0.1 - Added: TSeeds. 6.0.2 - Tweak: TSeeds. 6.1 - Added: DC. - Tweak: BTN-Title, WC, TVV, TVV-Req, ACM, Blu, JPTV, M-T, U2 and ect.. - Tweak: Some code optimizations. - New Feature: Connection rate limiting for IMDb's domain. Sites are added more consequent on Search/List pages. - New Feature: Dynamic rates. Search on Title pages are much faster now. - New Feature: Optional 'rateLimit' attribute for sites. 6.1.1 - Fixed: TL, TSeeds. 6.1.2 - Added: TL-PL, 3CT, IT. - Tweaks: BTN-Req icon, Tik, Tik-Req. 6.2 - Added: TVU, Bit-Titan, SU, Tasmanites, BDC, FE, PTMSG. - Tweaks: AHD, AHD-Req, CPS, HDB. Some rate tweaks. - Fixed: Disabling 'Show results on one line?' removed icon borders on Search/List pages. - New feature: Sites are grouped by the result states on Search/List pages (same as on Title pages) (scout_tick). - New feature: Option to highlight preferred sites (brighter border of icon or bold text). - New feature: All icons of request sites ('-Req') are highlighted with a blue border if 'found'. - New feature: 3rd bar supported on Search/List pages. - New feature: Separate space in Config for the custom sites. Replace 'Dummy' placeholder with your custom sites. 6.2.1 - Added: TDB. - Tweaks: SDBits, TSeeds. 6.3 - Added: iTS. - Tweaks: TSeeds, Retroflix, Subscene. - New feature: Infotip on icons shows '(TV)' for 'TV' sites. 6.3.1 - Added: TT, TBA. 6.4 - Added: T2K, DT. - Tweak: Retroflix, TPB/TPB-Proxy. - Fixed: Broken "Open All" button. - New feature: Links of "icon sites" opens in new tabs. - New feature: Support for POST method with new 'mPOST' attribute. 6.5 - Added: SpaceTor, AlloCiné, SensCritique, КиноПоиск, MovieMistakes, TrailerAddict, ScreenAnarchy, MovieChat, The Numbers, Lumiere, Box Office Mojo, OFDb. - New feature: "Total sites" stats at the top of config. 7.0 - Tweaks : TTG, RuTor, TL-PL is renamed to TLPL. - Tweaks : TL search is by IMDb ID; searching by title is done with TL-Title. - Tweaks : Some sites moved to https. Some config tweaks. - Updated: GM_config & jQuery to latest versions. - Fixed : 'SpaceEncode' not working with 'goToUrl'. - New feature: "Load Settings" button if there is no sites enabled. - New feature: Page auto reloads after Settings close. - New feature: "Selected sites" stats at the top of config. - New feature: Greasemonkey v4 is supported. 7.1 - Added: AS, DVDCompare, DVDTalk, DVDBeaver. - New feature: Icon sites have hyperlinks in Settings too. 7.2 - Added: ProStyleX, TorDL, PHD-Req, DonTor, CineCalidad, DVD-Basen, MRQE, Movie-Censorship. - Tweaks: uNoGS, ETTV, CG, TVV-Req. - New feature: Icons of the "icon sites" are same size as other icons. 7.3 - Added: OmgWtf, DrunkenSlug. - New feature: Streamlined "icon sites" area. 7.4 - Added: NZBgeek, NZBfinder, NZBGrabit, NZBsu, abNZB, BD25, NZBplanet, NZBnoob, TVmaze, Aither. - New feature: Usenet sites are separated in Settings. 7.5 - Added: NinjaCentral, MIAtrix, altHUB, SceneNZB, NzbNdx, nzbforyou, GingaDADDY, HDA, FindAnyFilm, xThor. - New feature: 'mPOST' can be formed as json (atm only for icon sites). 7.6 - Added: DOGnzb, Sharewood, MovieBuff, ONLYscene, HD-F, E-T, SolidTor, MVG, BTDB, BD-film. - Tweaks: eThor, YGG (tv separated), TSeeds, RareFilm, M-T, TVCK. - Fixed: Iframes of the ads are interfering with Settings/GM_Config (script will remove ads). 7.6.1 - Added: ExiTor, SI, Team-HuSh, G-Free. 7.7 - New feature: HTTP status above 399 will produce an error (red border). 7.7.1 - Tweak: BDC. 7.7.2 - Added: ArenaBG. 7.8 - Added: LimeTor (tv), TorDL-Proxy, RMZ. - Tweaks: LimeTor-Proxy, 1337x-Proxy, TPB-Proxy, Demonoid, Classix (icon), TT. - Tweaks: Icons of some blocked sites moved to Imgur. - New feature: Streamlined the layout of Settings. 7.8.1 - Added: HEVCBay. 7.8.2 - Added: GloTor, Unlimitz, HDenc, SB, Zamunda. - Removed: SceneNZB, DB. - Tweaked: YGG, PTP, KG, U2. 7.8.3 - Tweaked: Zooqle. 7.8.4 - Added: Yubraca. 7.8.5 - Added: HDtime, HDAtmos, GD, DKBits, nCore, Thor-Island, Videoteka, DesiRel, Telly, WhatsOnMubi, JustWatch. - Removed: eThor. - Tweaked: ArenaBG, TGx, NNM (split to movies/tv), Bit-Titan, updated proxy sites. 7.8.6 - Added: SpeedApp, CMS, BJS. 7.8.7 - Added: Milkie (no search), HQS, TSH, DWR, BigBBS, CT, ST, PS, TM, MP, LS, NZBcat. - Removed: DKBits, SU, AG, ONLYscene, SpaceTor, Thor-Island. 7.9 - New feature: Icons sorting (on button click, beta testing) by Sapphire. For "found" icons only. Behaviour: Highlighted > Others > Requests (in alphabetical order), except order of highlighted is taken from Settings. Tweaked: CT, Subs4Free. 7.10 - Added: BWT. Fixed: Watchlist 7.11 - Merged code from Sapphire: New feature: Sites sorting when "Show results on one line" is off. New feature: Sorting button on the reference page. - New feature: The request sites on the new line when sorting (Option). - New feature: Added the sites sorting function for the missing. - Fixed: Misalignment of the icons after sorting. - Fixed: Sorting is done by a site's name instead of url. - Fixed: Script was loading on trivia, credits, reviews & ect pages. - Fixed: NBL. - Tweak: Removed redundant @include. 7.12 - Added: SPD, HT. - Tweaks: Sorting, Ads. 8.0 - New feature: Automatic alphabetical icons/sites sorting on Title page. Only for Public, Private, Usenet sites on the 1st searchable bar. "Found" sites are sorted as Highlighted > Others > Requests, order of the highlighted is taken from Settings. "Missing" sites are sorted only alphabetically, "LoggedOut" & "Error" sites are not sorted. Sorting starts when less than 5 sites are left to add. Found request sites are split only after all sites are added (Optional). Custom sites must be set to the 3rd/2nd search bar or sorting wont be working properly! 8.0.1 - Tweak: Subscene. - Tweak: Sorting functions moved above "main". 8.0.2 - Added: WF, CrazyHD, PTM. - Removed: DT. 8.1 - Added: SkT. - Fixed: AHD. - Removed: OpenSubsOnline - Bugfix: Firefox + GM4 combination wasn't working. New fixed GM_config lib. 8.2 - Tweak: Updated GM_config link (fix was merged into mainline). 8.3 - Bugfix: Page reload on Settings close wasn't working on Chrome and Opera. 8.4 - Bugfix: No vertical spacing between icons. - Bugfix: Non-square icons. 8.4.1 - Added: BP. 8.5 - Added: W-v3. - Fixed: BigBBS, RetroFlix, Zamunda, E-T, RARBG, WF, Snahp. - New feature: If rateLimit>1000 then when on List it won't increase. 8.5.1 - Added: DW, ADC. - Fixed: nCore. 8.6 - Added: PREcBurns, PREovh, preFYP. - Removed: MTV. - New feature: Other sites are split to Pre databases and Streaming sites. 8.7 - Tweak: Milkie moved to the icon sites. - Tweak: Some ratelimits added. - Tweak: Small tweak to code for ratelimit to IMDb site on List/Search pages. 8.7.1 - Added: PD. 8.7.2 - Added: HDZ. 8.7.3 - Added: PTTime. 8.7.4 - Tweaked: RARBG. 8.7.5 - Added: Reelgood, WtFnzb(no tv), DDLW (for ~German IPs). - Tweaked: OmgWtf(sort by size). DrunkenSlug & NZBfinder movie search by imdb id. 8.8 - Tweaked: RARBG, Subtitry (RU). - New feature: @noframes (probably proper fix for the bug "fixed" in v7.6). - New feature: Changed how script starts, should be faster now. 8.9 - Added: Fist of B-List, Criterion, Criterion Channel. - New feature: New "Other sites" category in Settings. 8.9.1 - Removed: AHD, AHD-Req. 8.9.2 - Added: MTV. 8.9.3 - Tweaks: Proxy updates. 9.0 - Added: DOGnzb (movie search is by IMDb id, tv search by TVDb id) . - New feature: Support search by TVDb ID and TMDb ID with new search URL parameters: %tvdbid% and %tmdbid%. If matching id is not found then it will be set to "00000000". Some functions are async now. 9.1 - New feature: All icons from Imgur and the problematic sites are stored in the script as Base64 strings. 9.1.1 - Fixed: YGG. 9.2 - Added: FZ, Portugas. - New feature: Ads removal moved to func. 9.2.1 - Added: HDFans, BTN-TVDb (should be more reliable than by imdb id). 9.3 - Tweaked: BHD. - New feature: On list/Watchlist page the "Load IMDb Scout" button moved to the top. 9.3.1 - Added: Simply Scripts, Scripts On Screen, IMSDb. 9.3.2 - Added: HDAI. - Fixed: PxHD, CG-Req. - Removed: IMSDb. 9.3.3 - Added: HB. 9.3.4 - Fixed: BD-film. 9.3.5 - Added: T (The Myth). 9.3.6 - Added: VidSrc, DbGDP, FZN, M-TB, ETpl. - Tweak: Ulož moved to the icon sites. 9.4 - Fixed: A typo in %tmdbid% code. 9.4.1 - Added: NTELogo, MOJBLiNK, MovieTorrentz. 9.5 - New feature: Add movies to Radarr (based on dirtycajunrice's code). 9.6 - New feature: Refined Radarr settings. 9.6.1 - Added: Anasch. - Tweaked: PTP, M-T, PTer, SDBits, U2, UHDB, TTG. 9.7 - New feature: Add tv-series to Sonarr. 9.7.1 - Added: TSP, Assrt (CN), GreekSubs (GR), HosszuPuska (HU), Pipocas (PT) & (BR), Nekur (LV), Titrari (RO), WizdomSubs (IL), Yavka (BG), Zimuku (CN), Feliratok (HU). 9.7.2 - Added: seleZen, Blu-Req, ACM-Req. 9.8 - Added: DesiTor, Caps-A-Holic. - New feature: Add/Remove movies/series/episodes to/from Trakt's watchlist. - Note: Current Tampermonkey ver. has bug with notifications, affected: Sonarr/Radarr/Trakt-Watchlist. 9.9 - Some code syntax and other tweaks. 9.10 - Fixed: T2K (tv). - Fixed: 'mPOST' wasn't working on the List/Search pages. - Fixed: 'SpaceEncode' wasn't working on 'mPOST'. 9.11 - New feature: Support for notifications on GM3. - New feature: New section in settings for the special icons/buttons. - Note: Tampermonkey fixed notifications from v4.13.6134. 9.11.1 - Added: Filmow, WB. 9.12 - Added: Simkl, MovieLens, ratehouse, Filmsomniac, MyMovieRack. - Added support for Milkie search (needs auth token). 9.12.1 - Added: Dl4All, 3Dsbs4u, myGully. 9.12.2 - Added: PB. 9.13 - Added new: GiroTor, LeechTurks, AveTor, 7torrents, xTorrenty, DevilTor, OxTor, Oasis, TCTG, HD-U, HD-U-Req, Lat-Team, Lat-Team-Req, Immortuos, Immortuos-Req, TorSurf, TorSurf-Req, Ztracker, Ztracker-Req. - Added: DesiRel-Req, Telly-Req, 3CT-Req, Aither-Req, Anasch-Req, AR-Req, AT-Req, BDC-Req, BP-Req, BRT-Req, BTN-IMDb-Req, BWT-Req, Classix-Req, CrazyHD-Req, CZ-Req, ExiTor-Req, FE-Req, FL-Req, FZ-Req, HB-Req, IPT-Req, IT-Req, iTS-Req, JPTV-Req, MP-Req, nCore-Req, NTELogo-Req, Portugas-Req, PS-Req, PTE-IMDb, PTM-Req, Retroflix-Req, Sharewood-Req, SI-Req, SpeedApp-Req, TDB-Req, Team-HuSh-Req, THC-Req, TL-Req, TSH-Req, Yubraca-Req. - Removed: E-T. 9.13.1 - Added: ARAMovie. 9.13.2 - Added: Cilipro, EXTTor, NPlus, NPlus-Req, DBy, DBy-Req. 9.14 - Added: BT4G, SW, WH. - Fixed: SolidTor. - Removed: 7torrents. - New feature: New 'ignore404' attribute. 9.14.1 - Added: TLFBits, UHDB-Req, ANT-Req, NBL-Req, bB-Req. 9.14.2 - Added: HDTurk. 9.14.3 - Added: HDMonkey. 9.15 - New feature: Check on tmdb/tvdb conversion, if it's not successful = 'error' icon. 9.15.1 - Added: RPTor, SF, BestCore, HD-F-Req, BHD-Req. - Tweak: HD-F (add search for tv). 9.15.2 - Tweaks: BTN, BTN-TVDb. 9.16 - Added: IS, IS-Req. - New feature: 'mPOST' can be formed as json for all sites. - New feature: 'mPOST' can be formed as json array (supports duplicate keys). - New feature: Support for parameters in 'searchUrl' & 'mPOST' at the same time. 9.16.1 - Added: HDT-Req. 9.16.2 - Added: ASC. 9.16.3 - Added: MKO. 9.16.4 - Added: Hon3yHD, Hon3yHD-Req, TLZ. 10.0 - New feature: Support for new IMDb layout. - New feature: Support %search_string_orig% on the reference pages. - Removed: Options for the legacy layout. - Checked the icon sites: some fixed & some icons updated. 10.1 - Updated: HB, MOJBLiNK. - Removed: CineCalidad. - New feature: If response is empty then site is 'logged_out'. - New feature: New attribute 'ignoreEmpty'. - Updated more icons of the icon sites. 10.2 - Updated: Blu. - Added: NZBSin, Douban, AE, ReinvenTor, 7torrents, CineCalidad, Cpasbien, PornoLab, PornoLab-ID. - New feature: Option to remove "Open all" button. - New feature: Option to change the size of the icons border. - Changed GM_config link to a better host. - Updated some icons of the public sites. 10.3 - Added: Mubi, Hurtom. - Updated: sHD. - New feature: Support for new IMDb layout on Lists/Search pages. - New feature: Support for reference view on Lists/Search pages (if set in Content Settings). - As everything is so big on the new layout the icon size default is bumped to 32. 10.4 - Added: HD-Olimpo, HD-Olimpo-Req. - Fixed: Sometimes script wasn't loading/icons disappearing on the new IMDb layout. 10.5 - New feature: Script removes tracking references from IMDb's URL (eg. ?ref_=tt_sims_tt_i_2). - New feature: Separate size setting for the icons in settings. 10.6 - New feature: Option to disable icons in settings. 10.7 - Fixed: Bug in the references removal code. - Refined @include and added @exlude so the script wouldn't activate where it shouldn't. 10.7.1 - Added: TSP-Req. - Removed: DesiTor. 10.7.2 - Added: NextEpisode, CineMaterial, FF-Req. - Updated: Aither, SI, HD-U, Lat-Team, Telly, NTELogo, FF, DBy. 10.8 - Added: InternetArchive, DDU (as icon - rate limit is too high). - New feature: Ads removal for the new layout and new option to disable it. - New feature: Option to force the title pages to open in Reference View without login. - Updated some private sites icons. 11.0 - Fixed: Trakt authorization was broken if imdb opens in Reference View. - New feature: Dark style for Reference View (optional). - New feature: Compact mode for Reference View (optional). 11.1 - Fixed: Few conditionals. 11.2 - Added: TNT (needs auth token). - New feature: Remove ":" and "-" symbols from the titles (possibly, search on some sites can break). - Tweaked the compact mode. 11.3 - Added: SceneRush, TorParadise, TCh, TTR, MH. - Reverted removal of "-". - Tweaked "Open all" button so it wouldn't open the special buttons. 11.3.1 - Added: Peeratiko, ArabScene. - Updated: MOJBLiNK. 11.4 - Added: HDCenter, HDCenter-Req, TorSyndikat, TorSyndikat-Req, BTF, TSC, NRW, NRW-Req, SFP, SFP-Req. - (Hacks: TorSyndikat link -> button. SFP-Req search works but links to the page without search results.) - New feature: German sites moved to the new section in settings - "German sites". 11.5 - Added: STT, Tubi, TurkTor, Partis. - Fixed: "Hack" in previous patch wasn't working properly. - Tweaked the buttons code. 11.6 - Added: Darius, EkşiSözlük, BeyazPerde, Sinemalar, Hancinema, Ktuvit, TVRopes, FilmKatalogus, RatinGraph, TürkçeAltyazı (TR). - Fixed: DonTor. 11.6.1 - Added: Sinefil (TR), InterSinema (TR), Filmux (LT), OK (RU). - Renamed few icon sites. 11.7 - Added: SoR. - New feature: No icon borders if auto-search is disabled. 12.0 - Added: Nitro. - New features: External ratings (beta testing on Reference View). Gets raw average rating from Letterboxd even if there is no score. Experimental atm: Rotten Tomatoes & Metacritic. - Some code tweaks. 12.1 - External ratings enabled for old layout. 12.2 - New features: Metacritic's "Must-See" badge. Rotten Tomatoes "Rotten" & "Certified Fresh" badge. Separate RT's Audience score. Ratings should be fully functional & enabled on all layouts. - Fixed: Buggy interaction of tracking removal & forced reference, start is ~twice faster. 12.3 - Added: PJs, PirataDigital, PirataDigital-Req, LegendasTV (BR), OpenSubtitles (BR), PreDB.de, PreDB.org, PreDB.pw. - Fixed: Some ratings can be 0, and 0 was shown when there were no ratings too (now '-'). - Removed: Filmsomniac, ADC. - New feature: Douban ratings. - New feature: Option to add your own OMDb API key (www.omdbapi.com/apikey.aspx), it's used to get Rotten Tomatoes ratings. - New feature: Support for search by Douban ID with %doubanid% parameter. 12.4 - Added: JME, JME-Req, OBNIV (FR). - Removed: PirataDigital (dupe of 'PD'). - New feature: Extract info to clipboard with the special button "Copy info to BBCode". 12.5 - Fixed: Reference View forcing wasn't working from imdb's chart pages. - Fixed: Dirty hack on IDs conversions, now they work properly and more reliably. - Reworked: "Copy info to BBCode" button. Double action, first click activates the button. Grey: standby, Yellow: working, Green(hollow): ready to copy, Red: error. - New feature: Option to disable grey background for the searchable sites bars in Reference View. - Added: Amazon Prime (DE). - Moved OBNIV to the third bar. 12.6 - Added: TorrentHistory, Wikidata. - New feature: Allocine ratings. 12.7 - Added: ABN, ABN-Req. - Additional fallback methods to get douban id. 12.8 - Fixed few ratings bugs. 13.0 - New feature: Special buttons/indicators for: Plex, Jellyfin. - Fixed: Allocine ratings bug. - Added: Swarmazon. 13.1 - Fixed: "#" and "&" in titles were breaking Plex. - Fixed: Non-default Jellyfin url wasn't working. - New feature: Indicator for Emby. - New features: If found on Plex/Jellyfin/Emby then link opens actual movie/series. - One more fallback method to get douban id. 13.2 - Removed: SW. - Added timeouts for the requests to sites. - New features: Debug and Timeout option. 13.3 - Removed: HEVCBay. - Added: TeRaCoD. - Fixed: Radarr/Sonarr custom profile id wasn't working. - Differential BTN icons. 13.4 - Fixed: IMDb ratings were not working in France(?). - Fixed: RT ratings were not shown for some new movies. - Fixed: Icons' size inconsistencies. - Improved: "Copy info to BBCode". Gets Runtime & Ratings from imdb if they are not on omdb. 13.4.2 - Removed: Cilipro. - Added: ADC, OpenSubtitles.com (EN) & (GR). 13.5 - Fixed: POST links stopped working on the redesigned pages (missing jQuery). 13.5.1 - Updated: ACM, ACM-Req. 13.6 - New feature: Add Top Review to the Reference View pages in compact mode. 13.7 - Added: Haidan, Haidan-Req. - Improved: "13.5" fix. 13.8 - Added: EMP. - Removed imdb's old layout code. 13.8.1 - Added: Arrow Films, CBT, CBT-Req, TBL, TMV, iBit. - Removed: Hon3yHD. 13.8.2 - Added: Uniongang, SunXDCC. - Removed: HDMonkey, Team-HuSh, ixIRC. 13.8.3 - Added: GPW. 13.8.4 - Added: TvRoad, Netflix-DVD, Blu-ray (moved to searchable, Other). 13.8.5 - Added: OshenPT, Itzmx. 13.8.6 - Added: CRT, CRT-Req. 13.8.7 - Added: Arsenevich, Hawkmenblues, MovieParadise, DesiTor, TorrentLand, RedBits, oMgWtFtrackr, TheRostrum, Taranis, AySTor, DataScene, Bukvi (BG). Updated: Snahp, ST, HDCenter, Yavka (BG), Arrow Films. Removed: ReinvenTor, TVU, DesiRel, LeechTurks, SF, Tasmanites, TBA, TCh, LS, NPlus, Oasis, Yubraca. 13.9 - Removed @grant's - GM.addStyle, GM_info, GM.info. 13.9.1 - Added: TurkSeed. 13.9.2 - Added: DVDs ReleaseDates. 13.9.3 - Added: WoT, TurkTracker, Yubraca. Updated: MTV. 13.9.4 - Added: SC-Desc, TVV-Desc. Updated: BTF, TSeeds. 13.9.5 - Removed: AS, ADC, DBy. 14.0 - New feature: Chinese sites & French sites sections. Added: DBy, HD-O. Removed: BTDB. 15.0 - New feature: Support for the video streaming APIs. New search URL parameters: %seriesid%, %seasonid%, %episodeid%. Updated: Sites in the Streaming section. Added: NetHD, Knaben. 15.0.2 - Updated: SubDivX (ES). 15.0.3 - Updated: WoT. 15.1 - Disabled referer on links. Added: STC, STC-Req. 15.1.1 - Added: Bit-City. 15.1.2 - Added: Voidtools Everything search engine to Other section [8080 port] ( www.voidtools.com ). Removed: CurtStream. 15.2 - New feature: Support for Radarr v4. Fixed: Bug with some sites (if it's mPOST and there are special chars in the name). Added: TorrentView, Bluray-Disc (DE). Updated AT, CZ and PHD to work in list view. Removed: ETTV, 7torrents. 15.2.1 - Added: TPB-ID, TPB-ID-Proxy. Removed: AniSubs. 15.2.2 - Added: DokuJunkies, SerienJunkies, FilmFans, SerienFans, Tor911, YesAsia, KMDb (KR), KoFiC (KR), KoreanFilm.org (KR), Eiga (JP), HKMDb (CN), Kinenote (JP). Removed: OxTor, RlsBB-Proxy. 16.0 - Updated script to work with new IMDb layout changes. 16.1 - CSS fix for reference pages (v16.0 regression). Added: PuZo, BTDigg. Updated: ARAMovie, TBL, TheRostrum, TorParadise, xTorrenty. Removed: T2K, TMV. 16.2 - Fixed: The icons bar wasn't smooth if icons occupied the few lines. Fixed: Script was running on anon.to urls with imdb url (anonymous redirect website). Possible fix for a rare bug when the script runs before page transfers to a reference page if set on imdb's settings. Added other sites/tools: MRI, Voidtools ES: URL protocol. Added the icon sites: 45worlds, ADP, AFI Catalog (US), BAMPFA - CineFiles, BBFC, Common Sense Media, ČSFD (CZ), eBay, Eiga chirashi (JP), FFF Movie Posters, Filmový přehled (CZ), Google Scholar, HRC - Movie Posters Collection, Heritage Auctions - Movie Posters, Kinorium (RU), LaserDisc Database, Media History Digital Library, MyDramaList (Asia), Posteritati, VHS Collector, WorldCat, Yahoo! Japan - Movies (JP). 16.2.1 - Added: Pahe, Nyaa, Filmboards. Updated: Movie-Censorship. 17.0 - Updated script to work with new IMDb layout changes. Removed MutationObserver (probably not needed anymore). Added: TV Guide, EpisodeCalendar. 17.0.1 - Moved: Tubi to the streaming sites. Removed: Bit-Titan. 17.0.2 - Added: Flick Metrix. 17.0.3 - Version bump: GitHub glitched with 17.0.2 update. 17.0.4 - Added: HBO Max Movie/Series Catalog [https://github.com/Purfview/IMDb-Scout-Mod/pull/110]. 17.0.5 - Added: 0dayhome, AllYouLike, ATorrents, AXEL torrents (BG). Updated: DonTor, ilCorSaRoNeRo, TCTG, Blu. Removed: bB, Arsenevich, G-Free, Proxy sites. 17.1 - Updated script to work with new IMDb layout changes [TV Episode pages]. 17.1.1 - Added: Tasmanites. Updated: NZBgeek (to ID search), MTV. Updated UNIT3D: Aither, HD-U, JME, NTELogo, LAT-Team, SI, STC, RedBits. Removed: PornoLab-ID, Telly, BP, PREcBurns. 17.2 - Fixed: Searchable sites with mPOST didn't work if auto-search was disabled. Added: TPB-Proxy (as icon site), Wikipedia Links Search, Francomac, MyAnimeList, AniDB. 17.2.1 - Added: CorruptNet-Pre, CorruptNet-Trace, LimitOfEden. 17.3 - New feature: Added option to disable Radarr/Sonarr notification when they don't respond. Added: HD-Source. Updated: NZBgeek (reverted 17.1.1). 17.3.1 - Added: HD4fun, Locadora, Telly, PSArips, RareFilmm, BitBR, Lapumia, Comando4K, ComoEuBaixo, OndeBaixa. Removed: oMgWtFtrackr, HDCenter, TorrentHistory, 2Embed, PD. 17.3.2 - Added: TMDB-ID, NewHeaven, MaDsRevolution. Removed: BitBR. 17.3.3 - Added: 2Embed, Filmweb (PL), Ancensored. 17.3.4 - Added: MrSkin. 17.3.5 - Added: LastFiles. 17.4 - Updated script to work with new IMDb layout changes [TV Episode pages]. Fixed: Most likely "17.1" fix wasn't working on the list pages. [untested] Updated: TSH. Removed: THC, HDME, Taranis, DWR, LookMovie.ws. 17.5 - Fixed: Error if page is "TV Episode" and there is no episode numbers. [probably since 15.0] Added: OpenSubtitles (NL), UHDMV. 17.5.1 - Added: SpiderTK. 17.5.2 - Added: JPTV-TMDb, Blu-TMDb, OpenSubtitles (Arabic). 17.6 - Fixed: Script was running on pro.imdb urls 17.6.1 - Updated: Knaben. 17.6.2 - Added: CarPT. 17.6.3 - Added: CinéLounge (FR). 17.6.4 - Added: UniOtaku. 17.7 - "Open All" button disabled by default. Option to disable the icon sites code. Option to disable the searchable sites code. 17.7.1 - Added: TOS. Removed: TDB, Anasch. 17.7.2 - Added: GimmePeers Removed: HQS 17.7.3 - Added: Mkvking, TFPDL, YTS, 9anime. 17.8 - Fixed: Inconsistency with mPOST formattings ["+" replacement with space for 2 & 3 formattings]. Updated: Portugas. 17.8.1 - Added: BitSearch, OldToonsWorld. Removed: TorSurf, Movietown. 17.9 - Fixed: Options from 17.7 didn't work properly. - Added: ReelFliX. 17.9.1 - Added: HDUse, HUNO. Note: There are some quirks with Violentmonkey v2.13.3, it will be fixed in v2.13.3.9: [ https://github.com/violentmonkey/violentmonkey/issues/1671 ] 17.9.2 - Update: Blu, RedBits. 17.10 - Fixed: Broken Douban and Metacritic ratings on the mobile browsers. Removed: SP. 18.0 - New feature: Show Rotten Tomatoes & Metacritic ratings for TV series. Added: NZBKing. 18.1 - New feature: Support other IMDb page languages: French, German, Hindi, Italian, Portuguese, Spanish. [Note: Anyway, some sites work properly only in English and(!) when IMDb is set to English titles & any English region at www.imdb.com/preferences/general] Added: AnimeVibe Lite, KissAnime, Actvid, KinoX (DE), StreamKiste (DE). Removed: 9anime, Filmux (LT). 18.2 - New feature: Change the names URLs to fullcredits on the Reference View [optional]. Fixed: Some TV/Movie discrepancies. TV only: Podcast Series|TV Mini Series [added only English]. Won't fix: Non-tv Shorts are searched in both on non-reference view. Added: AnimeWorld, Yugen, Filmai (LT), ADC2, Back-Ups, Tornado, Tigers, Crna Berza, PTN-Req, PornoLab-ID. Removed: Actvid, BD-film, LegendasTV, UHDMV, 3Dsbs4u, HDAI, Bit-City. 18.2.1 - Removed: Zooqle, ATorrents, TorParadise, Nitro, CineCalidad, ProStyleX, HDSpain. Updated: PTN. 18.2.2 - Added: ZmPT, GayTor. 18.3 - Fixed: Broken names URLs with "?ref" tracking. Added: Acervos, RoTor. Removed: PREovh. 18.4 - Fixed: Rotten Tomatoes ratings broken for episodes of TV series. [ www.imdb.com/title/tt14659496 ] Added: CineCartaz (PT), FilmSpot (PT), SapoMAG (PT), LegendasDivX (PT) [not working yet, need more info], Rutor-Title, Rutor.org, ShotOnWhat. 18.4.1 - Added: LST, RocketHD, SecretBinaries (DE). 19.0 - Fixed: IMDb's layout change was blurring the script's elements. 19.1 - Fixed: "19.0" fix had cosmetic issues. ["19.0" Reverted. Moved Scout elements one parent up.] Fixed: IMDb's layout change broke %search_string% & %search_string_orig%. Fixed: On some browsers
No sites enabled!\nScript's settings can be found in your Monkey's shortcut.\nFor now you can press this temporary button:"); var p = $('').attr('id', 'imdbscout_settings_button'); p.append($('').css({'cursor':'pointer', 'background-color':'#F5C518', 'color':'blue', 'font-weight':'bold'}).click(function() { GM_config.open(); $('#imdbscout_settings_button').remove(); })); $(elem).append(p); } } //============================================================================== // 'Load' button code //============================================================================== // Runs when "Load on Start?" is disabled. function displayButton() { var p = $('').attr('id', 'imdbscout_button'); p.append($('').css({'background-color':'#F5C518', 'color':'blue', 'font-weight':'bold'}).click(function() { $('#imdbscout_button').remove(); if (onSearchPage) { performSearch(); } else { performPage(); } })); // list, watchlist, ratings if (onSearchPage && $('.list_page_mc_parent').length) { $('.list_page_mc_parent').prepend(p); // advanced search } else if (onSearchPage && $('div.ipc-title hgroup h1.ipc-title__text').length) { $('div.ipc-title hgroup h1.ipc-title__text').parent().append(p); // title reference } else if (!onSearchPage && $('.titlereference-header').length) { $('.titlereference-header').append(p); // title redesign } else if (!onSearchPage && $('.ipc-page-section').length) { $('.ipc-page-section:eq(0)').parent().before(p); } else { console.log("IMDb Scout Mod (displayButton Error): Element not found! Please report it."); GM.notification("Element not found! Please report it.", "IMDb Scout Mod (displayButton Error)"); } } //============================================================================== // Icons at top bar on Title page //============================================================================== // Unlike the other URLs, they aren't checked to see if the movie exists. function addIconBar(movie_id, movie_title, movie_title_orig) { var iconbar; // reference + remove "Reference View" txt and a link to settings if ($('.titlereference-header div script').length) { // wrap text node for removal $($('.titlereference-header div script')[0].nextSibling).wrap(''); $('.removethis').remove(); $('.titlereference-change-view-link').remove(); iconbar = getIconsLinkArea(); // in case if code above breaks } else if ($('.titlereference-header').length) { console.log("IMDb Scout Mod (addIconBar Error): Some Reference code failed! Please report it."); if ($('h3[itemprop="name"]').length) { iconbar = $('h3[itemprop="name"]').append($(''); addform.attr('id', form_name); addform.attr('action', search_url); addform.attr('method', 'post'); addform.attr('style', 'display: none;'); addform.attr('target', '_blank'); addform.attr('rel', 'noreferrer'); if (post_data.match('},{')) { const dataArray = (new Function("return [" +data+ "];")()); dataArray.forEach(function (item, index) { let addinput = $(""); addinput.attr('type', 'text'); addinput.attr('name', item.key); addinput.attr('value', item.value); addform.append(addinput); $('body').append(addform); }); } else { data = JSON.parse(data); for (const name in data) { let addinput = $(""); addinput.attr('type', 'text'); addinput.attr('name', name); addinput.attr('value', data[name]); addform.append(addinput); $('body').append(addform); } } } iconbar.append(html).append(); // Call to '_Check URLs (for Dev tests)' funcs. if (site['name'] == "_Check URLs (for Dev tests)"){ start_CheckURLs(); } // Call to 'Copy Info to BBcode' funcs. if (site['name'] == "Copy Info to BBcode"){ start_copyInfoToBBcode(movie_id, movie_title_orig); } // Call to Emby funcs. if (site['name'] == "Emby"){ start_emby(movie_id, movie_title, movie_title_orig); } // Call to Jellyfin funcs. if (site['name'] == "Jellyfin"){ start_jellyfin(movie_id, movie_title, movie_title_orig); } // Call to Plex funcs. if (site['name'] == "Plex"){ start_plex(movie_id, movie_title, movie_title_orig); } // Call to Radarr funcs. if (site['name'] == "Radarr"){ get_radarr_movies(movie_id); } // Call to Radarr2 funcs. if (site['name'] == "Radarr2"){ get_radarr_movies(movie_id, true); } // Call to Sonarr funcs. if (site['name'] == "Sonarr"){ get_sonarr_tvseries(movie_id); } // Call to Trakt-Watchlist funcs. if (site['name'] == "Trakt-Watchlist"){ start_trakt(movie_id, movie_title); } } }); if (!GM_config.get("remove_openall")) { // If we have access to the openInTab function, add an Open All feature. if (GM.openInTab) { // Wrapped in timeout because the button lands in front of icons (async function). setTimeout(() => { var aopenall = $('').text('Open All').prepend(" ").attr('href', 'javascript:;').attr('style', 'font-weight:bold;font-size:11px;font-family: Calibri, Verdana, Arial, Helvetica, sans-serif;'); aopenall.click(function() { $('.iconbar_icon').each(function() { GM.openInTab($(this).attr('href')); }); }); iconbar.append(aopenall); // Rename class of the special buttons so "Open all" wouldn't open them. $('img[title="_Check URLs (for Dev tests)"]').parent().removeClass('iconbar_icon').addClass('iconbar_spec_icon'); $('img[title="Copy info to BBCode"]').parent().removeClass('iconbar_icon').addClass('iconbar_spec_icon'); $('img[title="Emby"]').parent().removeClass('iconbar_icon').addClass('iconbar_spec_icon'); $('img[title="Jellyfin"]').parent().removeClass('iconbar_icon').addClass('iconbar_spec_icon'); $('img[title="Plex"]').parent().removeClass('iconbar_icon').addClass('iconbar_spec_icon'); $('img[title="Radarr"]').parent().attr('class','iconbar_spec_icon'); $('img[title="Radarr2"]').parent().attr('class','iconbar_spec_icon'); $('img[title="Sonarr"]').parent().attr('class','iconbar_spec_icon'); $('img[title="Trakt-Watchlist"]').parent().attr('class','iconbar_spec_icon'); }, 300); } } } // Create elements for the icons bar function getIconsLinkArea() { // If it already exists, just return it if ($('#imdbscout_iconsheader').length) { return $('#imdbscout_iconsheader'); } const pad = onReferencePage ? '0px 0px 0px 0px' : '0px 0px 0px 0px'; var p = $('').attr('id', 'imdbscout_iconsheader').css({ 'padding': pad, 'margin-left': '0px', 'margin-right': '0px', 'margin-top': '0px', 'margin-bottom': '0px', 'overflow': 'hidden', }); const hr = $('
')); } // redesign } else if ($('.ipc-page-section').length) { iconbar = getIconsLinkArea(); } $.each(icon_sites, async function(index, site) { if (site['show']) { var search_url = ('mPOST' in site) ? site['searchUrl'] : await replaceSearchUrlParams(site, movie_id, movie_title, movie_title_orig); var image = getFavicon(site).css('margin', '2px 2px 2px'); var html = $('').attr('href', search_url).attr('target', '_blank').attr('rel', 'noreferrer').addClass('iconbar_icon').append(image); // Link and add Form element for POST method. if ('mPOST' in site) { var form_name = site['name'] + '-iconform'; form_name = form_name.replace(/\s|\.|\(|\)/g, '-'); var placebo_url = new URL(site['searchUrl']).origin; html = $('').attr('href', placebo_url).attr('onclick', "$('#" + form_name + "').submit(); return false;").attr('target', '_blank').attr('rel', 'noreferrer').addClass('iconbar_icon').append(image); var post_data = await replaceSearchUrlParams(site, movie_id, movie_title, movie_title_orig); var data = (post_data.match('{')) ? post_data.replace(/\+/g, ' ') : '{"' + post_data.replace(/&/g, '","').replace(/=/g, '":"').replace(/\+/g, ' ') + '"}'; var addform = $('
').append(
$('').attr('style', 'width:30px; vertical-align:middle;');
td.append($('').addClass('MetaCritRating scoutRatings').attr('title','Metascore').css('font-weight', 'bold').text("-"));
td.append(' | '); td.append($('').addClass('MetaUserRating scoutRatings').attr('title','Users score').css('font-weight', 'bold').text("-")); td.append(' '); $('#scout_rating_table').find('tr').append(td); } // Rotten Tomatoes ratings if (GM_config.get("ratings_cfg_rotten")) { const img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAS1BMVEUAAACLi4uPj4+UlJSZmZmCgoJ6enpxcXFiYmJqamqdnZ2mpqZaWlo1NTVBQUGhoaFJSUlTU1Ourq60tLRPT0+7u7vCwsLLy8tvb28Ts8lxAAAAAXRSTlMAQObYZgAACNpJREFUeNrU08GOrCAURdHL3SdgFAjO+P8vfZbYVZ0ea5G3Ep04ODsE7T9GiEu3iZDiYhMJ+tQAYJkZsKGwd5tHUq/R5kGeq02EUp0bQCvNJlIoJdo8UirFTttqE4g8AsBtBmilmm1CNsMmbyXbysG+yO2CvJTqQpJ9E6yfgJKEhH1TRGC2jYAsIa12kn1FECeFI6A5KEY78XzBhgD/BJQkz83H8qpHC4QE4iWEn4Cc2hEB2+NHgLhIIQfAy9BcHMxWsKdsgJ8NMcbeMgdv5ZQ12p78H7g2BJ5qrVk4XAEt+fgmabVbRY2rxeHTEGvtEiPgSji/Oh7tXkka2xqvk1LNLimUt5qDJA/d7pb8KvCUO1dO3F+Dsb3nD3sSoHWzm8XkiJDqsYN4Ud/3eiiX1nLe970HodF4b0VubWxV5zqAQ31L7ijEviyRj9XuFFtOKWc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AlBGv5N+FfmX0rqYJguYP44VPuy/N9LeaDnD+Bx2kiLb1E885P/SUhDnzdekUv+lfG7Xkui8RC0sO8dG9+mqxd+qjE4qz7gu+hj/alwz0Nx5OsYfuvxrynf3tjEBpo6GOP/Wzz4qe5wIsfGD1d8Lvom+LvKsPyobzvv0NCB2meBPyakIDhphzMHtr1dHf9WPqad3ogMHR7SzmPwr6ylfFR25moIf7Z82/iUXz6j5h7F8KzLAn0Xgh8vP9eT6z7J8pXfRV9UPq/7hIKjXjpx6qafZH9UKxbvG0888wA/Vvz5Dt3S5AMfFN/ntVJrA33f45fyZapTq49HPin9PvsYfb9Gz21q+4vhHd93Htv3vtwD81Um+bb2l/J9QvpR+mLgqtm/Xcq3iyY3ce7w7bqA/UNiI6zyH/oLXg/PPvvq9T8AAAAASUVORK5CYII="; const url = "https://www.rottentomatoes.com/search/?search=" + title; const td1 = $(' ').append(
$(' | ').attr('style', 'width:30px; vertical-align:middle;');
td.append($('').addClass('RottCritRating scoutRatings').attr('title','Tomatometer').css('font-weight', 'bold').text("-"));
td.append(' | '); $('#scout_rating_table').find('tr').append(td); const img1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAUVBMVEUAAABzc3NxcXHu7u7Z2dnd3d3p6enLy8thYWHR0dFtbW3h4eFXV1dpaWnV1dXl5eW8vLzExMRlZWV7e3uzs7Orq6uLi4uTk5ODg4OcnJyjo6PEKE5TAAAAAXRSTlMAQObYZgAADZlJREFUeNrs1Nuu1DAMBdDOiZ19Ni6OTZP08v8fylQgEI8wXF5YI41c1ZJ3Y7XLfy8RQS7/kCcylxsHl3+gI2NgWdRijbL8fQHv6zsbFEdWWf66zHatayku3o83t+Wv0OU7ZJ9RikrVxyHQ5W+Qp+8JpLRWipEwxo+NIJc/QcRF/fuBUEt2Uwds6dv3PmbP5Q/wpqJOOqD3fHHD21QToGJdz7sHfl+jx/IH6BxViQjA7mt1xTEhBLSM92vGgh7zrMAf2YD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a7wLD9xBxwCmDA5n4FUPm+/FPdWcr3ItlNj+Z+etFySwp7f91Rj8BqskQOGtqYwQAAAAASUVORK5CYII="; const td3 = $(' ').append(
$(' | ').attr('style', 'width:30px; vertical-align:middle;');
td2.append($('').addClass('RottUserRating scoutRatings').attr('title','Audience score').css('font-weight', 'bold').text("-"));
td2.append(' | '); $('#scout_rating_table').find('tr').append(td2); } // Letterboxd ratings if (GM_config.get("ratings_cfg_letterboxd")) { const img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACABAMAAAAxEHz4AAAAJ1BMVEUAAABUVFRVVVWenp6pqamZmZmYmJjLy8uioqKurq6Li4u2trZ/f38e2xLYAAAAAXRSTlMAQObYZgAACXVJREFUaN60k9FtQkEQA5NUwEwHdv9FRtrVKQo8QfLBSoAEN/Ya3/t435QIWAT+x8YEQDAEkOLtb/RXxnJYJKxEmsBrjc81VGpGKFAxiLyUgA6yE6WA7CIb7Kn97hykydmbVKGDJ96e8IMKyq4e9GejfZ8YV7yAdK2SSnO+Op0kQq4VyP7tmyGQjEQtoYWdJrksP67NfGZ7DHE6WfWNg3JRP6f/OkusAhwkKHtkQlzygbGEMiW4xxem82O4KhMprF8nfjDjuGPNyQdyu2iwpGW9x62TpFEWmzCuz0OCLhUyXmdaxHE2o71J766T4BpLNBE3SsJ2cG5BV0Ie7tCeOGVkoQZZMTmvwN1jVXIyplI2RLAc5cZBz5q/Vlh869NvIsroRqEghoHSVQCpALv/Ik/yvNFDgh92nTiebAsNahYbdodVPDjCnJBE5C70W+5YH1aJ+fVQp0T2hHHs5pUNDcspnJcuBymSUG8thKa3IRCwUN/Z5ZtB8pV1faYPO2ZwJCIIBWcEKM07wswr1szClWACFxC7nwJdCc5ztNyBZK3l9uM2vPtQELUoCjSZyzC2jdCSTh4BGUi5v0wH8+UumCJiFusMVAc+RC7MLa/BuOPEJ0BDpclVgZalKS8ia1ziXqbweD3n57Q/CKwr+jaqJPrmA+aLkiHN1A+B/QWf4lLZycQ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3UGPZhJct9aJA+i8kqIyGUviCYIB59oaU+RCpfzQaYRrSFEgnPN11TaBS45KIBlQWvgSCAqzZe48KRIZVHP1S0mAXhRq/6ORzLC7xf8f2NXQonSEDB+8jgWshVrejbNUlx3uI9aAy/yLz1SVeU9HTE8oZcupjSExFkiotS+yyQDIKLrnNmeavcFnZUPqsLR4Hh81YKc93veFNLH3ljapshQwuo5JpodO2JYJtzpiaD75AsXeSkiC+5yEKll0GihUp+ZJvD735x64EfgvaT40x976OWKPsHzqhr0uyD5ULCXA9G69EP3fiyoVOPQ22PbMFQbijkaVy0HXzuLhbQHA9Axdp1BhxfFcXQLOp/6WAGOX7K9jREInf91/QUR58jSqayy1AAAAABJRU5ErkJggg=="; const url = "https://letterboxd.com/imdb/" + imdbid; const td1 = $(' ').append(
$(' | ').attr('style', 'width:30px; vertical-align:middle;');
td.append($('').addClass('LetterboxdUserRating scoutRatings').attr('title','Users rating').css('font-weight', 'bold').text("-"));
td.append(' | '); $('#scout_rating_table').find('tr').append(td); } // Douban ratings if (GM_config.get("ratings_cfg_douban")) { const img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAAgMAAAC+UIlYAAAADFBMVEUAAABlZWX+/v6np6epfp6hAAAAAXRSTlMAQObYZgAAARhJREFUWMPt2D0OgjAUB/A6eATv4xEcKE0YcOcI3qNHcABjnDhKL8HuYqK1EuA988orUQeI/S8Q8iNtXstHK4SQTITLmgM7BzYcSEgLtI0VD7akC6QTGx4kYSADiQCBvPLmHMHPgbLeXGc1HxYCPLW8A/CPRhnBp8CiND5gJKSIIAIEmrnO6j8Ae/tw19Cje4H3ZJfUATRUNXkVKwTcqfYCA8AAoLcpAqBh6M50gKfhcSjKyQMOr29xm2wCKCmAy0AxwC0XfpAOoOm6S0HFAqifO6kpgBFQDNA90BRArVMHDAVQ63wKkBRAATMKbJubq1R7HKav6UE1Eh3BO7AjMfP6l1s6+HrFGlwUh5fVggfBpX14cyC4vfAEQ6sYUOFLXfsAAAAASUVORK5CYII="; const url = "https://search.douban.com/movie/subject_search?search_text=tt" +imdbid; const td1 = $(' ').append(
$(' | ').attr('style', 'width:30px; vertical-align:middle;');
td.append($('').addClass('DoubanUserRating scoutRatings').attr('title','Users rating').css('font-weight', 'bold').text("-"));
td.append(' | '); $('#scout_rating_table').find('tr').append(td); } // Allocine ratings if (GM_config.get("ratings_cfg_allocine")) { const img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAAB2BAMAAADviXoiAAAAGFBMVEUAAAAzMzPr6+vExMSdnZ1WVlaCgoJubm4HXAuhAAAAAXRSTlMAQObYZgAAA45JREFUWMPdmU1T2zAQhjv8A+OPXNNMoeeMnPgcPJCzG5q7G1LObtLp329JLL/Su5JVrBt7acrwoN13P5CWTx/KbhZXm7+bXJg2mWQ67C3bfCrKcBhleCrKcBhlOIhOhhfj9r/otkneLD8THPb4mMD25PX4sfeJbT9wcAh9TNieAY97vEmkZeNeE+qDx469S9z2beRgyGRbfmhtwfzHMjqr1bL/6D3YE+xeKVVRyB6WPT6rf1ZSmj0udxSqulij/Xc77dR4p67WktbOYxubTXt2OTiCg5nl1GY9WyHJDhbRChZiIWI6FiITC7Eg9ZxZ5Ja1UnAoE6xdUrnW9aTZ/qeiuJj9rEupXvWflLYV2FuwhsstSun6qRjYNdgCThtsX0rw8aAGS2DEIrmzGuI8K1jHfWyzG8vL1+/ny79PP2s4YigtXc4U2bEXYOVwGuyXS7SEPl6HpCVW8qBZylAfLtViDbGQJStcVAOXxM4SKxNsY3Qdt0BqiZWDhVQkFgQ6ecW60T1EYsHPoYXRS2BRzC6XC/wHYjnYg8PlHVqYWd0I+D64jMS13A6WzCzWMGcw7yC0yeIbtVVGhkgsyUIsHLTvtASlk9XVTGK111CP2pOGKnqQ+aucb43RkyTWr4vQmr2TM5lLdEntP0d6WazKCIDFumVWm1kZ1BlBttYu8ihoAizE0uML1oXZFLJmNAmCbIFTdha7CrAIshHsOsBCrEZMLxVkNZFItguzqY/d+FgWC+mCWGE2H9j8hcViVtxwagiT1yZMvYAeJLEQPImFHkTvk1gNWlKI9cAzB5b52JVnXrFYHVghlpyxMO0fsyXPWMx2a94tmUUgBVgk2GzhysW2Y7+PAJQudilZvofOIFZqsZX4HSrfJzohzJbioiOFPuiDwUKs3HVXoXlXdtaExhRjlsW62NPr+a0i/ryAxR2J72YQC7Y1hu2R7mYesSAPgmhIKnfANfVO3juAcMFy+2PaDD19pDuw1+mUW6fo6GYGltuhoJb13/lllnJUMBkyBJacrmnM0Btn9G11IpbfVsze+5+g/KYbfUsWrBW/JeUblsUq8ePoDSvfziTWGl+gt7PnzQ6xtp79SGhXkKryNyDaFQR2FBn85VVUeDfiXwcFdzJscicT3gXJ5VnMDipi9xWzc4vY9cXsGON3m/E71fhdbvwOGXD84jt+4R6/6AcahhmN+5vINDrib0Afyf4CrepxXp43oBkAAAAASUVORK5CYII="; const url = "https://www.allocine.fr/rechercher/?q=" +title_orig; const td1 = $(' ').append(
$(' | ').attr('style', 'width:30px; vertical-align:middle;');
td.append($('').addClass('AllocineCritRating scoutRatings').attr('title','Critics').css('font-weight', 'bold').text("-"));
td.append(' | '); td.append($('').addClass('AllocineUserRating scoutRatings').attr('title','Users').css('font-weight', 'bold').text("-")); td.append(' '); $('#scout_rating_table').find('tr').append(td); } // MyAnimeList & AniList ratings if (GM_config.get("ratings_cfg_anime")) { const img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACABAMAAAAxEHz4AAAAMFBMVEUAAADV1dUjIyPR0dExMTGsrKzb29vMzMxmZmaYmJi1tbVNTU3BwcGJiYmhoaF3d3e8ByLHAAAAAXRSTlMAQObYZgAAEB9JREFUaN7NWWtMHFUUxhifUeNkdDbi48fNmIAbxMkoo0b9Ma4RXfE9CotdnRAHNVhtVjs+iMYVzBas+GhrpxWqJoOwiiTjqtgV8FUaK74QKlgpalyFoqhYKooUzzl3Vh4+qv7ybNkunT3fPd93HvfONOd/bqYgCKJw3Zb/5HygqMVUVV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DM64ecHr4LVTRAnl2vhleizLqcocYPFj/I2mB0zbYzspcr6E7dFIXWr0V+4/7OlBGZdr2UX0f6K98ONRKDeRtJrt4UpTTo8lWm/wAq8LqpIIOqbhcKJenpHECXX9kEDBbbwb/OrTfi/G4rrwd1lyQS0JIEqXwASnVHBAHgMiTygtlGqKLF1jk6munjAKz4KrxHMk26y7CkG19xYe7ORDzYV+AycOgccq5bCnD39GiGhlIYEIKf4nGK7pQssyL+iQEA/bviMgDIEEGww3ksZ6kdmh5dW0rFnGLAkp/1LAsVZC8arhvpfwIAGALoweIxkHCpXbl+oExHgLDOsOVWrbQAQZRu1kN5SdBgzacIQPtrXiduCEvtkLkpwyOAFI1/5GHSMwk5VOtCt/0al3WZOOSVUABL7d5ao08GADkd4vlinSut0yAzcjABN8rldR5urahy+DzusVSFWqNc9mD1cDgeImPhhM6g9uWhVW6k5UUAQG66HlxQhYsbop3txvBTNLsoCP7h49ENbtsrOhcHdqacv7BoVE9AiHK4mEKYt2+2zBrPd0AXEADDHe3PSWTiF2O1hEOD8kJ/+Zpk61o3TQDA6dWcv7Qta2AHxqnXuSgE9gScNZM1jPGN7e/+j6Ul2M6wXzo26QsBfn0u6UbW+ACk4F+SCO3y0KV4Vb8878829yZ73XJSFAj8rX3xy5eoVGhwQv/dv4ad17utd1spAZTs63/KBpaRUqtrx5nvX1jOCu+CENoRoPjWnH2ZG6czxKAbJzlZ8YTHgs8lk73vYh9emrNve1ZGhNJfrk3Dkh1zs3FZ1iENyS16KLxPf2KBN6t63Wp3cBorkcmzsr55GwJw/33bQTPglj+eKUsMT6fD6YHndb1kQ2/y7WLowX9oG3UWbKs1liXmElMtA9DlBZt2Rnpz/oWdXcPqGuAIPbzTKOuKxOXg87MQ/r+y9q7ygQyeoo16o4+FIfp/bYd9kzTQyn9tfzznf2y/ARMUuIk2nBxiAAAAAElFTkSuQmCC"; const td1 = $(' ').append(
$(' | ').attr('style', 'width:30px; vertical-align:middle;');
td.append($('').addClass('AnimeCritRating scoutRatings').attr('title','MyAnimeList').css('font-weight', 'bold').text("-"));
td.append(' | '); td.append($('').addClass('AnimeUserRating scoutRatings').attr('title','AniList').css('font-weight', 'bold').text("-")); td.append(' '); $('#scout_rating_table').find('tr').append(td); } } function getMetacriticRatings_IMDb(imdbid, meta_icon, meta_badge) { console.log("IMDb Scout Mod (getMetacriticRatings_IMDb): Started."); const url = "https://www.imdb.com/title/tt" +imdbid+ "/criticreviews"; GM.xmlHttpRequest({ method: "GET", timeout: 20000, url: url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let meta_crit, meta_count, meta_url; if ($(result).find('[data-testid=critic-reviews-title]').length) { const x = $(result).find('[data-testid=critic-reviews-title]').children().first().text().trim(); if ($.isNumeric(x)) { meta_crit = x; } else { meta_crit = "-"; } const y = $(result).find('[data-testid=critic-reviews-title]').children().eq(1).children().eq(1).text().trim().split(" ")[0]; if ($.isNumeric(y)) { meta_count = y; } else { meta_count = "-"; } meta_url = $(result).find('[data-testid=critic-reviews-title]').find('[href]').attr("href"); if (meta_url != undefined && meta_url.match("www.metacritic.com")) { meta_url = meta_url.split("?ftag")[0]; getMetacritic_User(meta_url); } } else { console.log("IMDb Scout Mod (Metascore from IMDb): Score not found. Starting getMetacriticRatings."); getMetacriticRatings(imdbid, meta_icon, meta_badge); return; } //console.log("!!!!!!!!!!!!!: " + meta_crit); //console.log("!!!!!!!!!!!!!: " + meta_count); //console.log("!!!!!!!!!!!!!: " + meta_url); $('.MetaCritRatingImg').attr('src', meta_icon); if (meta_url.match("metacritic")) { $('.MetaCritRatingUrl').attr('href', meta_url); } $('.MetaCritRating').text(meta_crit); if (meta_crit > 80 && meta_count > 14) { $('.MetaCritRatingImg').attr('src', meta_badge); } ratingsColor(); }, onerror: function() { console.log("IMDb Scout Mod (Metascore from IMDb): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Metascore from IMDb): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Metascore from IMDb): Request timed out."); } }); } function getMetacritic_User(url) { console.log("IMDb Scout Mod (getMetacritic_User): Started."); GM.xmlHttpRequest({ method: "GET", timeout: 10000, url: url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let meta_user; if ($(result).find('.c-productScoreInfo_scoreNumber span:eq(1)').length) { const x = $(result).find('.c-productScoreInfo_scoreNumber span:eq(1)').text().trim(); if ($.isNumeric(x)) { meta_user = x *10; } else { console.log("IMDb Scout Mod (getMetacritic_User): User rating not numeric or some code error."); return; } } else { console.log("IMDb Scout Mod (getMetacritic_User): User rating not found or some code error."); return; } $('.MetaUserRating').text(meta_user); ratingsColor(); }, onerror: function() { console.log("IMDb Scout Mod (Metacritic user): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Metacritic user): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Metacritic user): Request timed out."); } }); } async function getMetacriticRatings(imdbid, meta_icon, meta_badge) { let metacritic_id = await getMetacriticID1(imdbid); if (metacritic_id == "00000000") { console.log("IMDb Scout Mod (Metacritic): ID not found on Wikidata."); return; } const meta_url = "https://www.metacritic.com/" +metacritic_id; GM.xmlHttpRequest({ method: "GET", timeout: 10000, url: meta_url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let meta_crit, meta_user; if ($(result).find('.c-productScoreInfo_scoreNumber span:eq(0)').length) { const x = $(result).find('.c-productScoreInfo_scoreNumber span:eq(0)').text().trim(); if (Boolean(x.match('\\.'))) { // fixes: if meta_crit missing then it picks meta_user element where score is with dot meta_crit = "-"; } else { if ($.isNumeric(x)) { meta_crit = x; } else { meta_crit = "-"; } } } if ($(result).find('.c-productScoreInfo_scoreNumber span:eq(1)').length) { const x = $(result).find('.c-productScoreInfo_scoreNumber span:eq(1)').text().trim(); if ($.isNumeric(x)) { meta_user = x *10; } else { meta_user = "-"; } } //console.log("!!!!!!!!!!!!!: " + meta_crit); //console.log("!!!!!!!!!!!!!: " + meta_count); //console.log("!!!!!!!!!!!!!: " + meta_url); if ($(result).find('.must-see').length) { $('.MetaCritRatingImg').attr('src', meta_badge); } else { $('.MetaCritRatingImg').attr('src', meta_icon); } $('.MetaCritRatingUrl').attr('href', meta_url); $('.MetaCritRating').text(meta_crit); $('.MetaUserRating').text(meta_user); ratingsColor(); }, onerror: function() { console.log("IMDb Scout Mod (Metacritic): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Metacritic): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Metacritic): Request timed out."); } }); } function getLetterboxdRatings(imdbid, lboxd_icon, lboxd_cust) { const url = "https://letterboxd.com/imdb/" + imdbid; GM.xmlHttpRequest({ method: "GET", timeout: 10000, url: url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let user_rating; if ($(result).find('meta[content="Average rating"]').length) { const x = $(result).find('meta[content="Average rating"]').next().attr('content'); const y = x.split("out")[0].replace( /^\D+/g, '').trim() * 20; const z = Math.round(y); user_rating = z; $('.LetterboxdUserRatingImg').attr('src', lboxd_icon); $('.LetterboxdUserRating').text(user_rating); ratingsColor(); // If there is no score then try to get raw average rating with another func. } else if ($(result).find('meta[property="og\:url"]').length && !String(response.responseText).match('No-one has added')) { const url = $(result).find('meta[property="og\:url"]').attr('content'); getLetterboxdRatingsCustom(url, lboxd_cust); } }, onerror: function() { console.log("IMDb Scout Mod (Letterboxd Ratings 1): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Letterboxd Ratings 1): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Letterboxd Ratings 1): Request timed out."); } }); } function getLetterboxdRatingsCustom(url, lboxd_cust) { const newurl = url + "ratings"; GM.xmlHttpRequest({ method: "GET", timeout: 10000, url: newurl, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let user_rating; if ($(result).find('[class*=rated-large-]').length) { let ratings_array = []; ratings_array.push($(result).find('.rated-large-1').parentsUntil('.section').find('li').length); ratings_array.push($(result).find('.rated-large-2').parentsUntil('.section').find('li').length *2); ratings_array.push($(result).find('.rated-large-3').parentsUntil('.section').find('li').length *3); ratings_array.push($(result).find('.rated-large-4').parentsUntil('.section').find('li').length *4); ratings_array.push($(result).find('.rated-large-5').parentsUntil('.section').find('li').length *5); ratings_array.push($(result).find('.rated-large-6').parentsUntil('.section').find('li').length *6); ratings_array.push($(result).find('.rated-large-7').parentsUntil('.section').find('li').length *7); ratings_array.push($(result).find('.rated-large-8').parentsUntil('.section').find('li').length *8); ratings_array.push($(result).find('.rated-large-9').parentsUntil('.section').find('li').length *9); ratings_array.push($(result).find('.rated-large-10').parentsUntil('.section').find('li').length *10); const voters = $(result).find('.film-rating-group').find('li').length; const average = (eval(ratings_array.join("+")) / voters) *10; user_rating = Math.round(average); } else { return; } $('.LetterboxdUserRatingImg').attr('src', lboxd_cust); $('.LetterboxdUserRating').attr('title', 'Custom raw average'); $('.LetterboxdUserRating').text(user_rating); ratingsColor(); }, onerror: function() { console.log("IMDb Scout Mod (Letterboxd Ratings 2): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Letterboxd Ratings 2): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Letterboxd Ratings 2): Request timed out."); } }); } function getRTandMetaRatings_OMDb(key, imdbid, meta_icon, rott_rotten, rott_certified, rott_fresh, rott_user_up, rott_user_down) { const url = "http://www.omdbapi.com/?i=tt" +imdbid+ "&apikey=" +key+ "&plot=full&tomatoes=true"; GM.xmlHttpRequest({ method: "GET", timeout: 10000, url: url, onload: function(response) { if (String(response.responseText).match("limit reached!")) { GM.notification("Limit reached! \nSet OMDb API key in settings. \nGet it at www.omdbapi.com .", "IMDb Scout Mod (RT/MC Ratings)"); return; } let responseJSON, rott_crit, meta_crit; if (response.status == 200) { responseJSON = JSON.parse(response.responseText); GM.setValue("OMDb_last", JSON.stringify(responseJSON)); if (responseJSON['Response'] == "False" || responseJSON['Ratings'].length < 1 || responseJSON['Type'] == "series" || responseJSON['Type'] == "episode") { console.log("IMDb Scout Mod (OMDb Ratings): Ratings not found. Starting getRotten."); const rott_url = '00000000'; getRotten(rott_url, rott_rotten, rott_certified, rott_fresh, rott_user_up, rott_user_down, imdbid); return; } const rott_url = responseJSON['tomatoURL']; if (rott_url.match("rottentomatoes")) { getRotten(rott_url, rott_rotten, rott_certified, rott_fresh, rott_user_up, rott_user_down, imdbid); $('.RottCritRatingUrl').attr('href', rott_url); } let x; if (responseJSON['Ratings'][0]['Source'] == 'Rotten Tomatoes') { x = parseInt(responseJSON['Ratings'][0]['Value'], 10); } else if (responseJSON['Ratings'].length > 1) { if (responseJSON['Ratings'][1]['Source'] == 'Rotten Tomatoes') { x = parseInt(responseJSON['Ratings'][1]['Value'], 10); } else if (responseJSON['Ratings'].length > 2) { if (responseJSON['Ratings'][2]['Source'] == 'Rotten Tomatoes') { x = parseInt(responseJSON['Ratings'][2]['Value'], 10); } } } const y = parseInt(responseJSON['Metascore'], 10); if ($.isNumeric(x)) { rott_crit = x; } else { rott_crit = "-"; } if ($.isNumeric(y)) { meta_crit = y; } else { meta_crit = "-"; } } else { return; } if (rott_crit <= 59) { $('.RottCritRatingImg').attr('src', rott_rotten); } else if (rott_crit > 59) { $('.RottCritRatingImg').attr('src', rott_fresh); } if (rott_crit >= 0) { $('.RottCritRating').text(rott_crit); } // Metacritic disabled in this func as it can overwrite "must see" badge [v19.2] // if (meta_crit >= 0) { // $('.MetaCritRatingImg').attr('src', meta_icon); // $('.MetaCritRating').text(meta_crit); // } ratingsColor(); }, onerror: function() { console.log("IMDb Scout Mod (OMDb Ratings): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (OMDb Ratings): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (OMDb Ratings): Request timed out."); } }); } async function getRotten(rott_url, rott_rotten, rott_certified, rott_fresh, rott_user_up, rott_user_down, imdbid) { console.log("IMDb Scout Mod (getRotten): Started."); if (rott_url == "00000000") { let rotten_id = await getRottenID1(imdbid); if (rotten_id == "00000000") { console.log("IMDb Scout Mod (Rotten Tomatoes): ID not found on Wikidata."); return; } const rt_c = (rotten_id.match(/\//g) || []).length; if (rotten_id.match("tv") && rt_c < 3) { rott_url = "https://www.rottentomatoes.com/" +rotten_id+ "/s01"; } else { rott_url = "https://www.rottentomatoes.com/" +rotten_id; } $('.RottCritRatingUrl').attr('href', rott_url); } GM.xmlHttpRequest({ method: "GET", timeout: 20000, url: rott_url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let rott_state, rott_user, rott_crit; if ($(result).find('#media-scorecard-json').length) { const scoreTxt = $(result).find('#media-scorecard-json').text(); const scoreJsn = JSON.parse(scoreTxt); const x = scoreJsn.audienceScore.score; const y = scoreJsn.criticsScore.score; if (scoreJsn.criticsScore.certified == true) { rott_state = "certified"; } else if (scoreJsn.criticsScore.sentiment == "POSITIVE") { rott_state = "fresh"; } else { rott_state = "rotten"; } if ($.isNumeric(x)) { rott_user = x; } else { rott_user = "-"; } if ($.isNumeric(y)) { rott_crit = y; } else { rott_crit = "-"; rott_state = "none"; } } else { console.log("IMDb Scout Mod (Rotten Tomatoes): Elements not found."); return; } if (rott_crit >= 0) { $('.RottCritRating').text(rott_crit); } if (rott_user >= 0) { $('.RottUserRating').text(rott_user); } if (rott_state.match("certified")) { $('.RottCritRatingImg').attr('src', rott_certified); } else if (rott_state.match("rotten")) { $('.RottCritRatingImg').attr('src', rott_rotten); } else if (rott_state.match("fresh")) { $('.RottCritRatingImg').attr('src', rott_fresh); } if (rott_user > 59) { $('.RottUserRatingImg').attr('src', rott_user_up); } else if (rott_user <= 59 && rott_user >= 0) { $('.RottUserRatingImg').attr('src', rott_user_down); } ratingsColor(); }, onerror: function() { console.log("IMDb Scout Mod (Rotten Tomatoes): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Rotten Tomatoes): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Rotten Tomatoes): Request timed out."); } }); } async function getDoubanRatings(imdbid, douban_icon) { let id = await getDoubanID0_1(imdbid); if (id == "00000000") { id = await getDoubanID0_2(imdbid); } if (id == "00000000") { id = await getDoubanID1(imdbid); } if (id == "00000000") { id = await getDoubanID2(imdbid); } if (id == "00000000") { id = await getDoubanID3(imdbid); } if (id == "00000000") { return; } const url = "https://movie.douban.com/subject/" +id; $('.DoubanUserRatingUrl').attr('href', url); GM.xmlHttpRequest({ method: "GET", timeout: 20000, url: url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); let user_rating; if ($(result).find('.rating_num').length) { const x = $(result).find('.rating_num').text(); if ($.isNumeric(x)) { user_rating = x *10; $('.DoubanUserRating').text(user_rating); $('.DoubanUserRatingImg').attr('src', douban_icon); ratingsColor(); } } }, onerror: function() { console.log("IMDb Scout Mod (Douban): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Douban): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Douban): Request timed out."); } }); } //www.allocine.fr/film/fichefilm_gen_cfilm=118831.html async function getAllocineRatings(imdbid, allocine_icon) { const id = await getAllocineID(imdbid); const is_film = await GM.getValue("AllocineID_last_is_film"); let url; if (id == "00000000") { return; } else if (is_film) { url = "https://www.allocine.fr/film/fichefilm_gen_cfilm=" +id+ ".html"; } else { url = "https://www.allocine.fr/series/ficheserie_gen_cserie=" +id+ ".html"; } $('.AllocineUserRatingUrl').attr('href', url); GM.xmlHttpRequest({ method: "GET", timeout: 20000, url: url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { const parser = new DOMParser(); const result = parser.parseFromString(response.responseText, "text/html"); const resultStr = String(response.responseText); let rating1, rating2; if ($(result).find('.stareval-note').length) { const x = $(result).find('.stareval-note:eq(0)').text().replace(',','.') *20; const y = $(result).find('.stareval-note:eq(1)').text().replace(',','.') *20; if ($.isNumeric(x)) { rating1 = x; } else { rating1 = "-"; } if ($.isNumeric(y)) { rating2 = y; } else { rating2 = "-"; } if (rating1 > 0 || rating2 > 0) { $('.AllocineUserRatingImg').attr('src', allocine_icon); } if (resultStr.match('> Presse <')) { $('.AllocineCritRating').text(rating1); $('.AllocineUserRating').text(rating2); } else { $('.AllocineUserRating').text(rating1); } ratingsColor(); } }, onerror: function() { console.log("IMDb Scout Mod (Allocine): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (Allocine): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (Allocine): Request timed out."); } }); } async function getAnimeRatings(imdbid, title_orig, title, anime_icon) { const id = await getAnimeID(imdbid); const myanimelist_id = id[0]; const anilist_id = id[1]; const year = document.title.replace(/^(.+) \((\D*|)(\d{4})(.*)$/gi, '$3').match(/\b\d{4}\b/g)?.join(" ") || ''; if (myanimelist_id == "00000000" || anilist_id == "00000000" || myanimelist_id == undefined || anilist_id == undefined) { var titles = await getTMDb_original_title(imdbid); titles.push(title_orig); titles.push(title); } getMyanimelistRatings(myanimelist_id, anime_icon, titles, year); getAnilistRatings(anilist_id, anime_icon, titles, year); } async function getMyanimelistRatings(myanimelist_id, anime_icon, titles, year, run = 1) { // https://github.com/jikan-me/jikan // https://docs.api.jikan.moe await sleep(500); let url; if (myanimelist_id == "00000000" || myanimelist_id == undefined) { console.log("IMDb Scout Mod (MyAnimeList): Trying method by title."); var [engTitle, originalTitle, title_orig, title] = titles; var xTitle = (run == 2) ? engTitle.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : originalTitle; var tmdb_failed = (originalTitle !== "00000000" && originalTitle !== undefined) ? false : true; xTitle = (tmdb_failed || run == 3) ? title_orig.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : xTitle; xTitle = ( run == 4) ? title .normalize("NFD").replace(/[\u0300-\u036f]/g, "") : xTitle; const is_tv = Boolean($('title').text().match(/Podcast Series|TV Mini Series|TV Series|Série télévisée|Fernsehserie|टीवी सीरीज़|Serie TV|Série de TV|Serie de TV/)); const start_date = year + "-01-01"; const end_date = parseInt(year) + 1 + "-01-01"; url = is_tv ? "https://api.jikan.moe/v4/anime?q=" +encodeURIComponent(xTitle)+ "&start_date=" +start_date : "https://api.jikan.moe/v4/anime?q=" +encodeURIComponent(xTitle)+ "&start_date=" +start_date+ "&end_date=" +end_date; console.log("IMDb Scout Mod (MyAnimeList): jikan API URL -> " + url); } else { url = "https://api.jikan.moe/v4/anime/" +myanimelist_id; } GM.xmlHttpRequest({ method: "GET", timeout: 10000, url: url, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" }, onload: function(response) { if (response.status == 200) { if (myanimelist_id !== "00000000" && myanimelist_id !== undefined) { const result = JSON.parse(response.responseText); const rating = result.data.score; if ($.isNumeric(rating) && rating > 0) { $('.AnimeUserRatingImg').attr('src', anime_icon); $('.AnimeCritRating').text(Math.round(rating*10)); ratingsColor(); $('.AnimeCritRating').wrap(``); } } else { const result = JSON.parse(response.responseText); let is_found = false; for (xx of result.data) { if (xx.year == parseInt(year) || !xx.year) { for (yy of xx.titles) { if (yy.title.toLowerCase() == xTitle.toLowerCase()) { is_found = true; break; } } const rating = xx.score; if (is_found && $.isNumeric(rating) && rating > 0) { $('.AnimeUserRatingImg').attr('src', anime_icon); $('.AnimeCritRating').text(Math.round(rating*10)); ratingsColor(); $('.AnimeCritRating').wrap(``); return; } else { is_found = false; } } } if(run == 1 && !tmdb_failed){ console.log("IMDb Scout Mod (MyAnimeList): Nothing found with TMDb's Original title. Retrying with TMDb's English title."); getMyanimelistRatings(myanimelist_id, anime_icon, titles, year, run = 2) } else if (run == 2 && !tmdb_failed) { console.log("IMDb Scout Mod (MyAnimeList): Nothing found with TMDb's English title. Retrying with IMDb's Original title."); getMyanimelistRatings(myanimelist_id, anime_icon, titles, year, run = 3) } else if (run == 3 && !tmdb_failed) { console.log("IMDb Scout Mod (MyAnimeList): Nothing found with IMDb's Original title. Retrying with IMDb's title."); getMyanimelistRatings(myanimelist_id, anime_icon, titles, year, run = 4) } else if (run == 1 && tmdb_failed) { console.log("IMDb Scout Mod (MyAnimeList): Nothing found with IMDb's Original title. Retrying with IMDb's title."); getMyanimelistRatings(myanimelist_id, anime_icon, titles, year, run = 4) } else { console.log("IMDb Scout Mod (MyAnimeList): Nothing found with IMDb's title."); } } } else { GM.notification("HTTP Error: " +response.status, "IMDb Scout Mod (MyAnimeList)"); console.log("IMDb Scout Mod (MyAnimeList): HTTP Error: " +response.status); } }, onerror: function() { console.log("IMDb Scout Mod (MyAnimeList): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (MyAnimeList): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (MyAnimeList): Request timed out."); } }); } async function getAnilistRatings(anilist_id, anime_icon, titles, year, run = 1) { // https://anilist.gitbook.io/anilist-apiv2-docs // https://anilist.github.io/ApiV2-GraphQL-Docs await sleep(500); let query, variables; if (anilist_id == "00000000" || anilist_id == undefined) { console.log("IMDb Scout Mod (AniList): Trying method by title."); var [engTitle, originalTitle, title_orig, title] = titles; var tmdb_failed = (originalTitle !== "00000000" && originalTitle !== undefined) ? false : true; var xTitle = (run == 2) ? engTitle.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : originalTitle; xTitle = (tmdb_failed || run == 3) ? title_orig.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : xTitle; xTitle = ( run == 4) ? title .normalize("NFD").replace(/[\u0300-\u036f]/g, "") : xTitle; const start_date = parseInt(year + "0101"); const end_date = parseInt(parseInt(year) + 1 + "0101"); query = `query ($search: String, $startDate: FuzzyDateInt, $endDate: FuzzyDateInt) { Media (search: $search, type: ANIME, startDate_greater: $startDate, startDate_lesser: $endDate) { id averageScore meanScore title { romaji english native } startDate { year } } }`; variables = { search: xTitle, startDate: start_date, endDate: end_date }; } else { query = `query ($id: Int) { Media (id: $id, type: ANIME) { id, averageScore, meanScore }}`; variables = { id: anilist_id }; } const post_data = JSON.stringify({ query: query, variables: variables }); GM.xmlHttpRequest({ method: "POST", timeout: 10000, url: "https://graphql.anilist.co", headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', }, data: post_data, onload: function(response) { if (response.status == 200) { const result = JSON.parse(response.responseText); // note: averageScore is weighted nonsense https://anilist.co/forum/thread/2845 const rating = result.data.Media.meanScore; if ($.isNumeric(rating) && rating > 0) { $('.AnimeUserRatingImg').attr('src', anime_icon); $('.AnimeUserRating').text(rating); ratingsColor(); $('.AnimeUserRating').wrap(``) } } else if (response.status == 404 && run == 1 && !tmdb_failed) { console.log("IMDb Scout Mod (AniList): Nothing found with TMDb's Original title. Retrying with TMDb's English title."); getAnilistRatings(anilist_id, anime_icon, titles, year, run = 2) } else if (response.status == 404 && run == 2 && !tmdb_failed) { console.log("IMDb Scout Mod (AniList): Nothing found with TMDb's English title. Retrying with IMDb's Original title."); getAnilistRatings(anilist_id, anime_icon, titles, year, run = 3) } else if (response.status == 404 && run == 3 && !tmdb_failed) { console.log("IMDb Scout Mod (AniList): Nothing found with IMDb's Original title. Retrying with IMDb's title."); getAnilistRatings(anilist_id, anime_icon, titles, year, run = 4) } else if (response.status == 404 && run == 1 && tmdb_failed) { console.log("IMDb Scout Mod (AniList): Nothing found with IMDb's Original title. Retrying with IMDb's title."); getAnilistRatings(anilist_id, anime_icon, titles, year, run = 4) } else if (response.status == 404) { console.log("IMDb Scout Mod (AniList): Nothing found with IMDb's title."); } else { GM.notification("HTTP Error: " +response.status, "IMDb Scout Mod (AniList)"); console.log("IMDb Scout Mod (AniList): HTTP Error: " +response.status); } }, onerror: function() { console.log("IMDb Scout Mod (AniList): Request Error."); }, onabort: function() { console.log("IMDb Scout Mod (AniList): Request is aborted."); }, ontimeout: function() { console.log("IMDb Scout Mod (AniList): Request timed out."); } }); } function ratingsColor() { if (GM_config.get("ratings_cfg_color")) { const ref_high = parseInt(GM_config.get('ratings_cfg_color_scheme').split(',')[0], 10); const ref_low = parseInt(GM_config.get('ratings_cfg_color_scheme').split(',')[1], 10); $( ".scoutRatings").each(function(index) { if ($(this).text() > ref_high) { $(this).css('color', '#00e600'); } else if ($(this).text() <= ref_high && $(this).text() > ref_low) { $(this).css('color', '#f5c20a'); } else if ($(this).text() <= ref_low && $(this).text() >= 0) { $(this).css('color', '#e60000'); } }); } } //============================================================================== // Dark styles for Reference View //============================================================================== function darkReferenceStyles() { if (!GM_config.get('dark_reference_view') || !onReferencePage) { return; } console.log("IMDb Scout Mod (darkReferenceStyles): Started."); // www.w3schools.com/colors/colors_picker.asp // background color addGlobalStyles('#nav-search-form {background: #d9d9d9}'); addGlobalStyles('#wrapper, #pagecontent, .recently-viewed {background-color: #000000}'); addGlobalStyles('.aux-content-widget-2 {background: #191919}'); addGlobalStyles('#imdbscout_header, #imdbscoutsecondbar_header, #imdbscoutthirdbar_header, .article, .cast_list tr, .titlereference-list tr {background-color: #191919 !important}'); addGlobalStyles('.add-image-container {background-color: #262626}'); // border color addGlobalStyles('.article, .aux-content-widget-2, .cast_list tr, .titlereference-list tr, .recently-viewed .item {border-color: #323232 !important}'); addGlobalStyles('hr, .answers-widget__question, .answers-widget__see-more {border-color: #666666}'); addGlobalStyles('.recently-viewed {border-color: #000000}'); // font color addGlobalStyles('h3[itemprop="name"], .titlereference-title-year a {color: #f5c20a}'); addGlobalStyles('.titlereference-original-title-label {color: #cc0000}'); addGlobalStyles('.ipl-rating-star__rating {font-weight: bold; color: #00b300;}'); addGlobalStyles('.article, .aux-content-widget-2, .cast_list tr td {color: #cccccc !important}'); addGlobalStyles('.ipl-list-title, #sidebar h4, .ipl-list-title::after {color: #c49b08}'); addGlobalStyles('.ipl-list-title::after {border-color: #7a6105}'); } function addGlobalStyles(css) { var head, style; head = document.getElementsByTagName('head')[0]; if (!head) { return; } style = document.createElement('style'); style.className = 'IMDbScoutStyles'; style.innerHTML = css; head.appendChild(style); } //============================================================================== // Compact mode for Reference View //============================================================================== function compactReferenceStyles() { if (!GM_config.get('compact_reference_view') || !onReferencePage) { return; } console.log("IMDb Scout Mod (compactReferenceStyles): Started."); addGlobalStyles('#main {margin-left:25px !important}'); addGlobalStyles('#sidebar {margin-right:25px !important}'); addGlobalStyles('#content-2-wide {margin-top:5px !important}'); addGlobalStyles('.aux-content-widget-2 {margin-top:0px; padding-top:0px !important}'); addGlobalStyles('#imdbHeader {width:960px; display:flex; justify-content:center; align-items:center; margin:auto !important}'); document.getElementById('styleguide-v2').id = 'styleguide-v2x'; // this loops document.events.on('bodyloaded' event till this element is found addGlobalStyles('body#styleguide-v2x {background-color: #000000 !important; margin-top:0px}'); } function compactReferenceElemRemoval() { // Replace urls to fullcredits // Removed in v22.0 as imdb removed these pages // if (GM_config.get('fullcredits_reference_view')) { // $('a[href^="/name/nm"]').attr('href', (n, old) => old.split('/?ref_=')[0] + '/fullcredits'); // } if (!GM_config.get('compact_reference_view') || !onReferencePage) { return; } console.log("IMDb Scout Mod (compactReferenceElemRemoval): Started."); // Check if the Styles funcs were executed as it may not happened at 'bodyloaded' event on very slow PCs + Chrome if (GM_config.get('dark_reference_view')) { if (!$('.IMDbScoutStyles').length) { console.log("IMDb Scout Mod (Warning): Slow device!"); darkReferenceStyles(); compactReferenceStyles(); } } $('.titlereference-section-credits').nextUntil('.titlereference-section-storyline').remove(); $('.titlereference-section-credits').remove(); if (Boolean($('.titlereference-section-storyline .ipl-zebra-list__item').first().text().match("Plot Summary"))) { $('.titlereference-section-storyline .ipl-zebra-list__item').first().nextUntil('section').remove(); } else { $('.titlereference-section-storyline').remove(); } $('.titlereference-section-did-you-know').remove(); $('#contribute-main-section').remove(); $('.recently-viewed').remove(); // Inject Top Review if ($('.titlereference-overview-review-list').length) { if ($('.titlereference-overview-review-list').text().match('User')) { if (GM_config.get("helpful_reviews_spoilers")) { getIMDbBestReview(use_spoilers=true); } else { getIMDbBestReview(); } } } // Inject Box Office (graphQL API) insertNewBoxOffice(); } function insertNewBoxOffice() { const x = ` Box Office (graphQL API)
Helpful Review
Warning: Spoilers ');
$('[data-testid=review-overflow]').find('.ipc-html-content-inner-div').before(yy);
}
$('[data-testid=review-card-parent]').find('.ipc-list-card__actions').remove();
}
},
onerror: function() {
console.log("IMDb Scout Mod (Review): Request Error.");
},
onabort: function() {
console.log("IMDb Scout Mod (Review): Request is aborted.");
},
ontimeout: function() {
console.log("IMDb Scout Mod (Review): Request timed out.");
}
});
}
function wilsonScore(upVotes, downVotes, z = 1.95996) {
const n = upVotes + downVotes;
if (n === 0) return 0;
const phat = upVotes / n;
const numerator = phat + (z * z) / (2 * n) - z * Math.sqrt((phat * (1 - phat) + (z * z) / (4 * n)) / n);
const denominator = 1 + (z * z) / n;
return numerator / denominator;
}
//==============================================================================
// Remove ads from IMDb
//==============================================================================
function adsRemovalReference() {
if (!GM_config.get('remove_ads')) {
return;
}
console.log("IMDb Scout Mod (adsRemovalReference): Started.");
if (Boolean($('.aux-content-widget-2').first().text().match("IMDb Answers"))) {
$('.aux-content-widget-2').first().remove();
}
$('.cornerstone_slot').remove();
$('.imdb-footer').remove();
$('#social-share-widget').remove();
$('.navbar__imdbpro').remove();
$('[class^=Root__Separator]').remove();
// To remove ad's background image
$('#wrapper').attr('style', 'background: 000000 !important');
}
async function adsRemoval() {
if (!GM_config.get('remove_ads')) {
return;
}
console.log("IMDb Scout Mod (adsRemoval): Started.");
// v21.3 fix https://github.com/Purfview/IMDb-Scout-Mod/issues/227 // reenabled in v22.0
// const isMobile = Boolean(navigator.userAgent.toLowerCase().match(/android|webos|iphone|ipad|ipod|mobile|mini|crios/));
// if (isMobile) {
// console.log("IMDb Scout Mod (adsRemoval): Mobile browser detected, disabling adsRemoval!");
// return;
// }
$('.nas-slot').empty(); // empty() removes all children // removing 4th or 5th ".nas-slot" breaks dynamic reflow when window is resized.
$('#inline40_wrapper').remove();
$('#adLink').remove();
$('[class^=Banner]').remove();
$('[id^=taboola]').remove();
$('[class*=ProLink]').remove();
$('[class^=IMDbPro]').remove();
$('.imdb-editorial-single').remove();
$('.imdb-footer').remove();
$('.navbar__imdbpro').remove();
$('[class^=Root__Separator]').remove();
// after 3 secs run same again:
await sleep(3000);
$('.nas-slot').empty();
$('#inline40_wrapper').remove();
$('#adLink').remove();
$('[class^=Banner]').remove();
$('[id^=taboola]').remove();
$('[class*=ProLink]').remove();
$('[class^=IMDbPro]').remove();
$('.imdb-editorial-single').remove();
$('.imdb-footer').remove();
$('.navbar__imdbpro').remove();
$('[class^=Root__Separator]').remove();
}
//==============================================================================
// Create the config name (GM_config)
//==============================================================================
function configName(site) {
if ('configName' in site) {
return 'show_' + site['configName'] + (site['TV'] ? '_TV' : '');
} else {
return 'show_' + site['name'] + (site['TV'] ? '_TV' : '');
}
}
//==============================================================================
// Count sites (GM_config)
//==============================================================================
function countSites(task) {
if (task == 1) {
const count_total = sites.concat(icon_sites).length;
return count_total;
}
if (task == 2) {
// Init GM_config to get amount of selected sites.
// GM_config's fields needs to be mirrored to keep Settings intact.
var config_fields = {
'aftertitle': {'type': 'hidden'},
'imdbtotalstats': {'type': 'hidden'},
'imdbselectedstats': {'type': 'hidden'},
'imdbscoutmod_header_text': {'type': 'text'},
'imdbscoutsecondbar_header_text': {'type': 'text'},
'imdbscoutthirdbar_header_text': {'type': 'text'},
'mod_icons_size': {'type': 'text'},
'iconsborder_size': {'type': 'select', 'options': ['2px', '3px', '4px', '5px', '6px']},
'cfg_iconsize': {'type': 'text'},
'timeout_ms': {'type': 'select', 'options': ['10000 ms', '20000 ms', '30000 ms', '45000 ms', '60000 ms']},
'remove_ads': {'type': 'checkbox'},
'debug_sites': {'type': 'checkbox'},
'loadmod_on_start_movie': {'type': 'checkbox'},
'load_second_bar_movie': {'type': 'checkbox'},
'load_third_bar_movie': {'type': 'checkbox'},
'switch_bars': {'type': 'checkbox'},
'sortReqOnNewLine': {'type': 'checkbox'},
'call_http_mod_movie': {'type': 'checkbox'},
'hide_missing_movie': {'type': 'checkbox'},
'use_mod_icons_movie': {'type': 'checkbox'},
'one_line': {'type': 'checkbox'},
'ignore_type_movie': {'type': 'checkbox'},
'remove_openall': {'type': 'checkbox'},
'force_reference_view': {'type': 'checkbox'},
'dark_reference_view': {'type': 'checkbox'},
'compact_reference_view': {'type': 'checkbox'},
'greybackground_reference_view': {'type': 'checkbox'},
'app_notification': {'type': 'checkbox'},
'helpful_reviews': {'type': 'checkbox'},
'helpful_reviews_spoilers': {'type': 'checkbox'},
'disable_iconsites': {'type': 'checkbox'},
'disable_sites': {'type': 'checkbox'},
'highlight_sites_movie': {'type': 'text'},
'highlight_missing_movie': {'type': 'text'},
'loadmod_on_start_search': {'type': 'checkbox'},
'load_second_bar_search': {'type': 'checkbox'},
'load_third_bar_search': {'type': 'checkbox'},
'call_http_mod_search': {'type': 'checkbox'},
'hide_missing_search': {'type': 'checkbox'},
'use_mod_icons_search': {'type': 'checkbox'},
'ignore_type_search': {'type': 'checkbox'},
'highlight_sites_search': {'type': 'text'},
'highlight_missing_search': {'type': 'text'},
'ratings_img_px': {'type': 'select', 'options': ['32px', '48px', '64px']},
'ratings_cfg_metacritic': {'type': 'checkbox'},
'ratings_cfg_rotten': {'type': 'checkbox'},
'ratings_cfg_letterboxd': {'type': 'checkbox'},
'ratings_cfg_douban': {'type': 'checkbox'},
'ratings_cfg_allocine': {'type': 'checkbox'},
'ratings_cfg_anime': {'type': 'checkbox'},
'ratings_cfg_color': {'type': 'checkbox'},
'ratings_cfg_color_scheme': {'type': 'text'},
'ratings_cfg_omdb_apikey': {'type': 'text'},
'radarr_searchformovie': {'type': 'checkbox'},
'radarr_monitored': {'type': 'checkbox'},
'radarr_url': {'type': 'text'},
'radarr_apikey': {'type': 'text'},
'radarr_rootfolderpath': {'type': 'text'},
'radarr_profileid': {'type': 'select', 'options': ['Any', 'HD - 720p/1080p', 'HD-1080p', 'HD-720p', 'SD', 'Ultra-HD', 'Custom']},
'radarr_customprofileid': {'type': 'text'},
'radarr_minimumavailability': {'type': 'select', 'options': ['announced', 'inCinemas', 'released']},
'radarr2_searchformovie': {'type': 'checkbox'},
'radarr2_monitored': {'type': 'checkbox'},
'radarr2_url': {'type': 'text'},
'radarr2_apikey': {'type': 'text'},
'radarr2_rootfolderpath': {'type': 'text'},
'radarr2_profileid': {'type': 'select', 'options': ['Any', 'HD - 720p/1080p', 'HD-1080p', 'HD-720p', 'SD', 'Ultra-HD', 'Custom']},
'radarr2_customprofileid': {'type': 'text'},
'radarr2_minimumavailability': {'type': 'select', 'options': ['announced', 'inCinemas', 'released']},
'sonarr_searchformissing': {'type': 'checkbox'},
'sonarr_searchforcutoff': {'type': 'checkbox'},
'sonarr_seasonfolder': {'type': 'checkbox'},
'sonarr_usescenenumbering': {'type': 'select', 'options': ['Auto', 'No', 'Yes']},
'sonarr_monitored': {'type': 'select', 'options': ['All Episodes', 'Future Episodes', 'Missing Episodes', 'Existing Episodes', 'Pilot Episode', 'Only First Season', 'Only Latest Season', 'None']},
'sonarr_url': {'type': 'text'},
'sonarr_apikey': {'type': 'text'},
'sonarr_rootfolderpath': {'type': 'text'},
'sonarr_profileid': {'type': 'select', 'options': ['Any', 'HD - 720p/1080p', 'HD-1080p', 'HD-720p', 'SD', 'Ultra-HD', 'Custom']},
'sonarr_customprofileid': {'type': 'text'},
'sonarr_languageprofileid': {'type': 'text'},
'sonarr_seriestype': {'type': 'select', 'options': ['standard', 'daily', 'anime']},
'trakt_synclimiter': {'type': 'select', 'options': ['15', '30', '60', '300']},
'plex_server_url': {'type': 'text'},
'plex_token': {'type': 'text'},
'jellyfin_server_url': {'type': 'text'},
'jellyfin_username': {'type': 'text'},
'jellyfin_password': {'type': 'text'},
'jellyfin_debug': {'type': 'checkbox'},
'emby_server_url': {'type': 'text'},
'emby_username': {'type': 'text'},
'emby_password': {'type': 'text'},
'emby_debug': {'type': 'checkbox'},
'milkie_authToken': {'type': 'text'},
'tnt_authToken': {'type': 'text'},
'void_url': {'type': 'text'},
'void_username': {'type': 'text'},
'void_password': {'type': 'text'}
};
$.each(custom_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(public_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(private_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(chinese_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(french_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(german_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(usenet_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(subs_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(pre_databases, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(other_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(streaming_sites, function(index, site) {config_fields[configName(site)] = {'type': 'checkbox'};});
$.each(icon_sites_main, function(index, icon_site) {config_fields['show_icon_' + icon_site['name']] = {'type': 'checkbox'};});
$.each(special_buttons, function(index, icon_site) {config_fields['show_icon_' + icon_site['name']] = {'type': 'checkbox'};});
GM_config.init({'id': 'imdb_scout', 'fields': config_fields});
$.each(sites, function(index, site) {
site['show'] = GM_config.get(configName(site));
});
$.each(icon_sites, function(index, icon_site) {
icon_site['show'] = GM_config.get('show_icon_' + icon_site['name']);
});
const count_selected = sites.concat(icon_sites).reduce(function (n, site) {
return n + (site['show'] == true); }, 0);
return count_selected;
}
}
//============================================================================//
//================================ MAIN ====================================//
//============================================================================//
//==============================================================================
// Polyfill for GM3 notifications
//==============================================================================
if (typeof GM.notification === "undefined") {
this.GM_notification = function(options) {
const opts = {};
if (typeof options === "string") {
opts.text = options;
opts.title = arguments[1];
opts.image = arguments[2];
opts.onclick = arguments[3];
} else {
Object.keys(options).forEach(function(key) {
opts[key] = options[key];
});
}
checkPermission();
function checkPermission() {
if (Notification.permission === "granted") {
fireNotice(opts);
} else if (Notification.permission === "denied") {
alert("User has denied notifications for this page/site!");
// eslint-disable-next-line no-useless-return
return;
} else {
Notification.requestPermission(function(permission) {
console.log("New permission: ", permission);
checkPermission();
});
}
}
function fireNotice(ntcOptions) {
if (ntcOptions.text && !ntcOptions.body) {
ntcOptions.body = ntcOptions.text;
}
var ntfctn = new Notification(ntcOptions.title, ntcOptions);
if (ntcOptions.onclick) {
ntfctn.onclick = ntcOptions.onclick;
}
if (ntcOptions.timeout) {
setTimeout(function() {
ntfctn.close();
}, ntcOptions.timeout);
}
}
};
GM.notification = GM_notification;
}
//==============================================================================
// Settings Menu (GM_config)
//==============================================================================
// To have consistent spacing in different browsers.
var set_cfg_iconsize_spacing = "   ";
var radarr_url_spacing = "                     ";
var radarr_apikey_spacing = "               ";
var radarr_rootfolderpath_spacing = " ";
var sonarr_usescenenumbering_spacing = "   ";
var sonarr_monitored_spacing = "                        ";
var sonarr_languageprofileid_spacing = "          ";
var sonarr_seriestype_spacing = "                     ";
var void_url_spacing = "         ";
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
set_cfg_iconsize_spacing = "  ";
radarr_url_spacing = "                      ";
radarr_apikey_spacing = "                 ";
radarr_rootfolderpath_spacing = "";
sonarr_usescenenumbering_spacing = " ";
sonarr_monitored_spacing = "                          ";
sonarr_languageprofileid_spacing = "         ";
sonarr_seriestype_spacing = "                       ";
void_url_spacing = "           ";
}
var config_fields = {
'aftertitle': {
'section': ' ',
'label': '  ',
'type': 'hidden'
},
'imdbtotalstats': {
'label': 'Total sites: '.bold().fontsize(3) + countSites(1).toString().bold().fontsize(3).fontcolor("Blue"),
'type': 'hidden'
},
'imdbselectedstats': {
'label': 'Selected sites: '.bold().fontsize(3) + countSites(2).toString().bold().fontsize(3).fontcolor("Blue"),
'type': 'hidden'
},
'imdbscoutmod_header_text': {
'label': 'Header text for the 1st bar: ',
'type': 'text',
'default': ''
},
'imdbscoutsecondbar_header_text': {
'label': 'Header text for the 2nd bar:',
'type': 'text',
'default': ''
},
'imdbscoutthirdbar_header_text': {
'label': 'Header text for the 3rd bar: ',
'type': 'text',
'default': ''
},
'mod_icons_size': {
'label': 'Size of the icons (pixels):    ',
'type': 'text',
'default': '32'
},
'iconsborder_size': {
'label': 'Size of the icons border:     ',
'type': 'select',
'options': ['2px', '3px', '4px', '5px', '6px'],
'default': '3px'
},
'cfg_iconsize': {
'label': 'Size of the settings icons:' + set_cfg_iconsize_spacing,
'type': 'text',
'default': '22'
},
'timeout_ms': {
'label': 'Timeout requests after:      ' + radarr_rootfolderpath_spacing,
'type': 'select',
'options': ['10000 ms', '20000 ms', '30000 ms', '45000 ms', '60000 ms'],
'default': '30000 ms'
},
'remove_ads': {
'type': 'checkbox',
'label': 'Remove IMDb ads?',
'default': true
},
'debug_sites': {
'type': 'checkbox',
'label': 'Debug (the searchable sites)?',
'default': false
},
'loadmod_on_start_movie': {
'section': 'Title Page:',
'type': 'checkbox',
'label': 'Load links to sites on start?',
'default': true
},
'load_second_bar_movie': {
'type': 'checkbox',
'label': 'Enable the 2nd search bar?',
'default': false
},
'load_third_bar_movie': {
'type': 'checkbox',
'label': 'Enable the 3rd search bar?',
'default': false
},
'switch_bars': {
'type': 'checkbox',
'label': 'Swap 2nd and 3rd bars?',
'default': false
},
'sortReqOnNewLine': {
'type': 'checkbox',
'label': 'Split Req sites to a new line if the request is found?',
'default': true
},
'call_http_mod_movie': {
'type': 'checkbox',
'label': 'Auto-search sites for results?',
'default': true
},
'hide_missing_movie': {
'type': 'checkbox',
'label': "Hide link if search didn't found results?",
'default': false
},
'use_mod_icons_movie': {
'type': 'checkbox',
'label': 'Use icons instead of text?',
'default': true
},
'one_line': {
'type': 'checkbox',
'label': 'Show search results on one line?',
'default': true
},
'ignore_type_movie': {
'type': 'checkbox',
'label': 'Search all sites, ignoring movie/tv distinction?',
'default': false
},
'remove_openall': {
'type': 'checkbox',
'label': 'Remove "Open All" button?',
'default': true
},
'force_reference_view': {
'type': 'checkbox',
'label': 'Reference View: Force it (without login)?',
'default': false
},
'dark_reference_view': {
'type': 'checkbox',
'label': 'Reference View: Enable the dark style?',
'default': true
},
'compact_reference_view': {
'type': 'checkbox',
'label': 'Reference View: Enable the compact mode?',
'default': true
},
'greybackground_reference_view': {
'type': 'checkbox',
'label': 'Reference View: Enable grey background for searchable sites?',
'default': true
},
'app_notification': {
'type': 'checkbox',
'label': "Notify when Radarr/Sonarr doesn't respond?",
'default': true
},
'helpful_reviews': {
'type': 'checkbox',
'label': "Replace Featured reviews with Helpful reviews?",
'default': true
},
'helpful_reviews_spoilers': {
'type': 'checkbox',
'label': "Allow Helpful reviews with spoilers?",
'default': false
},
'disable_iconsites': {
'type': 'checkbox',
'label': "Disable the icon sites code?",
'default': false
},
'disable_sites': {
'type': 'checkbox',
'label': "Disable the searchable sites code?",
'default': false
},
'highlight_sites_movie': {
'label': 'Highlight sites:      ',
'type': 'text',
'default': 'PTP,KG,BTN,BTN-Title,SC,CG,TVV,Tik'
},
'highlight_missing_movie': {
'label': 'Mark when not on:',
'type': 'text',
'default': ''
},
'loadmod_on_start_search': {
'section': 'Search/List/Watchlist Page:',
'type': 'checkbox',
'label': 'Load links to sites on start?',
'default': false
},
'load_second_bar_search': {
'type': 'checkbox',
'label': 'Enable the 2nd search bar?',
'default': false
},
'load_third_bar_search': {
'type': 'checkbox',
'label': 'Enable the 3rd search bar?',
'default': false
},
'call_http_mod_search': {
'type': 'checkbox',
'label': 'Auto-search sites for results?',
'default': true
},
'hide_missing_search': {
'type': 'checkbox',
'label': "Hide link if search didn't found results?",
'default': false
},
'use_mod_icons_search': {
'type': 'checkbox',
'label': 'Use icons instead of text?',
'default': true
},
'ignore_type_search': {
'type': 'checkbox',
'label': 'Search all sites, ignoring movie/tv distinction?',
'default': false
},
'highlight_sites_search': {
'label': 'Highlight sites:      ',
'type': 'text',
'default': ''
},
'highlight_missing_search': {
'label': 'Mark when not on:',
'type': 'text',
'default': ''
},
'ratings_img_px': {
'label': 'Size of the ratings icons:  ',
'section': 'External ratings:',
'type': 'select',
'options': ['32px', '48px', '64px'],
'default': '48px'
},
'ratings_cfg_metacritic': {
'type': 'checkbox',
'label': 'Enable Metacritic ratings?',
'default': true
},
'ratings_cfg_rotten': {
'type': 'checkbox',
'label': 'Enable Rotten Tomatoes ratings?',
'default': true
},
'ratings_cfg_letterboxd': {
'type': 'checkbox',
'label': 'Enable Letterboxd ratings?',
'default': true
},
'ratings_cfg_douban': {
'type': 'checkbox',
'label': 'Enable Douban ratings?',
'default': false
},
'ratings_cfg_allocine': {
'type': 'checkbox',
'label': 'Enable Allocine ratings?',
'default': false
},
'ratings_cfg_anime': {
'type': 'checkbox',
'label': 'Enable MyAnimeList & AniList ratings?',
'default': false
},
'ratings_cfg_color': {
'type': 'checkbox',
'label': 'Enable color scheme for ratings?',
'default': true
},
'ratings_cfg_color_scheme': {
'label': 'Reference points for colors: ',
'type': 'text',
'default': '69,49'
},
'ratings_cfg_omdb_apikey': {
'label': 'OMDb API key: ',
'type': 'text',
'default': ''
},
'radarr_searchformovie': {
'section': 'Radarr settings:',
'type': 'checkbox',
'label': 'Search for movie on add?',
'default': true
},
'radarr_monitored': {
'type': 'checkbox',
'label': 'Add monitored?',
'default': true
},
'radarr_url': {
'label': 'Radarr URL:' + radarr_url_spacing,
'type': 'text',
'default': 'http://localhost:7878'
},
'radarr_apikey': {
'label': 'Radarr API Key:' + radarr_apikey_spacing,
'type': 'text',
'default': ''
},
'radarr_rootfolderpath': {
'label': 'Radarr Root Folder Path:' + radarr_rootfolderpath_spacing,
'type': 'text',
'default': 'D:\\Movies'
},
'radarr_profileid': {
'label': 'Radarr Quality Profile:      ',
'type': 'select',
'options': ['Any', 'HD - 720p/1080p', 'HD-1080p', 'HD-720p', 'SD', 'Ultra-HD', 'Custom'],
'default': 'Any'
},
'radarr_customprofileid': {
'label': 'Custom Quality ProfileID:' + radarr_rootfolderpath_spacing,
'type': 'text',
'default': '1'
},
'radarr_minimumavailability': {
'label': 'Minimum Availability:        ',
'type': 'select',
'options': ['announced', 'inCinemas', 'released'],
'default': 'inCinemas'
},
'radarr2_searchformovie': {
'section': 'Radarr2 settings:',
'type': 'checkbox',
'label': 'Search for movie on add?',
'default': true
},
'radarr2_monitored': {
'type': 'checkbox',
'label': 'Add monitored?',
'default': true
},
'radarr2_url': {
'label': 'Radarr2 URL:' + radarr_url_spacing,
'type': 'text',
'default': 'http://localhost:7979'
},
'radarr2_apikey': {
'label': 'Radarr2 API Key:' + radarr_apikey_spacing,
'type': 'text',
'default': ''
},
'radarr2_rootfolderpath': {
'label': 'Radarr2 Root Folder Path:' + radarr_rootfolderpath_spacing,
'type': 'text',
'default': 'D:\\Movies'
},
'radarr2_profileid': {
'label': 'Radarr2 Quality Profile:      ',
'type': 'select',
'options': ['Any', 'HD - 720p/1080p', 'HD-1080p', 'HD-720p', 'SD', 'Ultra-HD', 'Custom'],
'default': 'Any'
},
'radarr2_customprofileid': {
'label': 'Custom Quality ProfileID:' + radarr_rootfolderpath_spacing,
'type': 'text',
'default': '1'
},
'radarr2_minimumavailability': {
'label': 'Minimum Availability:        ',
'type': 'select',
'options': ['announced', 'inCinemas', 'released'],
'default': 'inCinemas'
},
'sonarr_searchformissing': {
'section': 'Sonarr settings:',
'type': 'checkbox',
'label': 'Start search for missing episodes?',
'default': false
},
'sonarr_searchforcutoff': {
'type': 'checkbox',
'label': 'Start search for cutoff unmet episodes?',
'default': false
},
'sonarr_seasonfolder': {
'type': 'checkbox',
'label': 'Season Folder?',
'default': true
},
'sonarr_usescenenumbering': {
'label': 'Use Scene Numbering?' + sonarr_usescenenumbering_spacing,
'type': 'select',
'options': ['Auto', 'No', 'Yes'],
'default': 'Auto'
},
'sonarr_monitored': {
'label': 'Monitored:' + sonarr_monitored_spacing,
'type': 'select',
'options': ['All Episodes', 'Future Episodes', 'Missing Episodes', 'Existing Episodes', 'Pilot Episode', 'Only First Season', 'Only Latest Season', 'None'],
'default': 'All Episodes'
},
'sonarr_url': {
'label': 'Sonarr URL:' + radarr_url_spacing,
'type': 'text',
'default': 'http://localhost:8989'
},
'sonarr_apikey': {
'label': 'Sonarr API Key:' + radarr_apikey_spacing,
'type': 'text',
'default': ''
},
'sonarr_rootfolderpath': {
'label': 'Sonarr Root Folder Path:' + radarr_rootfolderpath_spacing,
'type': 'text',
'default': 'D:\\TVSeries'
},
'sonarr_profileid': {
'label': 'Sonarr Quality Profile:      ',
'type': 'select',
'options': ['Any', 'HD - 720p/1080p', 'HD-1080p', 'HD-720p', 'SD', 'Ultra-HD', 'Custom'],
'default': 'Any'
},
'sonarr_customprofileid': {
'label': 'Custom Quality ProfileID:' + radarr_rootfolderpath_spacing,
'type': 'text',
'default': '1'
},
'sonarr_languageprofileid': {
'label': 'Language ProfileID:' + sonarr_languageprofileid_spacing,
'type': 'text',
'default': '1'
},
'sonarr_seriestype': {
'label': 'Series Type:' + sonarr_seriestype_spacing,
'type': 'select',
'options': ['standard', 'daily', 'anime'],
'default': 'standard'
},
'trakt_synclimiter': {
'label': "Sliding watchlist's sync timeout (seconds):",
'section': 'Trakt-Watchlist settings:',
'type': 'select',
'options': ['15', '30', '60', '300'],
'default': '15'
},
'plex_server_url': {
'label': "Plex Server URL:",
'section': 'Plex settings:',
'type': 'text',
'default': 'http://127.0.0.1:32400'
},
'plex_token': {
'label': "Plex Token:          ",
'type': 'text',
'default': ''
},
'jellyfin_server_url': {
'label': "Jellyfin Server URL:",
'section': 'Jellyfin settings:',
'type': 'text',
'default': 'http://localhost:8096'
},
'jellyfin_username': {
'label': "Jellyfin Username:  ",
'type': 'text',
'default': ''
},
'jellyfin_password': {
'label': "Jellyfin Password:   ",
'type': 'text',
'default': ''
},
'jellyfin_debug': {
'type': 'checkbox',
'label': "Debug?",
'default': false
},
'emby_server_url': {
'label': "Emby Server URL:",
'section': 'Emby settings:',
'type': 'text',
'default': 'http://localhost:8096'
},
'emby_username': {
'label': "Emby Username:  ",
'type': 'text',
'default': ''
},
'emby_password': {
'label': "Emby Password:   ",
'type': 'text',
'default': ''
},
'emby_debug': {
'type': 'checkbox',
'label': "Debug?",
'default': false
},
'milkie_authToken': {
'label': 'Milkie:',
'section': 'Authorization Tokens:',
'type': 'text',
'default': ''
},
'tnt_authToken': {
'label': 'TNT:   ',
'type': 'text',
'default': ''
},
'void_url': {
'label': 'Voidtools URL:' + void_url_spacing,
'section': 'Voidtools config:',
'type': 'text',
'default': 'http://localhost:8080'
},
'void_username': {
'label': 'Voidtools Username:',
'type': 'text',
'default': ''
},
'void_password': {
'label': 'Voidtools Password: ',
'type': 'text',
'default': ''
}
};
//==============================================================================
// Add sites to Settings (GM_config)
//==============================================================================
$.each(custom_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Custom sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(public_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Public download sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(private_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Private download sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(chinese_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Chinese sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(french_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['French sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(german_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['German sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(usenet_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Usenet sites:'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(subs_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Subtitles sites (in 2nd bar):'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(pre_databases, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Pre databases (in 2nd bar):'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(other_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Other sites/tools (in 2nd bar):'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(streaming_sites, function(index, site) {
config_fields[configName(site)] = {
'section': (index == 0) ? ['Streaming sites (in 3rd bar):'] : '',
'type': 'checkbox',
'label': ' ' + site['name'] + (site['TV'] ? ' (TV)' : '')
};
});
$.each(icon_sites_main, function(index, icon_site) {
config_fields['show_icon_' + icon_site['name']] = {
'section': (index == 0) ? ['Icon sites (no search):'] : '',
'type': 'checkbox',
'label': ' ' + icon_site['name'],
'default': ('showByDefault' in icon_site) ? icon_site['showByDefault'] : true
};
});
$.each(special_buttons, function(index, icon_site) {
config_fields['show_icon_' + icon_site['name']] = {
'section': (index == 0) ? ['Special icons/buttons:'] : '',
'type': 'checkbox',
'label': ' ' + icon_site['name'],
'default': ('showByDefault' in icon_site) ? icon_site['showByDefault'] : true
};
});
//==============================================================================
// Initialize and register GM_config
//==============================================================================
GM_config.init({
'id': 'imdb_scout',
'title': 'IMDb Scout Mod Settings',
'fields': config_fields,
'css': `#imdb_scout_section_header_1, #imdb_scout_section_header_2, #imdb_scout_section_header_3, \
#imdb_scout_section_header_4, #imdb_scout_section_header_5, #imdb_scout_section_header_6, \
#imdb_scout_section_header_7, #imdb_scout_section_header_8, #imdb_scout_section_header_9, \
#imdb_scout_section_header_10, #imdb_scout_section_header_11, #imdb_scout_section_header_12, \
#imdb_scout_section_header_13, #imdb_scout_section_header_14, #imdb_scout_section_header_15, \
#imdb_scout_section_header_16, #imdb_scout_section_header_17, #imdb_scout_section_header_18, \
#imdb_scout_section_header_19, #imdb_scout_section_header_20, #imdb_scout_section_header_21, \
#imdb_scout_section_header_22, #imdb_scout_section_header_23, #imdb_scout_section_header_24, \
#imdb_scout_section_header_25 { \
background: #00ab00 !important; \
color: black !important; \
font-weight: bold !important; \
border: 0px !important; \
padding-left: 0px !important; \
text-align: middle !important;}\
.field_label { \
display: flex !important; \
align-items: center !important; \
font-weight: normal !important;}\
.config_var { \
margin-top: 2px !important; \
margin-bottom: 2px !important; \
display: flex !important; \
align-items: center !important;}\
#imdb_scout_aftertitle_var { \
margin-top: 0px !important; \
margin-bottom: 0px !important;}\
input { \
margin-top: 0px !important; \
margin-bottom: 0px !important;}\
.grey_link { \
margin-left: 4px !important;}\
#imdb_scout_section_header_0 { \
font-weight: bold !important; \
border: 0px !important; \
margin-top: 0px !important; \
background: #bfbfbf !important;}\
#imdb_scout_header { \
background: black !important; \
color: white !important;}\
#imdb_scout_section_0 { \
margin-top: 0px !important;}`,
'events':
{
'open': function() {
// Iframe position.
this.frame.style.top = '50px';
this.frame.style.left = 'auto';
this.frame.style.right = '20px';
this.frame.style.height = '90%';
this.frame.style.width = '450px';
$('#imdb_scout').contents().find('input#imdb_scout_field_highlight_sites_movie').attr('size', '35');
$('#imdb_scout').contents().find('input#imdb_scout_field_highlight_missing_movie').attr('size', '35');
$('#imdb_scout').contents().find('input#imdb_scout_field_highlight_sites_search').attr('size', '35');
$('#imdb_scout').contents().find('input#imdb_scout_field_highlight_missing_search').attr('size', '35');
$('#imdb_scout').contents().find('input#imdb_scout_field_mod_icons_size').attr('size', '1');
$('#imdb_scout').contents().find('input#imdb_scout_field_cfg_iconsize').attr('size', '1');
$('#imdb_scout').contents().find('input#imdb_scout_field_radarr_customprofileid').attr('size', '1');
$('#imdb_scout').contents().find('input#imdb_scout_field_radarr2_customprofileid').attr('size', '1');
$('#imdb_scout').contents().find('input#imdb_scout_field_sonarr_customprofileid').attr('size', '1');
$('#imdb_scout').contents().find('input#imdb_scout_field_sonarr_languageprofileid').attr('size', '1');
$('#imdb_scout').contents().find('input#imdb_scout_field_ratings_cfg_color_scheme').attr('size', '3');
const modVersion = 'IMDb Scout Mod v' + GM.info.script.version;
const modUrl = 'https://greasyfork.org/en/scripts/407284-imdb-scout-mod';
$('#imdb_scout').contents().find('#imdb_scout_section_header_0').append($(''+modVersion+''));
$('#imdb_scout').contents().find('#imdb_scout_section_header_0').find('a').css({
'text-decoration': 'none',
'color': '#cb0000'
});
$('#imdb_scout').contents().find('#imdb_scout_section_13').find('.field_label').each(function(index, label) {
var url = new URL(custom_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(custom_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_14').find('.field_label').each(function(index, label) {
var url = new URL(public_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(public_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_15').find('.field_label').each(function(index, label) {
var url = new URL(private_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(private_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_16').find('.field_label').each(function(index, label) {
var url = new URL(chinese_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(chinese_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_17').find('.field_label').each(function(index, label) {
var url = new URL(french_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(french_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_18').find('.field_label').each(function(index, label) {
var url = new URL(german_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(german_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_19').find('.field_label').each(function(index, label) {
var url = new URL(usenet_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(usenet_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_20').find('.field_label').each(function(index, label) {
var url = new URL(subs_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(subs_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_21').find('.field_label').each(function(index, label) {
var url = new URL(pre_databases[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(pre_databases[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_22').find('.field_label').each(function(index, label) {
var url = new URL(other_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(other_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_23').find('.field_label').each(function(index, label) {
var url = new URL(streaming_sites[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(streaming_sites[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_24').find('.field_label').each(function(index, label) {
var url = new URL(icon_sites_main[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(icon_sites_main[index], true));
});
$('#imdb_scout').contents().find('#imdb_scout_section_25').find('.field_label').each(function(index, label) {
var url = new URL(special_buttons[index].searchUrl);
$(label).append(' ' + ''
+ (/www./.test(url.hostname) ? url.hostname.match(/www.(.*)/)[1] : url.hostname) + '');
$(label).prepend(getFavicon(special_buttons[index], true));
});
$('#imdb_scout').contents().find("img").css({"margin-right": "4px", "width": GM_config.get('cfg_iconsize'), "height": GM_config.get('cfg_iconsize')});
},
'close': function() {
location.reload();
}
}
});
GM.registerMenuCommand('IMDb Scout Mod Settings', function() {GM_config.open();});
//==============================================================================
// Remove tracking from IMDb's URL before start
// Force the title pages to open in Reference View
//==============================================================================
if (Boolean(location.href.match('\\?ref_=')) || Boolean(location.href.match('\\?pf_'))) {
let stripped_href = location.href.split('?ref_=')[0];
stripped_href = stripped_href.split('?pf_')[0];
if (GM_config.get('force_reference_view') && Boolean(location.href.match('/title/tt')) && !Boolean(location.href.match('reference'))) {
console.log("IMDb Scout Mod (Redirect): Redirect to Reference Page (tracking stripped).");
if (stripped_href.endsWith('/')) {
stripped_href = stripped_href + "reference";
} else {
stripped_href = stripped_href + "/reference";
}
}
window.location.replace(stripped_href);
return;
} else if (GM_config.get('force_reference_view') && Boolean(location.href.match('/title/tt')) && !Boolean(location.href.match('reference'))) {
console.log("IMDb Scout Mod (Redirect): Redirect to Reference Page.");
let reference_href = location.href;
if (reference_href.endsWith('/')) {
reference_href = reference_href + "reference";
} else {
reference_href = reference_href + "/reference";
}
window.location.replace(reference_href);
return;
}
//==============================================================================
// Fetch per-site values from GM_config
//==============================================================================
$.each(sites, function(index, site) {
site['show'] = GM_config.get(configName(site));
});
$.each(icon_sites, function(index, icon_site) {
icon_site['show'] = GM_config.get('show_icon_' + icon_site['name']);
});
//==============================================================================
// Global variables
//==============================================================================
// For internal use (order matters).
const valid_states = [
'seeding',
'found',
'missing',
'logged_out',
'error'
];
// Are we on a search/list page?
const onSearchPage = Boolean(location.href.match('/search/'))
|| Boolean(location.href.match('/list/'))
|| Boolean(location.href.match('watchlist'))
|| Boolean(location.href.match('ratings'));
// Are we on a reference page?
const onReferencePage = Boolean(location.href.match('/reference'));
// Globals for the sorting launcher.
var showSitezFirstBar = 0;
var sortReqOnNewLineTemp = false;
// Globals for CheckURLs.
var hosts_to_Process = 0;
var old_bad_hosts = [];
var new_bad_hosts = [];
// Trakt auth code?
const traktCodePage = Boolean(location.href.match(/tt0052077\/reference\?code=/));
//==============================================================================
// Stuff for the new IMDb design (to start after reflow)
//==============================================================================
function startObserver() {
// Double check if still on a redesigned page. Possible fix for a rare bug when the script runs before page transfers to a reference page if set on imdb's settings.
if ($('html[xmlns\\:og="http://ogp.me/ns#"]').length) {
return;
}
if ($('.ipc-page-section').length) {
addDummyElem();
const obscfg = { childList: true};
const obs = new MutationObserver(checkDummyElem);
obs.observe($('.ipc-page-section')[0], obscfg);
} else {
console.log("IMDb Scout Mod (Start Observer Error): Element not found! Please report it.");
GM.notification("Element not found! Please report it.", "IMDb Scout Mod (Start Observer Error)");
}
}
function addDummyElem() {
const temp = $(' |