// ==UserScript==
// @name MAL-Sync
// @namespace https://greasyfork.org/users/92233
// @description Integrates MyAnimeList/AniList/Kitsu/Simkl into various sites, with auto episode tracking.
// @version 0.8.8
// @author lolamtisch@gmail.com
// @license GPL-3.0
// @iconURL https://raw.githubusercontent.com/MALSync/MALSync/master/assets/icons/icon128.png
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_listValues
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_notification
// @grant GM.xmlHttpRequest
// @grant GM.getValue
// @grant GM.setValue
// @match *://myanimelist.net/anime/*
// @match *://myanimelist.net/manga/*
// @match *://myanimelist.net/animelist/*
// @match *://myanimelist.net/mangalist/*
// @match *://myanimelist.net/anime.php?id=*
// @match *://myanimelist.net/manga.php?id=*
// @match *://myanimelist.net/character/*
// @match *://myanimelist.net/people/*
// @match *://myanimelist.net/search/*
// @match *://anilist.co/*
// @match *://kitsu.io/*
// @match *://simkl.com/*
// @match *://malsync.moe/mal/oauth*
// @match *://*.9anime.to/watch/*
// @match *://*.9anime.ru/watch/*
// @match *://*.9anime.live/watch/*
// @match *://*.9anime.one/watch/*
// @match *://*.9anime.page/watch/*
// @match *://*.9anime.video/watch/*
// @match *://*.9anime.life/watch/*
// @match *://*.9anime.love/watch/*
// @match *://*.9anime.tv/watch/*
// @match *://*.9anime.app/watch/*
// @match *://*.9anime.at/watch/*
// @match *://*.9anime.bar/watch/*
// @match *://*.9anime.pw/watch/*
// @match *://*.9anime.cz/watch/*
// @match *://*.crunchyroll.com/*
// @match *://*.mangadex.org/manga/*
// @match *://*.mangadex.org/title/*
// @match *://*.mangadex.org/chapter/*
// @match *://*.mangadex.cc/manga/*
// @match *://*.mangadex.cc/title/*
// @match *://*.mangadex.cc/chapter/*
// @match *://*.gogoanime.tv/*
// @match *://*.gogoanime.io/*
// @match *://*.gogoanime.in/*
// @match *://*.gogoanime.se/*
// @match *://*.gogoanime.sh/*
// @match *://*.gogoanime.video/*
// @match *://*.gogoanime.movie/*
// @match *://*.gogoanime.so/*
// @match *://*.gogoanime.ai/*
// @match *://*.gogoanime.vc/*
// @match *://*.gogoanimes.co/*
// @match *://*.animego.to/*
// @match *://*.branitube.net/video/*
// @match *://*.branitube.net/lista/*
// @match *://*.www.turkanime.tv/video/*
// @match *://*.www.turkanime.tv/anime/*
// @match *://*.www.turkanime.net/video/*
// @match *://*.www.turkanime.net/anime/*
// @match *://twist.moe/*
// @match *://app.emby.media/*
// @match *://app.emby.tv/*
// @match *://app.plex.tv/*
// @match *://www.netflix.com/*
// @match *://animepahe.com/play/*
// @match *://animepahe.com/anime/*
// @match *://animepahe.ru/play/*
// @match *://animepahe.ru/anime/*
// @match *://animepahe.org/play/*
// @match *://animepahe.org/anime/*
// @match *://*.animeflv.net/anime/*
// @match *://*.animeflv.net/ver/*
// @match *://jkanime.net/*
// @match *://vrv.co/*
// @match *://proxer.me/*
// @match *://proxer.net/*
// @match *://4anime.to/*
// @match *://*.animeultima.eu/a/*
// @match *://*.animeultima.to/a/*
// @match *://*.aniflix.tv/*
// @match *://www.animefreak.tv/watch/*
// @match *://www.animelab.com/*
// @match *://*.kickassanime.io/anime/*
// @match *://*.kickassanime.ru/anime/*
// @match *://*.kickassanime.rs/anime/*
// @match *://*.kickassanime.lol/anime/*
// @match *://animekisa.tv/*
// @match *://*.wakanim.tv/*
// @match *://animeindo.net/*
// @match *://animeindo.moe/*
// @match *://shinden.pl/episode/*
// @match *://shinden.pl/series/*
// @match *://shinden.pl/titles/*
// @match *://shinden.pl/epek/*
// @match *://www.funimation.com/shows/*
// @match *://www.funimation.com/*/shows/*
// @match *://voiranime.com/*
// @match *://*.dubbedanime.net/*
// @match *://www.viz.com/*
// @match *://manganelo.com/*
// @match *://*.neko-sama.fr/*
// @match *://www.animezone.pl/odcinki/*
// @match *://www.animezone.pl/odcinek/*
// @match *://www.animezone.pl/anime/*
// @match *://anime-odcinki.pl/anime/*
// @match *://animeflix.io/*
// @match *://serimanga.com/*
// @match *://mangadenizi.com/*
// @match *://moeclip.com/*
// @match *://mangalivre.net/*
// @match *://tmofans.com/*
// @match *://lectortmo.com/*
// @match *://unionleitor.top/*
// @match *://unionmangas.top/*
// @match *://mangaplus.shueisha.co.jp/*
// @match *://*.japscan.se/*
// @match *://goyabu.com/*
// @match *://*.animesvision.com.br/*
// @match *://*.animesvision.biz/*
// @match *://www.hulu.com/*
// @match *://aniwatch.me/*
// @match *://www.hidive.com/*
// @match *://manga.fascans.com/manga/*
// @match *://*.primevideo.com/*
// @match *://mangakatana.com/manga/*
// @match *://*.manga4life.com/*
// @match *://bato.to/*
// @match *://dreamsub.cc/*
// @match *://mangapark.net/*
// @match *://animeshouse.net/episodio/*
// @match *://animeshouse.net/filme/*
// @match *://animexin.xyz/*
// @match *://monoschinos.com/*
// @match *://monoschinos2.com/*
// @match *://animefire.net/*
// @match *://otakufr.co/*
// @match *://samehadaku.vip/*
// @match *://*.tsukimangas.com/*
// @match *://mangatx.com/*
// @match *://tranimeizle.net/*
// @match *://www.tranimeizle.net/*
// @match *://anihub.tv/*
// @match *://www.animestreamingfr.fr/anime/*
// @match *://scantrad.net/*
// @match *://www.animeid.tv/*
// @match *://animixplay.to/v*
// @match *://animixplay.com/v*
// @match *://myanimelist.net/anime/*/*/episode/*
// @match *://*.animesimple.com/*
// @match *://animeunity.it/anime/*
// @match *://*.mangahere.cc/manga/*
// @match *://*.fanfox.net/manga/*
// @match *://*.mangafox.la/manga/*
// @match *://justanime.app/*
// @match *://yayanimes.net/*
// @match *://animedesu.pl/*
// @match *://simplyaweeb.com/series/*
// @match *://simplyaweeb.com/manga/*
// @match *://animevibe.wtf/ani/*
// @match *://animemate.xyz/ani/*
// @match *://wuxiaworld.site/novel/*
// @match *://www.anime-on-demand.de/anime/*
// @match *://edelgardescans.com/*
// @match *://hatigarmscanz.net/*
// @match *://leviatanscans.com/*
// @match *://methodscans.com/*
// @match *://the-nonames.com/*
// @match *://reaperscans.com/*
// @match *://lynxscans.com/*
// @match *://skscans.com/*
// @match *://zeroscans.com/*
// @match *://reader.deathtollscans.net/*
// @match *://reader.kireicake.com/*
// @match *://sensescans.com/reader*
// @match *://manhuaplus.com/manga*
// @match *://readm.org/manga/*
// @match *://tioanime.com/anime/*
// @match *://tioanime.com/ver/*
// @match *://yugenani.me/*
// @match *://*.mangasee123.com/manga*
// @match *://*.mangasee123.com/read-online*
// @match *://animetribes.ru/watch/*
// @match *://*.okanime.com/animes/*
// @match *://*.okanime.com/movies/*
// @match *://*.okanime.tv/animes/*
// @match *://*.okanime.tv/movies/*
// @match *://bs.to/serie/*
// @match *://pantsubase.tv/anime/*
// @match *://pantsubase.tv/watch/*
// @match *://animeowl.net/*
// @match *://chill-game.com/*
// @match *://*.asurascans.com/*
// @match *://naniscans.com/*
// @match *://merakiscans.com/*
// @match *://an1me.nl/*
// @match *://mangajar.com/manga/*
// @match *://animedao.to/*
// @match *://*.otakustv.com/anime/*
// @match *://demo.komga.org/*
// @match *://animewho.com/*
// @match *://animesuge.io/anime/*
// @match *://toonily.net/manga/*
// @match *://fumetsu.pl/anime/*
// @match *://www.nonstopscans.com/*
// @match *://frixysubs.pl/odcinki.html?id=*
// @match *://frixysubs.pl/ogladaj.html?id=*
// @match *://guya.moe/*
// @match *://mangahub.io/*
// @match *://comick.fun/*
// @match *://*.anime-shitai.com/*
// @match *://kangaryu-team.fr/*
// @match *://www.japanread.cc/*
// @match *://catmanga.org/*
// @match *://*.openload.co/*
// @match *://*.openload.pw/*
// @match *://*.streamango.com/*
// @match *://*.mp4upload.com/*
// @match *://*.mcloud.to/*
// @match *://*.mcloud2.to/*
// @match *://*.prettyfast.to/*
// @match *://*.rapidvideo.com/*
// @match *://*.rapidvid.to/*
// @match *://*.static.crunchyroll.com/*
// @match *://*.static.vrv.co/*
// @match *://*.vidstreaming.io/*
// @match *://*.vidstreaming.me/*
// @match *://*.xstreamcdn.com/*
// @match *://*.gcloud.live/*
// @match *://*.oload.tv/*
// @match *://*.mail.ru/*
// @match *://*.myvi.ru/*
// @match *://*.sibnet.ru/*
// @match *://*.tune.pk/*
// @match *://*.vimple.ru/*
// @match *://*.href.li/*
// @match *://*.vk.com/*
// @match *://*.cloudvideo.tv/*
// @match *://*.fembed.net/*
// @match *://*.fembed.com/*
// @match *://*.animeproxy.info/*
// @match *://*.feurl.com/*
// @match *://*.embedsito.com/v/*
// @match *://*.fcdn.stream/v/*
// @match *://*.fcdn.stream/e/*
// @match *://*.vaplayer.xyz/v/*
// @match *://*.vaplayer.xyz/e/*
// @match *://*.femax20.com/v/*
// @match *://*.femax20.com/e/*
// @match *://*.youpload.co/*
// @match *://*.yourupload.com/*
// @match *://*.vidlox.me/*
// @match *://*.kwik.cx/*
// @match *://*.mega.nz/*
// @match *://*.animeflv.net/*
// @match *://*.hqq.tv/*
// @match *://waaw.tv/*
// @match *://*.jkanime.net/*
// @match *://*.ok.ru/*
// @match *://*.novelplanet.me/*
// @match *://*.stream.proxer.me/*
// @match *://*.stream.proxer.net/*
// @match *://verystream.com/*
// @match *://*.animeultima.eu/e/*
// @match *://*.animeultima.eu/faststream/*
// @match *://*.animeultima.to/e/*
// @match *://*.animeultima.to/faststream/*
// @match *://*.vidoza.net/*
// @match *://crazyload.co/*
// @match *://gounlimited.to/*
// @match *://www.ani-stream.com/*
// @match *://flex.aniflex.org/public/dist/*
// @match *://animedaisuki.moe/embed/*
// @match *://*.wakanim.tv/*/*/*/embeddedplayer/*
// @match *://superitu.com/embed/*
// @match *://www.dailymotion.com/embed/*
// @match *://vev.io/embed/*
// @match *://vev.red/embed/*
// @match *://www.funimation.com/player/*
// @match *://jwpstream.com/jwps/yplayer.php*
// @match *://www.vaplayer.xyz/v/*
// @match *://mp4.sh/embed/*
// @match *://embed.mystream.to/*
// @match *://*.bitchute.com/embed/*
// @match *://*.streamcherry.com/embed/*
// @match *://*.clipwatching.com/*
// @match *://*.flix555.com/*
// @match *://*.vshare.io/v/*
// @match *://ebd.cda.pl/*
// @match *://*.replay.watch/*
// @match *://*.playhydrax.com/*
// @match *://hydrax.net/*
// @match *://*.hydracdn.network/*
// @match *://*.streamium.xyz/*
// @match *://animo-pace-stream.io/*
// @match *://*.pstream.net/e/*
// @match *://*.animefever.tv/embed/*
// @match *://*.haloani.ru/*
// @match *://*.moeclip.com/v/*
// @match *://*.moeclip.com/embed/*
// @match *://*.mixdrop.co/e/*
// @match *://*.mixdrop.to/e/*
// @match *://gdriveplayer.me/embed*
// @match *://sendvid.net/v/*
// @match *://sendvid.com/embed/*
// @match *://streamz.cc/*
// @match *://*.vidbm.com/embed-*
// @match *://*.vidbem.com/embed-*
// @match *://*.cloudhost.to/*/mediaplayer/*/_embed.php?*
// @match *://*.letsupload.co/*/mediaplayer/*/_embed.php?*
// @match *://player.mangakyo.me/stream/embed.php*
// @match *://streamtape.com/*
// @match *://streamtape.net/*
// @match *://streamtape.xyz/*
// @match *://streamtape.to/*
// @match *://reproductor.monoschinos.com/*
// @match *://uptostream.com/iframe/*
// @match *://easyload.io/e/*
// @match *://*.googleusercontent.com/gadgets/*
// @match *://animedesu.pl/player/desu.php?v=*
// @match *://*.animevibe.wtf/players/*.php*
// @match *://*.animemate.xyz/players/*.php*
// @match *://*.animixplay.to/api/live*
// @match *://third-party.animekisa.tv/player-*.php?*
// @match *://cloud9.to/e*/*
// @match *://*.okanime.com/cdn/*/embed/?*
// @match *://*.okgaming.org/I/*
// @match *://*.gogo-stream.com/streaming.php?*
// @match *://*.gogo-stream.com/load.php?*
// @match *://*.gogo-stream.com/loadserver.php?*
// @match *://*.gogo-play.net/streaming.php?*
// @match *://*.gogo-play.net/load.php?*
// @match *://*.gogo-play.net/loadserver.php?*
// @match *://vivo.sx/embed/*
// @match *://ani.googledrive.stream/vidstreaming/*
// @match *://www.animelab.com/*
// @match *://vidstream.pro/e/*
// @match *://streamsb.net/*
// @match *://streamsb.com/*
// @match *://dood.to/*
// @match *://dood.watch/*
// @match *://doodstream.com/*
// @match *://vcdn.space/v/*
// @match *://youtube.googleapis.com/embed/*drive.google.com*
// @match *://hdvid.tv/*
// @match *://vidfast.co/*
// @match *://supervideo.tv/*
// @match *://jetload.net/*
// @match *://saruch.co/*
// @match *://vidmoly.me/*
// @match *://upstream.to/*
// @match *://abcvideo.cc/*
// @match *://aparat.cam/*
// @match *://vudeo.net/*
// @match *://voe.sx/*
// @match *://vidoo.tv/*
// @match *://nxload.com/*
// @match *://videobin.co/*
// @match *://uqload.com/*
// @match *://evoload.io/*
// @match *://yugenani.me/e/*
// @match *://kaa-play.com/*
// @match *://kaa-play.me/*
// @match *://betaplayer.life/*
// @match *://animeshouse.net/gcloud/*
// @match *://animato.me/embed/*
// @match *://animeshd.org/*/*id=*
// @exclude *myanimelist.net/anime/season*
// @exclude *myanimelist.net/anime/producer*
// @exclude *myanimelist.net/manga/magazine*
// @exclude *myanimelist.net/anime/genre*
// @exclude *myanimelist.net/manga/genre*
// @exclude *crunchyroll.com/
// @exclude *crunchyroll.com
// @exclude *crunchyroll.com/acct*
// @exclude *crunchyroll.com/anime-feature/*
// @exclude *crunchyroll.com/anime-news/*
// @exclude *crunchyroll.com/comics*
// @exclude *crunchyroll.com/edit*
// @exclude *crunchyroll.com/email*
// @exclude *crunchyroll.com/forum*
// @exclude *crunchyroll.com/home*
// @exclude *crunchyroll.com/inbox*
// @exclude *crunchyroll.com/library*
// @exclude *crunchyroll.com/login*
// @exclude *crunchyroll.com/manga*
// @exclude *crunchyroll.com/newprivate*
// @exclude *crunchyroll.com/news*
// @exclude *crunchyroll.com/notifications*
// @exclude *crunchyroll.com/order*
// @exclude *crunchyroll.com/outbox*
// @exclude *crunchyroll.com/pm*
// @exclude *crunchyroll.com/search*
// @exclude *crunchyroll.com/store*
// @exclude *crunchyroll.com/user*
// @exclude *crunchyroll.com/videos*
// @exclude *crunchyroll.com/affiliate_iframeplayer*
// @exclude *gogoanime*.*/
// @exclude *gogoanime*.*/*.html*
// @exclude *gogoanime*.*/anime-List*
// @exclude *gogoanime*.*/user*
// @exclude *gogoanime*.*/genre/*
// @exclude *gogoanime*.*/sub-category/*
// @exclude *animego*.*/
// @exclude *animego*.*/*.html*
// @exclude *animego*.*/anime-List*
// @exclude *animego*.*/user*
// @exclude *animego*.*/genre/*
// @exclude *animego*.*/sub-category/*
// @exclude *://*.branitube.net/lista/filter/*
// @exclude *://*.branitube.net/lista/pagina/*
// @exclude *://jkanime.net/
// @exclude *://jkanime.net/letra/*
// @exclude *://jkanime.net/buscar/*
// @exclude *://jkanime.net/terminos-condiciones/
// @exclude *://www.animezone.pl/anime/lista*
// @exclude *://www.animezone.pl/anime/sezony*
// @exclude *://www.animezone.pl/anime/ranking*
// @exclude *://www.animezone.pl/anime/nadchodzace*
// @exclude *://www.animezone.pl/anime/premiery*
// @exclude *://www.animezone.pl/anime/filmy*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @resource material.css https://code.getmdl.io/1.3.0/material.indigo-pink.min.css
// @resource materialFont.css https://fonts.googleapis.com/icon?family=Material+Icons
// @resource material.js https://greasyfork.org/scripts/377924-material-design-lite-mal-sync/code/material-design-lite%20MAL-Sync.js?version=671593
// @run-at document_start
// @connect myanimelist.net
// @connect kissanimelist.firebaseio.com
// @connect graphql.anilist.co
// @connect media.kitsu.io
// @connect api.simkl.com
// @connect api.malsync.moe
// @connect *
// @downloadURL none
// ==/UserScript==
var i18n = {"Search":"Site Search","Show":"Show","Help":"Help","Update":"Update","Add":"Add","Reset":"Reset","Remove":"Remove","Loading":"Loading","Select":"Select","Yes":"Yes","Ok":"Ok","No":"No","Cancel":"Cancel","updated":"Updated","removed":"Removed","NothingFound":"Nothing Found","Not_Found":"Not Found!","NoEntries":"No Entries","fullscreen":"fullscreen","close":"close","All":"All","Anime":"Anime","Manga":"Manga","Package_Description":"Integrates MyAnimeList/AniList/Kitsu/Simkl into various sites, with auto episode tracking.","UI_Status":"Status:","UI_Status_watching_anime":"Watching","UI_Status_watching_manga":"Reading","UI_Status_Completed":"Completed","UI_Status_OnHold":"On-Hold","UI_Status_Dropped":"Dropped","UI_Status_planTo_anime":"Plan to Watch","UI_Status_planTo_manga":"Plan to Read","UI_Status_Rewatching_anime":"Rewatching","UI_Status_Rewatching_manga":"Rereading","UI_Episode":"Episode:","UI_Volume":"Volume:","UI_Chapter":"Chapter:","UI_Score":"Your Score:","UI_Score_Not_Rated":"Not rated","UI_Score_Masterpiece":"(10) Masterpiece","UI_Score_Great":"(9) Great","UI_Score_VeryGood":"(8) Very Good","UI_Score_Good":"(7) Good","UI_Score_Fine":"(6) Fine","UI_Score_Average":"(5) Average","UI_Score_Bad":"(4) Bad","UI_Score_VeryBad":"(3) Very Bad","UI_Score_Horrible":"(2) Horrible","UI_Score_Appalling":"(1) Appalling","UI_Rules":"Rules","syncPage_flashm_resumeMsg":"Resume at $1","syncPage_flashm_sync_anime":"Update $1 to episode $2","syncPage_flashm_sync_manga":"Update $1 to chapter $2","syncPage_flashm_sync_undefined_undo":"Undo","syncPage_flashm_sync_undefined_wrong":"Wrong?","syncPage_flashm_failded":"Update failed","syncPage_flashConfirm_complete":"Set as completed?","syncPage_flashConfirm_start_anime":"Start watching?","syncPage_flashConfirm_rewatch_finish_anime":"Finish rewatching?","syncPage_flashConfirm_rewatch_finish_manga":"Finish rereading?","syncPage_flashConfirm_start_manga":"Start reading?","syncPage_flashConfirm_rewatch_start_anime":"Rewatch Anime?","syncPage_flashConfirm_rewatch_start_manga":"Reread Manga?","syncPage_flashConfirm_Anime_Correct":"Is \"$1\" correct?","syncPage_malObj_addAnime":"Add to $1","syncPage_malObj_nextEp_anime":"Episode $1","syncPage_malObj_nextEp_manga":"Chapter $1","syncPage_flashConfirm_offsetHandler_1":"A possible Episode offset of $1 was detected. Is that correct? ","anilistClass_authentication":"Token saved you can close this page now","kitsuClass_authentication_text":"To login with Kitsu, you need to enter your account's e-mail and password.
Your credentials are not stored on your computer or anywhere else.
They are directly sent to Kitsu. Only the returned access token is saved.
","kitsuClass_authentication_Password":"Password","kitsuClass_authentication_Login":"Login","kitsuClass_authentication_Success":"Token saved you can close this page now","kitsuClass_authentication_Wrong":"Credentials wrong","bookmarksItem_Years":"Years","bookmarksItem_Year":"Year","bookmarksItem_Days":"Days","bookmarksItem_Day":"Day","bookmarksItem_Hours":"Hours","bookmarksItem_Hour":"Hour","bookmarksItem_mins":"mins","bookmarksItem_min":"min","bookmarksItem_secs":"seconds","bookmarksItem_sec":"second","bookmarksItem_now":"Now","bookmarksItem_ago":"$1 ago","prediction_Episode_anime":"Next episode estimated in $1","prediction_Last_anime":"Last episode released $1 ago","prediction_Episode_manga":"Next chapter estimated in $1","prediction_Last_manga":"Last chapter released $1 ago","prediction_next":"Next in $1","prediction_incomplete":"Incomplete","prediction_ongoing":"Ongoing","prediction_complete":"Complete","prediction_Airing":"Airing in $1","correction_Offset":"Episode Offset","correction_Offset_text":"Input the episode offset, if an anime has 12 episodes, but uses the numbers 0-11 rather than 1-12, you simply type \" +1 \" in the episode offset.","correction_WrongUrl":"Only change this URL if it points to the wrong anime page on MAL.","correction_Search":"Correction Search","correction_Search_text":"This field is for finding an anime, when you need to correct the \"MyAnimeList URL\" shown above.
To make a search, simply begin typing the name of an anime, and a list with results will automatically appear as you type.","correction_NoMal":"If the Anime/Manga can't be found on MAL","correction_NoEntry":"No entry on MyAnimeList","correction_NewOffset":"New Offset ($1) set.","correction_OffsetReset":"Offset reset","correction_NewUrl":"New URL '$1' set.","correction_NewUrlReset":"MyAnimeList URL reset","correction_DBRequest":"Submit database correction request?","overview_Continue_anime":"Continue watching","overview_Continue_manga":"Continue reading","overview_Next_Episode_anime":"Next Episode","overview_Next_Episode_manga":"Next Chapter","overview_Resume_Episode_anime":"Resume Episode","overview_Resume_Episode_manga":"Resume Chapter","overview_EditDetails":"Edit Details","overview_Characters":"Characters","overview_OpeningTheme":"Opening Theme:","overview_EndingTheme":"Ending Theme:","search_Type":"Type:","search_Score":"Score:","search_Year":"Year:","settings_General":"General","settings_Mode":"Mode","settings_Authenticate":"Authenticate","settings_LocalSync":"Local storage fallback","settings_LocalSync_Import":"Import","settings_LocalSync_Export":"Export","settings_Animesync":"Anime sync","settings_Animesync_Video":"Video","settings_Animesync_Instant":"Instant","settings_Animesync_Manual":"Manual","settings_Mangasync":"Manga sync","settings_AutoTracking_Video":"Update on $1% of video progress","settings_AutoTracking_Instant":"Delay instant autotracking by $1 seconds","settings_StreamingSite":"Streaming Site Links","settings_StreamingSite_text":"If disabled, the streaming site will no longer appear in an anime’s sidebar on MyAnimeList/AniList/Kitsu/Simkl.","settings_Thumbnails":"Thumbnails","settings_Thumbnails_text":"The option is for resizing the thumbnails on MyAnimeList eg. thumbnails for characters, people, recommendations, etc.","settings_Thumbnails_Large":"Large","settings_Thumbnails_Medium":"Medium","settings_Thumbnails_Small":"Small","settings_Thumbnails_Default":"MAL Default","settings_FriendScore":"Friend scores on detail page","settings_epPredictions":"Estimate episode number","settings_malTags":"Use Tags/Notes","settings_malTags_Text":"If enabled: The streaming page that you have used last is permanently (across browsers) saved in the tags/Notes section in your list. The saved string in the tag section is ugly, only really recommended if you dont use the tag/notes section.","settings_malContinue":"Continue watching links","settings_malResume":"Resume watching links","settings_usedPage":"Last used page links","settings_miniMAL_floatButtonStealth":"Stealth UI mode","settings_miniMAL_minimizeBigPopup":"Minimize big pop-ups","settings_miniMAL_floatButtonCorrection":"Remap floating button to the correction UI","settings_miniMAL_floatButtonHide":"Hide miniMAL floating menu button","settings_miniMAL_autoCloseMinimal":"Clicking outside closes miniMAL","settings_miniMAL_Display":"Display to the","settings_miniMAL_popup":"Extension Popup","settings_miniMAL_theme":"Theme","settings_miniMAL_window":"Open in separate window","settings_miniMAL_Display_Left":"Left","settings_miniMAL_Display_Right":"Right","settings_miniMAL_Height":"Height (px / %)","settings_miniMAL_Width":"Width (px / %)","settings_Shortcuts":"Shortcuts","settings_miniMAL_Open":"Open miniMAL","settings_miniMAL_NotSet":"Not Set","settings_loadPTWForProgress":"Load PTW/PTR for Progress evaluation","settings_Video_Player":"Video Player","settings_Video_Fullscreen":"Auto fullscreen","settings_Video_Resume":"Auto resume","settings_autoNextEp":"Autoplay next episode","settings_Shortcuts_Correction":"Open anime relation correction popup","settings_Shortcuts_Sync":"Set episode/chapter as read","settings_Shortcuts_Next_Episode":"Open next episode shortcut","settings_Shortcuts_Skip_Forward":"Skips the opening","settings_Shortcuts_Skip_Backward":"Jump back to opening's beginning","settings_Shortcuts_Click":"Click to enter shortcut","settings_introSkip":"Set opening skip length ($1 seconds)","settings_UpdateCheck":"Update Check","settings_UpdateCheck_Text":"Checks for new episodes in the background.","settings_Interval":"Interval","settings_Interval_Off":"Off","settings_Interval_Default_Anime":"Default Anime","settings_Interval_Default_Manga":"Default Manga","settings_ProgressCheck":"Progress Check","settings_Notifications":"Notifications","settings_Debugging":"Debugging","settings_ETC":"ETC","settings_Userscriptmode":"Userscript mode","settings_Userscriptmode_Text":"Disables the content script. This makes it possible to have the extension and userscript enabled at the same time.","settings_StrictCookies":"Strict Cookies","settings_StrictCookies_Text":"This option adds Firefox Multi-Account Containers support. Make sure to restart the browser after enabling this option","settings_highlightAllEp":"Highlight all Episodes/Chapters","settings_highlightAllEp_Text":"This option will highlight all watched chapters/episodes in the list you can find on some Anime/Manga sites","settings_ClearCache":"Clear Cache","settings_presenceHidePage":"Show MAL-Sync icon instead of page icon","settings_enabled":"Enabled","settings_shortcut_tooltip":"It is not recommended to set the shortcut to a single key","settings_progress_dropdown":"Estimation Source:","settings_progress_disabled":"Disabled","settings_progress_default":"Default","settings_website_button":"Websites","settings_custom_domains_button":"Custom domains","settings_clean_tags_button":"Clean Tags","settings_more_info":"More Info","settings_presenceShowButtons":"Show button to view the anime/manga on MAL or another provider","updateCheck_Refresh":"Refresh","updateCheck_StartCheck":"Start Check","updateCheck_NotificationCheck":"Notification Check","updateCheck_Episode":"Episode","updateCheck_Message":"Message","updateCheck_NotificationHistory":"Notification History","minimalApp_Overview":"Overview","minimalApp_Reviews":"Reviews","minimalApp_Recommendations":"Recommendations","minimalApp_Settings":"Settings","minimalClass_Popup":"Please allow pop-ups for this website","minimalClass_versionMsg":"Updated to version $1 $2CHANGELOG]","minimalClass_versionMsg_Text_1":"Thank you for installing MAL-Sync","minimalClass_versionMsg_Text_2":"Having Questions?","minimalClass_versionMsg_Text_3":"Open Source Code:","minimalClass_versionMsg_Text_4":"uBlock users please subscribe to this filter list! This fixes some problems like broken images","installPage_Mode":"Please select which Anime database you want use:","installPage_Howto":"How to use?","installPage_Howto_Description":"Just open an episode or chapter on any of the supported pages. The sync waits until 85% of the video is watched. For mangas it syncs on page load. This can be changed in the settings.","installPage_Wrong":"It syncs to the wrong MAL entry?","installPage_Wrong_Description":"You can easily change the relation like shown in the gif below. An episode offset can be set on that page too.","Anilist_Authenticate":"Please Authenticate Here","Emby_Authenticate":"MAL-Sync needs an Emby API key to work. More infos Here","Error_Authenticate":"Please Authenticate Here","Discord_rpc_browsing":"Browsing $1","discord_rpc_view_anime":"View Anime","discord_rpc_view_manga":"View Manga","nextEpShort_no_support":"This page doesn't support opening the next episode","nextEpShort_no_nextEp":"Couldn't find the next episode"}
/*! For license information please see malsync.user.js.LICENSE.txt */
!function(modules) {
var installedModules = {};
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) return installedModules[moduleId].exports;
var module = installedModules[moduleId] = {
i: moduleId,
l: !1,
exports: {}
};
return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
module.l = !0, module.exports;
}
__webpack_require__.m = modules, __webpack_require__.c = installedModules, __webpack_require__.d = function(exports, name, getter) {
__webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {
enumerable: !0,
get: getter
});
}, __webpack_require__.r = function(exports) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(exports, "__esModule", {
value: !0
});
}, __webpack_require__.t = function(value, mode) {
if (1 & mode && (value = __webpack_require__(value)), 8 & mode) return value;
if (4 & mode && "object" == typeof value && value && value.__esModule) return value;
var ns = Object.create(null);
if (__webpack_require__.r(ns), Object.defineProperty(ns, "default", {
enumerable: !0,
value: value
}), 2 & mode && "string" != typeof value) for (var key in value) __webpack_require__.d(ns, key, function(key) {
return value[key];
}.bind(null, key));
return ns;
}, __webpack_require__.n = function(module) {
var getter = module && module.__esModule ? function() {
return module.default;
} : function() {
return module;
};
return __webpack_require__.d(getter, "a", getter), getter;
}, __webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
}, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 265);
}([ function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, "storage", (function() {
return storage;
})), __webpack_require__.d(__webpack_exports__, "request", (function() {
return request;
})), __webpack_require__.d(__webpack_exports__, "settings", (function() {
return userscript_settings;
})), __webpack_require__.d(__webpack_exports__, "type", (function() {
return type;
}));
var userscriptLegacy = __webpack_require__(90), notifications = __webpack_require__(91), __awaiter = function(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))((function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : function(value) {
return value instanceof P ? value : new P((function(resolve) {
resolve(value);
}));
}(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
}));
};
const requestUserscriptLegacy = {
xhr(method, url) {
return __awaiter(this, void 0, void 0, (function*() {
return new Promise((resolve, reject) => {
const request = {
method: method,
url: url,
synchronous: !1,
headers: [],
data: null,
onload(response) {
console.log(response);
const responseObj = {
finalUrl: response.finalUrl,
responseText: response.responseText,
status: response.status
};
resolve(responseObj);
}
};
"object" == typeof url && (request.url = url.url, request.headers = url.headers,
request.data = url.data), GM_xmlhttpRequest(request);
});
}));
},
notification(options) {
var _a;
GM_notification({
title: options.title,
text: options.text,
image: null !== (_a = options.image) && void 0 !== _a ? _a : notifications.a,
timeout: options.sticky ? 0 : 10,
onclick: () => {
window.open(options.url, "_blank");
}
});
}
};
var settings = __webpack_require__(92);
const storage = userscriptLegacy.a, request = requestUserscriptLegacy, userscript_settings = settings.a, type = "userscript";
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__), function(j, api, con, utils) {
__webpack_require__.d(__webpack_exports__, "urlPart", (function() {
return urlPart;
})), __webpack_require__.d(__webpack_exports__, "urlStrip", (function() {
return urlStrip;
})), __webpack_require__.d(__webpack_exports__, "urlParam", (function() {
return urlParam;
})), __webpack_require__.d(__webpack_exports__, "getBaseText", (function() {
return getBaseText;
})), __webpack_require__.d(__webpack_exports__, "generateUniqueID", (function() {
return generateUniqueID;
})), __webpack_require__.d(__webpack_exports__, "favicon", (function() {
return favicon;
})), __webpack_require__.d(__webpack_exports__, "watching", (function() {
return watching;
})), __webpack_require__.d(__webpack_exports__, "planTo", (function() {
return planTo;
})), __webpack_require__.d(__webpack_exports__, "episode", (function() {
return episode;
})), __webpack_require__.d(__webpack_exports__, "syncRegex", (function() {
return syncRegex;
})), __webpack_require__.d(__webpack_exports__, "status", (function() {
return status;
})), __webpack_require__.d(__webpack_exports__, "getselect", (function() {
return getselect;
})), __webpack_require__.d(__webpack_exports__, "absoluteLink", (function() {
return absoluteLink;
})), __webpack_require__.d(__webpack_exports__, "parseHtml", (function() {
return parseHtml;
})), __webpack_require__.d(__webpack_exports__, "urlChangeDetect", (function() {
return urlChangeDetect;
})), __webpack_require__.d(__webpack_exports__, "fullUrlChangeDetect", (function() {
return fullUrlChangeDetect;
})), __webpack_require__.d(__webpack_exports__, "changeDetect", (function() {
return changeDetect;
})), __webpack_require__.d(__webpack_exports__, "waitUntilTrue", (function() {
return waitUntilTrue;
})), __webpack_require__.d(__webpack_exports__, "checkDoubleExecution", (function() {
return checkDoubleExecution;
})), __webpack_require__.d(__webpack_exports__, "getUrlFromTags", (function() {
return getUrlFromTags;
})), __webpack_require__.d(__webpack_exports__, "setUrlInTags", (function() {
return setUrlInTags;
})), __webpack_require__.d(__webpack_exports__, "setResumeWaching", (function() {
return setResumeWaching;
})), __webpack_require__.d(__webpack_exports__, "getResumeWaching", (function() {
return getResumeWaching;
})), __webpack_require__.d(__webpack_exports__, "setContinueWaching", (function() {
return setContinueWaching;
})), __webpack_require__.d(__webpack_exports__, "getContinueWaching", (function() {
return getContinueWaching;
})), __webpack_require__.d(__webpack_exports__, "setEntrySettings", (function() {
return setEntrySettings;
})), __webpack_require__.d(__webpack_exports__, "getEntrySettings", (function() {
return getEntrySettings;
})), __webpack_require__.d(__webpack_exports__, "handleMalImages", (function() {
return handleMalImages;
})), __webpack_require__.d(__webpack_exports__, "getMalToKissArray", (function() {
return getMalToKissArray;
})), __webpack_require__.d(__webpack_exports__, "getPageSearch", (function() {
return getPageSearch;
})), __webpack_require__.d(__webpack_exports__, "getMalToKissApi", (function() {
return getMalToKissApi;
})), __webpack_require__.d(__webpack_exports__, "getMalToKissFirebase", (function() {
return getMalToKissFirebase;
})), __webpack_require__.d(__webpack_exports__, "getTooltip", (function() {
return getTooltip;
})), __webpack_require__.d(__webpack_exports__, "timeDiffToText", (function() {
return timeDiffToText;
})), __webpack_require__.d(__webpack_exports__, "canHideTabs", (function() {
return canHideTabs;
})), __webpack_require__.d(__webpack_exports__, "statusTag", (function() {
return statusTag;
})), __webpack_require__.d(__webpack_exports__, "notifications", (function() {
return notifications;
})), __webpack_require__.d(__webpack_exports__, "timeCache", (function() {
return timeCache;
})), __webpack_require__.d(__webpack_exports__, "flashm", (function() {
return flashm;
})), __webpack_require__.d(__webpack_exports__, "flashConfirm", (function() {
return flashConfirm;
})), __webpack_require__.d(__webpack_exports__, "lazyload", (function() {
return lazyload;
})), __webpack_require__.d(__webpack_exports__, "elementInViewport", (function() {
return elementInViewport;
})), __webpack_require__.d(__webpack_exports__, "wait", (function() {
return wait;
})), __webpack_require__.d(__webpack_exports__, "pageUrl", (function() {
return pageUrl;
})), __webpack_require__.d(__webpack_exports__, "returnYYYYMMDD", (function() {
return returnYYYYMMDD;
}));
var _Cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12), __awaiter = function(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))((function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : function(value) {
return value instanceof P ? value : new P((function(resolve) {
resolve(value);
}));
}(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
}));
};
function urlPart(url, part) {
if (!url) return "";
const urlParts = url.split("/");
return urlParts[part] ? urlParts[part].replace(/[#?].*/, "") : "";
}
function urlStrip(url) {
return url.replace(/[#?].*/, "");
}
function urlParam(url, name) {
const results = new RegExp(`[?&]${name}=([^]*)`).exec(url);
return null === results ? null : decodeURI(results[1]) || 0;
}
function getBaseText(element) {
let text = element.text();
return element.children().each((function() {
text = text.replace(j.$(this).text(), "");
})), text;
}
function generateUniqueID(arraySize = 10) {
const array = new Uint32Array(arraySize);
return window.crypto.getRandomValues(array), Array.from(array, value => value.toString(16)).join("");
}
function favicon(domain) {
return -1 !== domain.indexOf("pahe.win") ? "https://www.google.com/s2/favicons?domain=animepahe.com" : "https://www.google.com/s2/favicons?domain=" + domain;
}
function watching(type) {
return "manga" === type ? "Reading" : "Watching";
}
function planTo(type) {
return "manga" === type ? "Plan to Read" : "Plan to Watch";
}
function episode(type) {
return "manga" === type ? api.storage.lang("UI_Chapter") : api.storage.lang("UI_Episode");
}
const syncRegex = /(^settings\/.*|^updateCheckTime$|^tempVersion$|^local:\/\/|^list-tagSettings$)/;
var status;
function getselect(data, name) {
let temp = data.split(`name="${name}"`)[1].split("")[0];
if (temp.indexOf('selected="selected"') > -1) {
temp = temp.split("