Timothy J. Warren
6c5dbe886b
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
1 line
33 KiB
Plaintext
1 line
33 KiB
Plaintext
{"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/sw.js","/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/anime-client.js","/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/events.js","/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/session-check.js","/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/template-helpers.js","/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/anime.js","/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/manga.js"],"sourcesContent":["// Start the service worker, if you can\nif ('serviceWorker' in navigator) {\n\tnavigator.serviceWorker.register('/sw.js').then(reg => {\n\t\tconsole.log('Service worker registered', reg.scope);\n\t}).catch(error => {\n\t\tconsole.error('Failed to register service worker', error);\n\t});\n}","// -------------------------------------------------------------------------\n// ! Base\n// -------------------------------------------------------------------------\n\nconst matches = (elm, selector) => {\n\tlet m = (elm.document || elm.ownerDocument).querySelectorAll(selector);\n\tlet i = matches.length;\n\twhile (--i >= 0 && m.item(i) !== elm) {};\n\treturn i > -1;\n}\n\nconst AnimeClient = {\n\t/**\n\t * Placeholder function\n\t */\n\tnoop: () => {},\n\t/**\n\t * DOM selector\n\t *\n\t * @param {string} selector - The dom selector string\n\t * @param {Element} [context]\n\t * @return array of dom elements\n\t */\n\t$(selector, context = null) {\n\t\tif (typeof selector !== 'string') {\n\t\t\treturn selector;\n\t\t}\n\n\t\tcontext = (context !== null && context.nodeType === 1)\n\t\t\t? context\n\t\t\t: document;\n\n\t\tlet elements = [];\n\t\tif (selector.match(/^#([\\w]+$)/)) {\n\t\t\telements.push(document.getElementById(selector.split('#')[1]));\n\t\t} else {\n\t\t\telements = [].slice.apply(context.querySelectorAll(selector));\n\t\t}\n\n\t\treturn elements;\n\t},\n\t/**\n\t * Does the selector exist on the current page?\n\t *\n\t * @param {string} selector\n\t * @returns {boolean}\n\t */\n\thasElement (selector) {\n\t\treturn AnimeClient.$(selector).length > 0;\n\t},\n\t/**\n\t * Scroll to the top of the Page\n\t *\n\t * @return {void}\n\t */\n\tscrollToTop () {\n\t\tconst el = AnimeClient.$('header')[0];\n\t\tel.scrollIntoView(true);\n\t},\n\t/**\n\t * Hide the selected element\n\t *\n\t * @param {string|Element|Element[]} sel - the selector of the element to hide\n\t * @return {void}\n\t */\n\thide (sel) {\n\t\tif (typeof sel === 'string') {\n\t\t\tsel = AnimeClient.$(sel);\n\t\t}\n\n\t\tif (Array.isArray(sel)) {\n\t\t\tsel.forEach(el => el.setAttribute('hidden', 'hidden'));\n\t\t} else {\n\t\t\tsel.setAttribute('hidden', 'hidden');\n\t\t}\n\t},\n\t/**\n\t * UnHide the selected element\n\t *\n\t * @param {string|Element|Element[]} sel - the selector of the element to hide\n\t * @return {void}\n\t */\n\tshow (sel) {\n\t\tif (typeof sel === 'string') {\n\t\t\tsel = AnimeClient.$(sel);\n\t\t}\n\n\t\tif (Array.isArray(sel)) {\n\t\t\tsel.forEach(el => el.removeAttribute('hidden'));\n\t\t} else {\n\t\t\tsel.removeAttribute('hidden');\n\t\t}\n\t},\n\t/**\n\t * Display a message box\n\t *\n\t * @param {string} type - message type: info, error, success\n\t * @param {string} message - the message itself\n\t * @return {void}\n\t */\n\tshowMessage (type, message) {\n\t\tlet template =\n\t\t\t`<div class='message ${type}'>\n\t\t\t\t<span class='icon'></span>\n\t\t\t\t${message}\n\t\t\t\t<span class='close'></span>\n\t\t\t</div>`;\n\n\t\tlet sel = AnimeClient.$('.message');\n\t\tif (sel[0] !== undefined) {\n\t\t\tsel[0].remove();\n\t\t}\n\n\t\tAnimeClient.$('header')[0].insertAdjacentHTML('beforeend', template);\n\t},\n\t/**\n\t * Finds the closest parent element matching the passed selector\n\t *\n\t * @param {Element} current - the current Element\n\t * @param {string} parentSelector - selector for the parent element\n\t * @return {Element|null} - the parent element\n\t */\n\tclosestParent (current, parentSelector) {\n\t\tif (Element.prototype.closest !== undefined) {\n\t\t\treturn current.closest(parentSelector);\n\t\t}\n\n\t\twhile (current !== document.documentElement) {\n\t\t\tif (matches(current, parentSelector)) {\n\t\t\t\treturn current;\n\t\t\t}\n\n\t\t\tcurrent = current.parentElement;\n\t\t}\n\n\t\treturn null;\n\t},\n\t/**\n\t * Generate a full url from a relative path\n\t *\n\t * @param {string} path - url path\n\t * @return {string} - full url\n\t */\n\turl (path) {\n\t\tlet uri = `//${document.location.host}`;\n\t\turi += (path.charAt(0) === '/') ? path : `/${path}`;\n\n\t\treturn uri;\n\t},\n\t/**\n\t * Throttle execution of a function\n\t *\n\t * @see https://remysharp.com/2010/07/21/throttling-function-calls\n\t * @see https://jsfiddle.net/jonathansampson/m7G64/\n\t * @param {Number} interval - the minimum throttle time in ms\n\t * @param {Function} fn - the function to throttle\n\t * @param {Object} [scope] - the 'this' object for the function\n\t * @return {Function}\n\t */\n\tthrottle (interval, fn, scope) {\n\t\tlet wait = false;\n\t\treturn function (...args) {\n\t\t\tconst context = scope || this;\n\n\t\t\tif ( ! wait) {\n\t\t\t\tfn.apply(context, args);\n\t\t\t\twait = true;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\twait = false;\n\t\t\t\t}, interval);\n\t\t\t}\n\t\t};\n\t},\n};\n\n// -------------------------------------------------------------------------\n// ! Events\n// -------------------------------------------------------------------------\n\nfunction addEvent(sel, event, listener) {\n\t// Recurse!\n\tif (! event.match(/^([\\w\\-]+)$/)) {\n\t\tevent.split(' ').forEach((evt) => {\n\t\t\taddEvent(sel, evt, listener);\n\t\t});\n\t}\n\n\tsel.addEventListener(event, listener, false);\n}\n\nfunction delegateEvent(sel, target, event, listener) {\n\t// Attach the listener to the parent\n\taddEvent(sel, event, (e) => {\n\t\t// Get live version of the target selector\n\t\tAnimeClient.$(target, sel).forEach((element) => {\n\t\t\tif(e.target == element) {\n\t\t\t\tlistener.call(element, e);\n\t\t\t\te.stopPropagation();\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Add an event listener\n *\n * @param {string|Element} sel - the parent selector to bind to\n * @param {string} event - event name(s) to bind\n * @param {string|Element|function} target - the element to directly bind the event to\n * @param {function} [listener] - event listener callback\n * @return {void}\n */\nAnimeClient.on = (sel, event, target, listener) => {\n\tif (listener === undefined) {\n\t\tlistener = target;\n\t\tAnimeClient.$(sel).forEach((el) => {\n\t\t\taddEvent(el, event, listener);\n\t\t});\n\t} else {\n\t\tAnimeClient.$(sel).forEach((el) => {\n\t\t\tdelegateEvent(el, target, event, listener);\n\t\t});\n\t}\n};\n\n// -------------------------------------------------------------------------\n// ! Ajax\n// -------------------------------------------------------------------------\n\n/**\n * Url encoding for non-get requests\n *\n * @param data\n * @returns {string}\n * @private\n */\nfunction ajaxSerialize(data) {\n\tlet pairs = [];\n\n\tObject.keys(data).forEach((name) => {\n\t\tlet value = data[name].toString();\n\n\t\tname = encodeURIComponent(name);\n\t\tvalue = encodeURIComponent(value);\n\n\t\tpairs.push(`${name}=${value}`);\n\t});\n\n\treturn pairs.join('&');\n}\n\n/**\n * Make an ajax request\n *\n * Config:{\n * \tdata: // data to send with the request\n * \ttype: // http verb of the request, defaults to GET\n * \tsuccess: // success callback\n * \terror: // error callback\n * }\n *\n * @param {string} url - the url to request\n * @param {Object} config - the configuration object\n * @return {XMLHttpRequest}\n */\nAnimeClient.ajax = (url, config) => {\n\t// Set some sane defaults\n\tconst defaultConfig = {\n\t\tdata: {},\n\t\ttype: 'GET',\n\t\tdataType: '',\n\t\tsuccess: AnimeClient.noop,\n\t\tmimeType: 'application/x-www-form-urlencoded',\n\t\terror: AnimeClient.noop\n\t}\n\n\tconfig = {\n\t\t...defaultConfig,\n\t\t...config,\n\t}\n\n\tlet request = new XMLHttpRequest();\n\tlet method = String(config.type).toUpperCase();\n\n\tif (method === 'GET') {\n\t\turl += (url.match(/\\?/))\n\t\t\t? ajaxSerialize(config.data)\n\t\t\t: `?${ajaxSerialize(config.data)}`;\n\t}\n\n\trequest.open(method, url);\n\n\trequest.onreadystatechange = () => {\n\t\tif (request.readyState === 4) {\n\t\t\tlet responseText = '';\n\n\t\t\tif (request.responseType === 'json') {\n\t\t\t\tresponseText = JSON.parse(request.responseText);\n\t\t\t} else {\n\t\t\t\tresponseText = request.responseText;\n\t\t\t}\n\n\t\t\tif (request.status > 299) {\n\t\t\t\tconfig.error.call(null, request.status, responseText, request.response);\n\t\t\t} else {\n\t\t\t\tconfig.success.call(null, responseText, request.status);\n\t\t\t}\n\t\t}\n\t};\n\n\tif (config.dataType === 'json') {\n\t\tconfig.data = JSON.stringify(config.data);\n\t\tconfig.mimeType = 'application/json';\n\t} else {\n\t\tconfig.data = ajaxSerialize(config.data);\n\t}\n\n\trequest.setRequestHeader('Content-Type', config.mimeType);\n\n\tif (method === 'GET') {\n\t\trequest.send(null);\n\t} else {\n\t\trequest.send(config.data);\n\t}\n\n\treturn request\n};\n\n/**\n * Do a get request\n *\n * @param {string} url\n * @param {object|function} data\n * @param {function} [callback]\n * @return {XMLHttpRequest}\n */\nAnimeClient.get = (url, data, callback = null) => {\n\tif (callback === null) {\n\t\tcallback = data;\n\t\tdata = {};\n\t}\n\n\treturn AnimeClient.ajax(url, {\n\t\tdata,\n\t\tsuccess: callback\n\t});\n};\n\n// -------------------------------------------------------------------------\n// Export\n// -------------------------------------------------------------------------\n\nexport default AnimeClient;","import _ from './anime-client.js';\n\n// ----------------------------------------------------------------------------\n// Event subscriptions\n// ----------------------------------------------------------------------------\n_.on('header', 'click', '.message', hide);\n_.on('form.js-delete', 'submit', confirmDelete);\n_.on('.js-clear-cache', 'click', clearAPICache);\n_.on('.vertical-tabs input', 'change', scrollToSection);\n_.on('.media-filter', 'input', filterMedia);\n\n// ----------------------------------------------------------------------------\n// Handler functions\n// ----------------------------------------------------------------------------\n\n/**\n * Hide the html element attached to the event\n *\n * @param {MouseEvent} event\n * @return void\n */\nfunction hide (event) {\n\t_.hide(event.target)\n}\n\n/**\n * Confirm deletion of an item\n *\n * @param {MouseEvent} event\n * @return void\n */\nfunction confirmDelete (event) {\n\tconst proceed = confirm('Are you ABSOLUTELY SURE you want to delete this item?');\n\n\tif (proceed === false) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t}\n}\n\n/**\n * Clear the API cache, and show a message if the cache is cleared\n *\n * @return void\n */\nfunction clearAPICache () {\n\t_.get('/cache_purge', () => {\n\t\t_.showMessage('success', 'Successfully purged api cache');\n\t});\n}\n\n/**\n * Scroll to the accordion/vertical tab section just opened\n *\n * @param {InputEvent} event\n * @return void\n */\nfunction scrollToSection (event) {\n\tconst el = event.currentTarget.parentElement;\n\tconst rect = el.getBoundingClientRect();\n\n\tconst top = rect.top + window.pageYOffset;\n\n\twindow.scrollTo({\n\t\ttop,\n\t\tbehavior: 'smooth',\n\t});\n}\n\n/**\n * Filter an anime or manga list\n *\n * @param {InputEvent} event\n * @return void\n */\nfunction filterMedia (event) {\n\tconst rawFilter = event.target.value;\n\tconst filter = new RegExp(rawFilter, 'i');\n\n\t// console.log('Filtering items by: ', filter);\n\n\tif (rawFilter !== '') {\n\t\t// Filter the cover view\n\t\t_.$('article.media').forEach(article => {\n\t\t\tconst titleLink = _.$('.name a', article)[0];\n\t\t\tconst title = String(titleLink.textContent).trim();\n\t\t\tif ( ! filter.test(title)) {\n\t\t\t\t_.hide(article);\n\t\t\t} else {\n\t\t\t\t_.show(article);\n\t\t\t}\n\t\t});\n\n\t\t// Filter the list view\n\t\t_.$('table.media-wrap tbody tr').forEach(tr => {\n\t\t\tconst titleCell = _.$('td.align-left', tr)[0];\n\t\t\tconst titleLink = _.$('a', titleCell)[0];\n\t\t\tconst linkTitle = String(titleLink.textContent).trim();\n\t\t\tconst textTitle = String(titleCell.textContent).trim();\n\t\t\tif ( ! (filter.test(linkTitle) || filter.test(textTitle))) {\n\t\t\t\t_.hide(tr);\n\t\t\t} else {\n\t\t\t\t_.show(tr);\n\t\t\t}\n\t\t});\n\t} else {\n\t\t_.show('article.media');\n\t\t_.show('table.media-wrap tbody tr');\n\t}\n}\n","import _ from './anime-client.js';\n\n(() => {\n\tlet hidden = null;\n\tlet visibilityChange = null;\n\n\tif (typeof document.hidden !== \"undefined\") {\n\t\thidden = \"hidden\";\n\t\tvisibilityChange = \"visibilitychange\";\n\t} else if (typeof document.msHidden !== \"undefined\") {\n\t\thidden = \"msHidden\";\n\t\tvisibilityChange = \"msvisibilitychange\";\n\t} else if (typeof document.webkitHidden !== \"undefined\") {\n\t\thidden = \"webkitHidden\";\n\t\tvisibilityChange = \"webkitvisibilitychange\";\n\t}\n\n\tfunction handleVisibilityChange() {\n\t\t// Check the user's session to see if they are currently logged-in\n\t\t// when the page becomes visible\n\t\tif ( ! document[hidden]) {\n\t\t\t_.get('/heartbeat', (beat) => {\n\t\t\t\tconst status = JSON.parse(beat)\n\n\t\t\t\t// If the session is expired, immediately reload so that\n\t\t\t\t// you can't attempt to do an action that requires authentication\n\t\t\t\tif (status.hasAuth !== true) {\n\t\t\t\t\tdocument.removeEventListener(visibilityChange, handleVisibilityChange, false);\n\t\t\t\t\tlocation.reload();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tif (hidden === null) {\n\t\tconsole.info('Page visibility API not supported, JS session check will not work');\n\t} else {\n\t\tdocument.addEventListener(visibilityChange, handleVisibilityChange, false);\n\t}\n})();","import _ from './anime-client.js';\n\n// Click on hidden MAL checkbox so\n// that MAL id is passed\n_.on('main', 'change', '.big-check', (e) => {\n\tconst id = e.target.id;\n\tdocument.getElementById(`mal_${id}`).checked = true;\n});\n\n/**\n * On search results with an existing library entry, this shows that fact, with an edit link for the existing\n * library entry\n *\n * @param {'anime'|'manga'} type\n * @param {Object} item\n * @returns {String}\n */\nfunction renderEditLink (type, item) {\n\tif (item.libraryEntry === null) {\n\t\treturn '';\n\t}\n\n\treturn `\n\t\t<div class=\"row\">\n\t\t\t<span class=\"edit\"><big>[ Already in List ]</big></span>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<span class=\"edit\">\n\t\t\t\t<a class=\"bracketed\" href=\"/${type}/edit/${item.libraryEntry.id}/${item.libraryEntry.status}\">Edit</a>\n\t\t\t</span>\n\t\t</div>\n\t\t<div class=\"row\"><span class=\"edit\"> </span></div>\n\t`\n}\n\n/**\n * Show the search results for a media item\n *\n * @param {'anime'|'manga'} type\n * @param {Object} data\n * @returns {String}\n */\nexport function renderSearchResults (type, data) {\n\treturn data.map(item => {\n\t\tconst titles = item.titles.join('<br />');\n\t\tconst disabled = item.libraryEntry !== null ? 'disabled' : '';\n\t\tconst editLink = renderEditLink(type, item);\n\n\t\treturn `\n\t\t\t<article class=\"media search ${disabled}\">\n\t\t\t\t<div class=\"name\">\n\t\t\t\t\t<input type=\"radio\" class=\"mal-check\" id=\"mal_${item.slug}\" name=\"mal_id\" value=\"${item.mal_id}\" ${disabled} />\n\t\t\t\t\t<input type=\"radio\" class=\"big-check\" id=\"${item.slug}\" name=\"id\" value=\"${item.id}\" ${disabled} />\n\t\t\t\t\t<label for=\"${item.slug}\">\n\t\t\t\t\t\t<picture width=\"220\">\n\t\t\t\t\t\t\t<source srcset=\"/public/images/${type}/${item.id}.webp\" type=\"image/webp\" />\n\t\t\t\t\t\t\t<source srcset=\"/public/images/${type}/${item.id}.jpg\" type=\"image/jpeg\" />\n\t\t\t\t\t\t\t<img src=\"/public/images/${type}/${item.id}.jpg\" alt=\"\" width=\"220\" />\n\t\t\t\t\t\t</picture>\n\t\t\t\t\t\t<span class=\"name\">\n\t\t\t\t\t\t\t${item.canonicalTitle}<br />\n\t\t\t\t\t\t\t<small>${titles}</small>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"table\">\n\t\t\t\t\t${editLink}\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<span class=\"edit\">\n\t\t\t\t\t\t\t<a class=\"bracketed\" href=\"/${type}/details/${item.slug}\">Info Page</a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</article>\n\t\t`;\n\t}).join('');\n}","import _ from './anime-client.js'\nimport { renderSearchResults } from './template-helpers.js'\n\nconst search = (query) => {\n\t// Show the loader\n\t_.show('.cssload-loader');\n\n\t// Do the api search\n\treturn _.get(_.url('/anime-collection/search'), { query }, (searchResults, status) => {\n\t\tsearchResults = JSON.parse(searchResults);\n\n\t\t// Hide the loader\n\t\t_.hide('.cssload-loader');\n\n\t\t// Show the results\n\t\t_.$('#series-list')[ 0 ].innerHTML = renderSearchResults('anime', searchResults);\n\t});\n};\n\nif (_.hasElement('.anime #search')) {\n\tlet prevRequest = null;\n\n\t_.on('#search', 'input', _.throttle(250, (e) => {\n\t\tconst query = encodeURIComponent(e.target.value);\n\t\tif (query === '') {\n\t\t\treturn;\n\t\t}\n\n\t\tif (prevRequest !== null) {\n\t\t\tprevRequest.abort();\n\t\t}\n\n\t\tprevRequest = search(query);\n\t}));\n}\n\n// Action to increment episode count\n_.on('body.anime.list', 'click', '.plus-one', (e) => {\n\tlet parentSel = _.closestParent(e.target, 'article');\n\tlet watchedCount = parseInt(_.$('.completed_number', parentSel)[ 0 ].textContent, 10) || 0;\n\tlet totalCount = parseInt(_.$('.total_number', parentSel)[ 0 ].textContent, 10);\n\tlet title = _.$('.name a', parentSel)[ 0 ].textContent;\n\n\t// Setup the update data\n\tlet data = {\n\t\tid: parentSel.dataset.kitsuId,\n\t\tmal_id: parentSel.dataset.malId,\n\t\tdata: {\n\t\t\tprogress: watchedCount + 1\n\t\t}\n\t};\n\n\t// If the episode count is 0, and incremented,\n\t// change status to currently watching\n\tif (isNaN(watchedCount) || watchedCount === 0) {\n\t\tdata.data.status = 'CURRENT';\n\t}\n\n\t// If you increment at the last episode, mark as completed\n\tif ((!isNaN(watchedCount)) && (watchedCount + 1) === totalCount) {\n\t\tdata.data.status = 'COMPLETED';\n\t}\n\n\t_.show('#loading-shadow');\n\n\t// okay, lets actually make some changes!\n\t_.ajax(_.url('/anime/increment'), {\n\t\tdata,\n\t\tdataType: 'json',\n\t\ttype: 'POST',\n\t\tsuccess: (res) => {\n\t\t\tconst resData = JSON.parse(res);\n\n\t\t\tif (resData.error) {\n\t\t\t\t_.hide('#loading-shadow');\n\t\t\t\t_.showMessage('error', `Failed to update ${title}. `);\n\t\t\t\t_.scrollToTop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (resData.data.libraryEntry.update.libraryEntry.status === 'COMPLETED') {\n\t\t\t\t_.hide(parentSel);\n\t\t\t}\n\n\t\t\t_.hide('#loading-shadow');\n\n\t\t\t_.showMessage('success', `Successfully updated ${title}`);\n\t\t\t_.$('.completed_number', parentSel)[ 0 ].textContent = ++watchedCount;\n\t\t\t_.scrollToTop();\n\t\t},\n\t\terror: () => {\n\t\t\t_.hide('#loading-shadow');\n\t\t\t_.showMessage('error', `Failed to update ${title}. `);\n\t\t\t_.scrollToTop();\n\t\t}\n\t});\n});","import _ from './anime-client.js'\nimport { renderSearchResults } from './template-helpers.js'\n\nconst search = (query) => {\n\t_.show('.cssload-loader');\n\treturn _.get(_.url('/manga/search'), { query }, (searchResults, status) => {\n\t\tsearchResults = JSON.parse(searchResults);\n\t\t_.hide('.cssload-loader');\n\t\t_.$('#series-list')[ 0 ].innerHTML = renderSearchResults('manga', searchResults);\n\t});\n};\n\nif (_.hasElement('.manga #search')) {\n\tlet prevRequest = null\n\n\t_.on('#search', 'input', _.throttle(250, (e) => {\n\t\tlet query = encodeURIComponent(e.target.value);\n\t\tif (query === '') {\n\t\t\treturn;\n\t\t}\n\n\t\tif (prevRequest !== null) {\n\t\t\tprevRequest.abort();\n\t\t}\n\n\t\tprevRequest = search(query);\n\t}));\n}\n\n/**\n * Javascript for editing manga, if logged in\n */\n_.on('.manga.list', 'click', '.edit-buttons button', (e) => {\n\tlet thisSel = e.target;\n\tlet parentSel = _.closestParent(e.target, 'article');\n\tlet type = thisSel.classList.contains('plus-one-chapter') ? 'chapter' : 'volume';\n\tlet completed = parseInt(_.$(`.${type}s_read`, parentSel)[ 0 ].textContent, 10) || 0;\n\tlet total = parseInt(_.$(`.${type}_count`, parentSel)[ 0 ].textContent, 10);\n\tlet mangaName = _.$('.name', parentSel)[ 0 ].textContent;\n\n\tif (isNaN(completed)) {\n\t\tcompleted = 0;\n\t}\n\n\t// Setup the update data\n\tlet data = {\n\t\tid: parentSel.dataset.kitsuId,\n\t\tmal_id: parentSel.dataset.malId,\n\t\tdata: {\n\t\t\tprogress: completed\n\t\t}\n\t};\n\n\t// If the episode count is 0, and incremented,\n\t// change status to currently reading\n\tif (isNaN(completed) || completed === 0) {\n\t\tdata.data.status = 'CURRENT';\n\t}\n\n\t// If you increment at the last chapter, mark as completed\n\tif ((!isNaN(completed)) && (completed + 1) === total) {\n\t\tdata.data.status = 'COMPLETED';\n\t}\n\n\t// Update the total count\n\tdata.data.progress = ++completed;\n\n\t_.show('#loading-shadow');\n\n\t_.ajax(_.url('/manga/increment'), {\n\t\tdata,\n\t\tdataType: 'json',\n\t\ttype: 'POST',\n\t\tmimeType: 'application/json',\n\t\tsuccess: (res) => {\n\t\t\tconst resData = JSON.parse(res)\n\t\t\tif (resData.error) {\n\t\t\t\t_.hide('#loading-shadow');\n\t\t\t\t_.showMessage('error', `Failed to update ${mangaName}. `);\n\t\t\t\t_.scrollToTop();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (String(data.data.status).toUpperCase() === 'COMPLETED') {\n\t\t\t\t_.hide(parentSel);\n\t\t\t}\n\n\t\t\t_.hide('#loading-shadow');\n\n\t\t\t_.$(`.${type}s_read`, parentSel)[ 0 ].textContent = String(completed);\n\t\t\t_.showMessage('success', `Successfully updated ${mangaName}`);\n\t\t\t_.scrollToTop();\n\t\t},\n\t\terror: () => {\n\t\t\t_.hide('#loading-shadow');\n\t\t\t_.showMessage('error', `Failed to update ${mangaName}`);\n\t\t\t_.scrollToTop();\n\t\t}\n\t});\n});"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