{
recommendationsHtml += '
',
recommendationsHtml += '
',
recommendationsHtml += j.$(value).find(".picSurround").html(), recommendationsHtml += "
",
recommendationsHtml += '
', recommendationsHtml += '
',
j.$(value).find(".button_edit, .button_add, td:eq(1) > div:eq(1) span").remove(),
recommendationsHtml += j.$(value).find("td:eq(1) > div:eq(1)").html(), recommendationsHtml += "
",
recommendationsHtml += '
', j.$(value).find('a[href^="/dbchanges.php?go=report"]').remove(),
recommendationsHtml += j.$(value).find(".borderClass").html(), recommendationsHtml += "
",
recommendationsHtml += '
', recommendationsHtml += void 0 !== j.$(value).find(".spaceit").html() ? j.$(value).find(".spaceit").html() : "",
recommendationsHtml += '
', recommendationsHtml += j.$(value).find("td:eq(1) > div").last().html(),
recommendationsHtml += "
", recommendationsHtml += "
", recommendationsHtml += "
",
recommendationsHtml += "
";
}), recommendationsHtml += "";
} catch (e) {
console.log("[iframeRecommendations] Error:", e);
}
return recommendationsHtml;
}
},
methods: {
lang: api.storage.lang
}
};
}).call(this, __webpack_require__(3), __webpack_require__(0));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(j, api, con) {
var cb, _provider_listFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14), _bookmarksItem_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
__webpack_exports__.a = {
components: {
bookmarksItem: _bookmarksItem_vue__WEBPACK_IMPORTED_MODULE_1__.a
},
data: function() {
return {
items: [],
loading: !0,
errorText: null,
cache: !1
};
},
props: {
listType: {
type: String,
default: "anime"
},
state: {
type: Number,
default: 1
}
},
mounted: function() {
this.load(), this.$parent.registerScroll("books", this.handleScroll);
},
activated: function() {
this.$nextTick(() => {
j.$(this.$el).closest("html").find("head").click();
});
},
deactivated: function() {
this.$parent.unregisterScroll("books");
},
watch: {
listType: function(type) {
this.load();
},
state: function(state) {
this.load();
}
},
methods: {
lang: api.storage.lang,
load: async function() {
this.loading = !0, this.cache = !0, this.errorText = null, cb = void 0;
var listProvider = await Object(_provider_listFactory__WEBPACK_IMPORTED_MODULE_0__.a)(this.state, this.listType), listError = e => {
con.error(e), this.errorText = listProvider.errorMessage(e), this.loading = !1;
};
listProvider.modes.cached = !0, listProvider.getCached().then(list => {
this.items = list;
}), 1 !== this.state && "1" !== this.state ? (listProvider.callbacks = {
continueCall: list => {
if (this.loading = !1, this.cache = !1, this.items = list, !listProvider.isDone()) return new Promise(resolve => {
cb = () => {
resolve();
};
});
}
}, listProvider.get().catch(listError)) : (listProvider.modes.sortAiring = !0, listProvider.get().then(list => {
this.loading = !1, this.cache = !1, this.items = list;
}).catch(listError));
},
handleScroll: function(pos) {
pos.pos + pos.elHeight + 1e3 > pos.height && void 0 !== cb && (this.loading = !0,
cb(), cb = void 0);
}
}
};
}).call(this, __webpack_require__(3), __webpack_require__(0), __webpack_require__(1));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(utils, api) {
__webpack_require__(9);
__webpack_exports__.a = {
data: function() {
return {
prediction: void 0,
resumeUrl: null,
continueUrl: null
};
},
props: {
item: {
type: Object
}
},
mounted: async function() {
if (void 0 === this.item.resume) {
var resumeUrl = null, continueUrl = null, type = (this.item.malId, this.item.type), resumeUrlObj = await utils.getResumeWaching(type, this.item.cacheKey), continueUrlObj = await utils.getContinueWaching(type, this.item.cacheKey), curEp = parseInt(this.item.watchedEp.toString());
void 0 !== continueUrlObj && continueUrlObj.ep === curEp + 1 ? continueUrl = continueUrlObj.url : void 0 !== resumeUrlObj && resumeUrlObj.ep === curEp && (resumeUrl = resumeUrlObj.url),
this.resumeUrl = resumeUrl, this.continueUrl = continueUrl;
}
void 0 === this.prediction && (this.setPrediction(), setInterval(() => {
this.setPrediction();
}, 6e4));
},
watch: {},
computed: {
imageHi: function() {
var imageHi = this.item.image, regexDimensions = /\/r\/\d*x\d*/g;
return regexDimensions.test(imageHi) && (imageHi = imageHi.replace(/v.jpg$/g, ".jpg").replace(regexDimensions, "")),
imageHi;
},
barTotal: function() {
return this.prediction && this.prediction.tagEpisode && !this.hasTotalEp ? this.prediction.tagEpisode > this.item.watchedEp ? Math.ceil(1.2 * this.prediction.tagEpisode) : Math.ceil(1.2 * this.item.watchedEp) : this.item.totalEp;
},
hasTotalEp: function() {
return 0 !== parseInt(this.item.totalEp);
},
progress: function() {
return "width: " + this.item.watchedEp / this.barTotal * 100 + "%; max-width: 100%;";
},
predictionBar: function() {
var predictionProgress = this.prediction.tagEpisode / this.barTotal * 100, color = "orange";
return "" !== this.prediction.color && (color = this.prediction.color), "width: " + predictionProgress + "%; background-color: " + color;
},
streamUrl: function() {
return utils.getUrlFromTags(this.item.tags);
},
preTexter: function() {
var pre = this.prediction.prediction, diffDays = pre.diffDays, diffHours = pre.diffHours, diffMinutes = pre.diffMinutes;
diffDays > 1 && diffHours > 12 && diffDays++;
var text = "";
return diffDays > 1 ? text + diffDays + " " + api.storage.lang("bookmarksItem_Days") : (1 === diffDays && (text += diffDays + " " + api.storage.lang("bookmarksItem_Day") + " "),
diffHours > 1 ? text + diffHours + " " + api.storage.lang("bookmarksItem_Hours") : (1 === diffHours && (text += diffHours + " " + api.storage.lang("bookmarksItem_Hour") + " "),
text + diffMinutes + " " + api.storage.lang("bookmarksItem_mins")));
}
},
methods: {
lang: api.storage.lang,
favicon: function(domain) {
return utils.favicon(domain);
},
assetUrl: function(asset) {
return api.storage.assetUrl(asset);
},
setPrediction: function() {
utils.epPredictionUI(this.item.malId, this.item.cacheKey, this.item.type, prediction => {
this.prediction = prediction;
});
}
}
};
}).call(this, __webpack_require__(2), __webpack_require__(0));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(api, con, utils) {
var interva, _provider_listFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
__webpack_exports__.a = {
data: function() {
return {
items: [],
history: []
};
},
props: {
listType: {
type: String,
default: "anime"
}
},
mounted: function() {
this.load(), interva = setInterval(() => {
this.load();
}, 5e3);
},
destroyed: function() {
clearInterval(interva);
},
watch: {
listType: function(type) {
this.load();
}
},
methods: {
lang: api.storage.lang,
load: async function() {
var listProvider = await Object(_provider_listFactory__WEBPACK_IMPORTED_MODULE_0__.a)(1, this.listType);
listProvider.get().then(async list => {
for (var i = 0; i < list.length; i++) {
var el = list[i], episode = "", error = "", trColor = "";
con.log("el", el);
var elCache = await api.storage.get("updateCheck/" + this.listType + "/" + el.cacheKey);
con.log("elCache", elCache), void 0 !== elCache && (episode = elCache.newestEp + "/" + el.totalEp,
trColor = "orange", elCache.finished && (error = "finished", trColor = "green"),
void 0 !== elCache.error && (error = elCache.error, trColor = "red")), el.episode = episode,
el.trColor = trColor, el.error = error;
}
this.items = list;
}).catch(e => {
con.error(e), listProvider.flashmError(e);
}), api.storage.get("notificationHistory").then(history => {
history.forEach(entry => {
var timeDiff = Date.now() - entry.timestamp;
timeDiff = utils.timeDiffToText(timeDiff), timeDiff += "ago", entry.timeDiff = timeDiff;
}), this.history = history.reverse();
});
},
deleteItem(item) {
var delPath = "updateCheck/" + this.listType + "/" + item.cacheKey;
con.log("delete", delPath, item), api.storage.remove(delPath), item.trColor = "black";
},
notificationTest() {
utils.notifications("https://malsync.lolamtisch.de/", "MyAnimeList-Sync", "by lolamtisch", "https://cdn.myanimelist.net/images/anime/5/65187.jpg");
},
startCheck() {
chrome.alarms.create("updateCheckNow", {
when: Date.now() + 1e3
}), utils.flashm("Check started");
}
}
};
}).call(this, __webpack_require__(0), __webpack_require__(1), __webpack_require__(2));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(api) {
var _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
__webpack_exports__.a = {
data: function() {
return {
listProvider: {
mal: {
text: "Init",
list: null,
master: !1
},
anilist: {
text: "Init",
list: null,
master: !1
},
kitsu: {
text: "Init",
list: null,
master: !1
},
simkl: {
text: "Init",
list: null,
master: !1
}
},
listReady: !1,
listLength: 0,
list: {},
missing: [],
isBackgroundEnabled: !1
};
},
props: {
listType: {
type: String,
default: "anime"
}
},
mounted: async function() {
_syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.a.isEnabled().then(state => {
this.isBackgroundEnabled = state;
});
var type = this.listType, providerList = _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.d({
mal: this.listProvider.mal,
anilist: this.listProvider.anilist,
kitsu: this.listProvider.kitsu,
simkl: this.listProvider.simkl
}), listOptions = await _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.f(providerList, type, api, _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.c);
_syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.b(listOptions.master, listOptions.slaves, "mirror", listOptions.typeArray, this.list, this.missing),
this.list = Object.assign({}, this.list), this.listReady = !0;
},
destroyed: function() {},
watch: {},
computed: {
listSyncLength: function() {
return Object.values(this.list).filter(el => el.diff).length;
}
},
methods: {
lang: api.storage.lang,
getType: _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.e,
apiType: function() {
return api.type;
},
getTypeColor: function(type) {
return "ANILIST" == type ? "border-left: 5px solid #02a9ff" : "KITSU" == type ? "border-left: 5px solid #f75239" : "SIMKL" == type ? "border-left: 5px solid #ffbf00" : "border-left: 5px solid #2e51a2";
},
syncList: async function() {
this.listReady = !1, this.listLength = this.listSyncLength, _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.g(this.list, this.missing);
},
backgroundClick: async function() {
await _syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.a.isEnabled() ? (_syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.a.disable(),
this.isBackgroundEnabled = !1) : (_syncHandler_ts__WEBPACK_IMPORTED_MODULE_0__.a.enable(),
this.isBackgroundEnabled = !0);
}
}
};
}).call(this, __webpack_require__(0));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(api, utils, con) {
var _provider_provider_ts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9), _provider_listFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
async function cleanTags(url) {
var entryClass = new _provider_provider_ts__WEBPACK_IMPORTED_MODULE_0__.a(url, !0, !0);
return entryClass.init().then(() => (entryClass.setStreamingUrl(""), entryClass.sync()));
}
function getList(type) {
var listProvider = Object(_provider_listFactory__WEBPACK_IMPORTED_MODULE_1__.c)(7, type);
return listProvider.get().then(list => list).catch(e => {
throw con.error(e), listProvider.errorMessage(e);
});
}
__webpack_exports__.a = {
data: function() {
return {
animeLoading: !1,
animelist: null,
animelistLength: null,
mangaLoading: !1,
mangalist: null,
mangalistLength: null
};
},
props: {},
mounted: async function() {},
destroyed: function() {},
watch: {},
computed: {},
methods: {
lang: api.storage.lang,
cleanTags: function() {
this.animeLoading = !0, getList("anime").then(async list => {
for (this.animelist = list, this.animelistLength = this.animelist.length; this.animelist.length; ) {
var anime = this.animelist.pop(), streamUrl = utils.getUrlFromTags(anime.tags);
void 0 !== streamUrl && (console.log(streamUrl), await cleanTags(anime.url));
}
}).then(() => getList("manga")).then(async list => {
for (this.mangalist = list, this.mangalistLength = this.mangalist.length; this.mangalist.length; ) {
var manga = this.mangalist.pop();
void 0 !== utils.getUrlFromTags(manga.tags) && await cleanTags(manga.url);
}
});
}
}
};
}).call(this, __webpack_require__(0), __webpack_require__(2), __webpack_require__(1));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(j, api) {
__webpack_require__(9);
__webpack_exports__.a = {
data: function() {
return {
xhr: ""
};
},
props: {
url: {
type: String,
default: ""
},
state: {
type: Boolean,
default: !1
}
},
updated: function() {
var minimal = j.$(this.$el);
minimal.find(".js-toggle-review-button").addClass("nojs").click((function() {
var revID = j.$(this).attr("data-id");
minimal.find("#review" + revID).css("display", "initial"), minimal.find("#revhelp_output_" + revID).remove(),
j.$(this).remove();
})), minimal.find(".mb8 a").addClass("nojs").click((function() {
var revID = j.$(this).attr("onclick").split("j.$('")[1].split("'")[0];
minimal.find(revID).toggle();
}));
},
watch: {
url: async function(url) {
this.xhr = "", this.state && api.request.xhr("GET", this.url + "/reviews").then(response => {
this.xhr = response.responseText;
});
},
state: async function(state) {
state && "" === this.xhr && api.request.xhr("GET", this.url + "/reviews").then(response => {
this.xhr = response.responseText;
});
}
},
computed: {
reviews: function() {
var html = "";
try {
var reviews = this.xhr.split("Reviews")[1].split("
")[0], reviewsData = j.$.parseHTML(reviews), reviewsHtml = "";
j.$.each(j.$(reviewsData).filter(".borderDark"), (index, value) => {
reviewsHtml += '',
reviewsHtml += '
',
j.$(value).find(".spaceit > div").css("max-width", "60%"), reviewsHtml += j.$(value).find(".spaceit").first().html(),
reviewsHtml += "
", reviewsHtml += '
',
j.$(value).find(".textReadability, .textReadability > span").contents().filter((function() {
return 3 === this.nodeType && j.$.trim(this.nodeValue).length;
})).wrap('
'), j.$(value).find("br").css("line-height", "10px"),
reviewsHtml += j.$(value).find(".textReadability").html(), reviewsHtml += "
",
reviewsHtml += "
";
}), html = reviewsHtml += "";
} catch (e) {
console.log("[iframeReview] Error:", e);
}
return html;
}
},
methods: {
lang: api.storage.lang
}
};
}).call(this, __webpack_require__(3), __webpack_require__(0));
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(api, utils, con) {
__webpack_exports__.a = {
data: () => ({
streamUrl: void 0,
continueUrl: null,
resumeUrl: null,
links: null,
pageSearch: null,
classes: {
minimized: !0,
search: !1
}
}),
created: function() {
var classes = JSON.parse(localStorage.getItem("SIMKL-MAL-SYNC"));
classes && (this.classes = classes);
},
watch: {
streamUrl: function(url, oldUrl) {
url && (this.classes.minimized = !0, this.classes.search = !1);
}
},
methods: {
lang: api.storage.lang,
favicon: utils.favicon,
assetUrl: api.storage.assetUrl,
getMal2KissFavicon: function(streams) {
try {
return utils.favicon(streams[Object.keys(streams)[0]].url.split("/")[2]);
} catch (e) {
return con.error(e), "";
}
},
toggleSearch: function() {
this.classes.search = !this.classes.search, this.saveClasses();
},
pressMinimized: function() {
null === this.links || Object.keys(this.links).length ? this.toggleMinimized() : this.toggleSearch(),
this.saveClasses();
},
toggleMinimized: function() {
this.classes.minimized = !this.classes.minimized, this.classes.search && this.classes.minimized && this.toggleSearch(),
this.saveClasses();
},
removeSource: function(key) {
api.settings.set(key, !1), this.$delete(this.links, key);
},
saveClasses: function() {
localStorage.setItem("SIMKL-MAL-SYNC", JSON.stringify(this.classes));
}
}
};
}).call(this, __webpack_require__(0), __webpack_require__(2), __webpack_require__(1));
}, function(module, exports, __webpack_require__) {
var result = __webpack_require__(297);
module.exports = "string" == typeof result ? result : result.toString();
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "a", (function() {
return simkl;
}));
const simkl = {
shortName: "Simkl",
score: "Simkl Score:",
noLogin: 'Please Authenticate Here'
};
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
(function(api, j, utils) {
__webpack_require__.d(__webpack_exports__, "a", (function() {
return metadata;
})), __webpack_require__.d(__webpack_exports__, "b", (function() {
return search;
}));
class metadata {
constructor(malUrl) {
return this.malUrl = malUrl, this.xhr = "", this;
}
init() {
return api.request.xhr("GET", this.malUrl).then(response => (this.xhr = response.responseText,
this));
}
getTitle() {
var title = "";
try {
title = this.xhr.split('itemprop="name">')[1].split("<")[0];
} catch (e) {
console.log("[iframeOverview] Error:", e);
}
return title;
}
getDescription() {
var description = "";
try {
description = this.xhr.split('itemprop="description">')[1].split("" + this.xhr.split("Alternative Titles
")[1].split("")[0] + "
");
altTitle = j.$(tempHtml).find(".spaceit_pad").toArray().map((function(i) {
return utils.getBaseText(j.$(i)).trim();
}));
} catch (e) {
console.log("[iframeOverview] Error:", e);
}
return altTitle;
}
getCharacters() {
var charArray = [];
try {
var characterBlock = this.xhr.split("detail-characters-list")[1].split("")[0], charHtml = j.$.parseHTML(' table"), (index, value) => {
index || 1;
var regexDimensions = /\/r\/\d*x\d*/g, charImg = j.$(value).find("img").first().attr("data-src");
charImg = regexDimensions.test(charImg) ? charImg.replace(regexDimensions, "") : api.storage.assetUrl("questionmark.gif"),
charImg = utils.handleMalImages(charImg), charArray.push({
img: charImg,
html: j.$(value).find(".borderClass .spaceit_pad").first().parent().html()
});
});
} catch (e) {
console.log("[iframeOverview] Error:", e);
}
return charArray;
}
getStatistics() {
var stats = [];
try {
var statsBlock = this.xhr.split("
Statistics
")[1].split("")[0], tempHtml = j.$.parseHTML(statsBlock);
j.$.each(j.$(tempHtml).filter("div").slice(0, 5), (function(index, value) {
var title = j.$(value).find(".dark_text").text(), body = null != j.$(value).find("span[itemprop=ratingValue]").height() ? j.$(value).find("span[itemprop=ratingValue]").text() : j.$(value).clone().children().remove().end().text();
stats.push({
title: title,
body: body.trim()
});
}));
} catch (e) {
console.log("[iframeOverview] Error:", e);
}
return stats;
}
getInfo() {
var html = [];
try {
var infoBlock = this.xhr.split("Information
")[1].split("")[0], infoData = j.$.parseHTML(infoBlock);
j.$.each(j.$(infoData).filter("div"), (index, value) => {
var title = j.$(value).find(".dark_text").text();
j.$(value).find(".dark_text").remove(), html.push({
title: title.trim(),
body: j.$(value).html().trim()
});
}), this.getExternalLinks(html);
} catch (e) {
console.log("[iframeOverview] Error:", e);
}
return html;
}
getExternalLinks(html) {
try {
var infoBlock = this.xhr.split("External Links
")[1].split("
")[0] + "