// ==UserScript== // @name Automail // @namespace http://tampermonkey.net/ // @version 9.99.81 // @description Extra parts for Anilist.co // @description:nn-NO Ekstradelar for Anilist.co // @author hoh // @match https://anilist.co/* // @grant GM_xmlhttpRequest // @license GPL-3.0-or-later // @downloadURL none // ==/UserScript== // SPDX-FileCopyrightText: 2019-2021 hoh and the Automail contributors // // SPDX-License-Identifier: GPL-3.0-or-later (function(){ "use strict"; const scriptInfo = { "version" : "9.99.81", "name" : "Automail", "link" : "https://greasyfork.org/en/scripts/370473-automail", "repo" : "https://github.com/hohMiyazawa/Automail", "firefox" : "https://addons.mozilla.org/en-US/firefox/addon/automail/ (outdated)", "chrome" : "NO KNOWN BUILDS", "author" : "hoh", "authorLink" : "https://anilist.co/user/hoh/", "license" : "GPL-3.0-or-later" }; /* A collection of enhancements for Anilist.co */ /* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . */ /* "useScripts" contains the defaults for the various modules. This is stored in the user's localStorage. Many of the modules are closely tied to the Anilist API Other than that, some data loaded from MyAnimelist is the only external resource Optionally, a user may give the script privileges through the Anilist grant system, enabling some additional modules */ /* GENERAL STRUCTURE: 1. Settings 2. CSS 3. tools and helper functions 4. The old modules, as individual callable functions 5. The URL matcher, for making the modules run at the right sites 6. Old module descriptions 7. The new modules */ //begin "settings.js" //this is not the code for the settings page! See /src/modules/settingsPage.js for that try{ localStorage.setItem("test","test"); localStorage.removeItem("test"); } catch(e){ console.log("LocalStorage, required for saving settings, is not available. Automail may not work correctly.") } const notificationColourDefaults = { "ACTIVITY_LIKE": {"colour":"rgb(250,122,122)","supress":false}, "ACTIVITY_REPLY_LIKE": {"colour":"rgb(250,122,122)","supress":false}, "THREAD_COMMENT_LIKE": {"colour":"rgb(250,122,122)","supress":false}, "THREAD_LIKE": {"colour":"rgb(250,122,122)","supress":false}, "THREAD_COMMENT_REPLY": {"colour":"rgb(61,180,242)", "supress":false}, "ACTIVITY_REPLY": {"colour":"rgb(61,180,242)", "supress":false}, "ACTIVITY_MESSAGE": {"colour":"rgb(123,213,85)", "supress":false}, "FOLLOWING": {"colour":"rgb(123,213,85)", "supress":false}, "ACTIVITY_MENTION": {"colour":"rgb(123,213,85)", "supress":false}, "THREAD_COMMENT_MENTION": {"colour":"rgb(123,213,85)", "supress":false}, "THREAD_SUBSCRIBED": {"colour":"rgb(247,191,99)", "supress":false}, "ACTIVITY_REPLY_SUBSCRIBED": {"colour":"rgb(247,191,99)", "supress":false}, "RELATED_MEDIA_ADDITION": {"colour":"rgb(247,191,99)", "supress":false}, "MEDIA_DATA_CHANGE": {"colour":"rgb(247,191,99)", "supress":false}, "MEDIA_MERGE": {"colour":"rgb(247,191,99)", "supress":false}, "MEDIA_DELETION": {"colour":"rgb(247,191,99)", "supress":false}, "AIRING": {"colour":"rgb(247,191,99)", "supress":false} }; //this is the legacy way of specifying default modules, use exportModule's isDefault instead. let useScripts = { socialTab: true, socialTabFeed: true, forumMedia: true, staffPages: true, completedScore: true, droppedScore: false, studioFavouriteCount: true, CSSfavs: true, CSScompactBrowse: true, CSSgreenManga: true, CSSfollowCounter: true, CSSprofileClutter: false, CSSdecimalPoint: false, CSSverticalNav: false, CSSbannerShadow: true, CSSdarkDropdown: true, hideLikes: false, dubMarker: false, CSSsmileyScore: true, feedCommentFilter: false, feedCommentComments: 0, feedCommentLikes: 0, colourPicker: false, colourSettings: [], progressBar: false, noRewatches: false, hideCustomTags: false, titlecaseRomaji: false, shortRomaji: false, replaceNativeTags: true, draw3x3: true, newChapters: true, limitProgress8: false, limitProgress10: false, tagIndex: true, expandRight: false, timeToCompleteColumn: false, mangaGuess: true, settingsTip: true, MALscore: false, MALserial: false, MALrecs: false, entryScore: true, showRecVotes: true, activityTimeline: true, browseFilters: true, embedHentai: false, comparissionPage: true, noImagePolyfill: false, reviewConfidence: true, blockWord: false, showMarkdown: true, myThreads: false, dismissDot: true, statusBorder: false, moreImports: true, plussMinus: true, milestones: false, allStudios: false, termsFeedNoImages: false, customCSS: false, rightToLeft: false, subTitleInfo: false, customCSSValue: "", pinned: "", negativeCustomList: false, globalCustomList: false, betterListPreview: false, homeScroll: true, blockWordValue: "nsfw", hideGlobalFeed: false, cleanSocial: false, SFWmode: false, hideAWC: false, hideOtherThreads: false, forumPreviewNumber: 3, profileBackground: true, profileBackgroundValue: "inherit", viewAdvancedScores: true, betterReviewRatings: true, notificationColours: notificationColourDefaults, staffRoleOrder: "alphabetical", titleLanguage: "ROMAJI", dubMarkerLanguage: "English", accessToken: "", automailAPI: false, comparisionColourFilter: true, comparisionSystemFilter: false, annoyingAnimations: true, navbarDroptext: true, browseSubmenu: false, reinaDarkEnable: false, customDefaultListOrder: "", softBlock: [], partialLocalisationLanguage: "English" }; let userObject = JSON.parse(localStorage.getItem("auth")); let whoAmI = ""; let whoAmIid = 0; try{//use later for some scripts whoAmI = document.querySelector(".nav .links .link[href^='/user/']").href.match(/\/user\/(.*)\//)[1]//looks at the navbar } catch(err){ if(userObject){ whoAmI = userObject.name } else{ console.warn("could not get username") } } if(userObject && (userObject.donatorTier > 0 && (new Date()).valueOf() > (new Date('2020-09-01T03:24:00')).valueOf()) && userObject.name !== "hoh" && !userObject.moderatorStatus){ alert("Sorry, Automail does not work for donators") return } if(document.hohTypeScriptRunning){ console.warn("Duplicate script detected. Please make sure you don't have more than one instance of Automail or similar installed"); return } document.hohTypeScriptRunning = "Automail" let forceRebuildFlag = false; useScripts.save = function(){ localStorage.setItem("hohSettings",JSON.stringify(useScripts)) }; const useScriptsSettings = JSON.parse(localStorage.getItem("hohSettings")); if(useScriptsSettings){ let keys = Object.keys(useScriptsSettings); keys.forEach(//this is to keep the default settings if the version in local storage is outdated key => useScripts[key] = useScriptsSettings[key] ) } if(userObject){ useScripts.titleLanguage = userObject.options.titleLanguage; whoAmIid = userObject.id } useScripts.save(); //end "settings.js" //begin "alias.js" const moreStyle = create("style"); moreStyle.id = "conditional-automail-styles"; moreStyle.type = "text/css"; let createAlias = function(alias){ if(alias[0] === "css/"){ moreStyle.textContent += alias[1] } else{ const dataSelect = `[href^="${alias[0]}"]`; const targetName = alias[1].substring(0,Math.min(100,alias[1].length)); moreStyle.textContent += ` .title > a${dataSelect} ,a.title${dataSelect} ,.overlay > a.title${dataSelect} ,.media-preview-card a.title${dataSelect} ,.quick-search-results .el-select-dropdown__item a${dataSelect}> span ,.media-embed${dataSelect} .title ,.status > a.title${dataSelect} ,.role-card a.content${dataSelect} > .name{ visibility: hidden; line-height: 0px; } .results.media a.title${dataSelect} ,.home .status > a.title${dataSelect}{ font-size: 2%; } a.title${dataSelect}::before ,.quick-search-results .el-select-dropdown__item a${dataSelect} > span::before ,.role-card a.content${dataSelect} > .name::before ,.home .status > a.title${dataSelect}::before ,.media-embed${dataSelect} .title::before ,.overlay > a.title${dataSelect}::before ,.media-preview-card a.title${dataSelect}::before ,.title > a${dataSelect}::before{ content:"${targetName}"; visibility: visible; }`; } } const shortRomaji = (useScripts.titlecaseRomaji ? [ ["/anime/1535/","Death Note"], ["/anime/11061/","Hunter×Hunter (2011)"], ["/anime/20/","Naruto"], ["/anime/1735/","Naruto: Shippuuden"], ["/anime/21/","One Piece"], ["/anime/2167/","Clannad"], ["/anime/4059/","Clannad: Mou Hitotsu no Sekai, Tomoyo-hen"], ["/anime/6351/","Clannad: After Story - Mou Hitotsu no Sekai, Kyou-hen"], ["/anime/4181/","Clannad: After Story"], ["/anime/105333/","Dr. Stone"], ["/anime/6702/","Fairy Tail"], ["/anime/8074/","Highschool of the Dead"], ["/anime/9515/","Highschool of the Dead - Drifters of the Dead"], ["/anime/10793/","Guilty Crown"], ["/anime/13411/","Guilty Crown: Lost Christmas"], ["/anime/13561/","Guilty Crown: 4-koma Gekijou"], ["/anime/12419/","Guilty Crown Kiseki: Reassortment"], ["/anime/13601/","Psycho-Pass"], ["/anime/20513/","Psycho-Pass 2"], ["/anime/100388/","Banana Fish"], ["/anime/107660/","Beastars"], ["/anime/114194/","Beastars 2"], ["/anime/136880/","Beastars 3"], ["/anime/19/","Monster"], ["/anime/32/","Shin Seiki Evangelion: The End of Evangelion"], ["/anime/97980/","Re:Creators"], ["/anime/889/","Black Lagoon"], ["/anime/110349/","Great Pretender"], ["/anime/20812/","Shirobako"], ["/anime/20938/","Shirobako Specials"], ["/anime/101574/","Shirobako Movie"], ["/anime/16870/","The Last: Naruto the Movie"], ["/anime/21123/","Drifters"], ["/anime/97988/","Drifters OVA"], ["/anime/20607/","Ping Pong the Animation"], ["/anime/110350/","ID: Invaded"], ["/anime/140960/","Spy×Family"], ["/manga/30124/","Aqua"], ["/manga/30081/","Aria"], ["/anime/477/","Aria the Animation"], ["/anime/962/","Aria the Natural"], ["/anime/5244/","Aria the Natural: Sono Futatabi Deaeru Kiseki ni..."], ["/anime/2563/","Aria the OVA: Arietta"], ["/anime/3297/","Aria the Origination"], ["/anime/5196/","Aria the Origination Picture Drama"], ["/anime/4772/","Aria the Origination: Sono Choppiri Himitsu no Basho ni..."], ["/anime/21043/","Aria the Avvenire"], ["/anime/117556/","Aria the Crepuscolo"], ["/anime/130558/","Aria the Benedizione"], ["/anime/320/","Kite"], ["/anime/47/","Akira"], ["/manga/30001/","Monster"], ["/manga/30011/","Naruto"], ["/manga/30012/","Bleach"], ["/manga/30013/","One Piece"], ["/manga/30021/","Death Note"], ["/manga/30026/","Hunter×Hunter"], ["/manga/30149/","Blame!"], ["/manga/30598/","Fairy Tail"], ["/manga/30664/","Akira"], ["/manga/30745/","Pluto"], ["/manga/98587/","Beastars"], ["/manga/98416/","Dr. Stone"], ["/manga/108556/","Spy×Family"], ["/manga/114960/","Mashle"], ["/manga/85603/","Psycho-Pass"] ] : []).concat( (useScripts.shortRomaji ? [ ["/anime/30/","Evangelion"], ["/anime/32/","End of Evangelion"], ["/anime/33/","Berserk"], ["/anime/44/","Rurouni Kenshin: Tsuioku-hen"], ["/anime/45/","Rurouni Kenshin"], ["/anime/400/","Outlaw Star"], ["/anime/513/","Laputa"], ["/anime/528/","Mewtwo no Gyakushuu"], ["/anime/530/","Sailor Moon"], ["/anime/532/","Sailor Moon S"], ["/anime/572/","Nausicaä"], ["/anime/740/","Sailor Moon R"], ["/anime/849/","Haruhi"], ["/anime/996/","Sailor Moon Sailor Stars"], ["/anime/949/","Gunbuster!"], ["/anime/1089/","Macross: Ai Oboete Imasu ka"], ["/anime/1239/","Sailor Moon SuperS"], ["/anime/1575/","Code Geass"], ["/anime/2001/","Gurren Lagann"], ["/anime/2025/","Darker than BLACK"], ["/anime/2904/","Code Geass R2"], ["/anime/4382/","Haruhi (2009)"], ["/anime/5114/","Fullmetal Alchemist: Brotherhood"], ["/anime/8074/","HIGHSCHOOL OF THE DEAD"], ["/anime/8769/","OreImo"], ["/anime/8795/","Panty & Stocking"], ["/anime/9756/","Madoka★Magica"], ["/anime/9989/","AnoHana"], ["/anime/10020/","OreImo Specials"], ["/anime/10620/","Mirai Nikki"], ["/anime/13659/","OreImo 2"], ["/anime/14741/","Chuunibyou!"], ["/anime/14813/","OreGairu"], ["/anime/20698/","OreGairu 2"], ["/anime/108489/","OreGairu 3"], ["/anime/16592/","Danganronpa"], ["/anime/16742/","WataMote"], ["/anime/17074/","Monogatari Second Season"], ["/anime/18671/","Chuunibyou! 2"], ["/anime/18677/","Yuushibu"], ["/anime/18857/","OreImo 2 Specials"], ["/anime/19221/","NouKome"], ["/anime/19603/","Unlimited Blade Works"], ["/anime/20474/","JoJo: Stardust Crusaders"], ["/anime/20799/","JoJo: Stardust Crusaders 2"], ["/anime/21450/","JoJo: Diamond wa Kudakenai"], ["/anime/102883/","JoJo: Ougon no Kaze"], ["/anime/131942/","JoJo: Stone Ocean"], ["/anime/20623/","Kiseijuu"], ["/anime/20792/","Unlimited Blade Works 2"], ["/anime/20910/","Shimoseka"], ["/anime/20920/","Danmachi"], ["/anime/21202/","Konosuba!"], ["/anime/21355/","Re:Zero"], ["/anime/108632/","Re:Zero 2"], ["/anime/119661/","Re:Zero 2 part 2"], ["/anime/21574/","Konosuba!: Kono Subarashii Choker ni Shufuku wo!"], ["/anime/21699/","Konosuba! 2"], ["/anime/20791/","Heaven’s Feel I. presage flower"], ["/anime/21718/","Heaven’s Feel II. lost butterfly"], ["/anime/21719/","Heaven’s Feel III. spring song"], ["/anime/21860/","Sukasuka"], ["/anime/97907/","Death March"], ["/anime/97938/","Boruto"], ["/anime/100182/","SAO: Alicization"], ["/anime/100183/","Gun Gale Online"], ["/anime/101166/","Danmachi: Orion no Ya"], ["/anime/101291/","Bunny Girl-senpai"], ["/anime/101921/","Kaguya-sama wa Kokurasetai"], ["/anime/104157/","Bunny Girl-senpai Movie"], ["/anime/105156/","Shinchou Yuusha"], ["/anime/108465/","Mushoku Tensei"], ["/anime/127720/","Mushoku Tensei 2"], ["/anime/108759/","SAO: War of Underworld"], ["/anime/114308/","SAO: War of Underworld 2"], ["/anime/112301/","Maou Gakuin no Futekigousha"], ["/anime/130588/","Maou Gakuin no Futekigousha 2"], ["/anime/130590/","Maou Gakuin no Futekigousha 2 part 2"], ["/anime/112641/","Kaguya-sama wa Kokurasetai 2"], ["/manga/86635/","Kaguya-sama wa Kokurasetai"], ["/manga/31517/","JoJo: Phantom Blood"], ["/manga/31630/","JoJo: Sentou Chouryuu"], ["/manga/30872/","JoJo: Stardust Crusaders"], ["/manga/33006/","JoJo: Diamond wa Kudakenai"], ["/manga/33008/","JoJo: Ougon no Kaze"], ["/manga/33009/","JoJo: Stone Ocean"], ["/manga/31706/","JoJo: Steel Ball Run"], ["/manga/55515/","JoJo: JoJolion"] ] : []) ); //end "alias.js" //a shared style node for all the modules. Most custom classes are prefixed by "hoh" to avoid collisions with native Anilist classes let style = document.createElement("style"); style.id = "automail-styles"; style.type = "text/css"; //The default colour is rgb(var(--color-blue)) provided by Anilist, but rgb(var(--color-green)) is preferred for things related to manga style.textContent = ` body{ margin: 0px; } .markdown img{ image-orientation: from-image;/*useful fix, but not universally supported*/ } #hohSettings{ margin-top: 20px; display: none; } .apps + #hohSettings{ display: inline; } #hohSettings textarea, #hohSettings input, #hohSettings select, .hohNativeInput{ color: inherit; background-color: rgb(var(--color-foreground-grey)); border-width: 1px; padding: 3px; border-radius: 3px; } .hohTime{ position: absolute; right: 12px; top: 6px; font-size: 1.1rem; } .hohUnread{ border-right: 8px; border-color: rgba(var(--color-blue)); border-right-style: solid; } .hohNotification{ margin-bottom: 10px; background: rgb(var(--color-foreground)); border-radius: 4px; justify-content: space-between; line-height: 0; min-height: 72px; position: relative; } .hohNotification *{ line-height: 1.15; } .hohUserImageSmall{ display: inline-block; background-position: 50%; background-repeat: no-repeat; background-size: cover; position: absolute; z-index: 10; } .hohUserImage{ height: 72px; width: 72px; display: inline-block; background-position: 50%; background-repeat: no-repeat; background-size: cover; position: absolute; } .hohMediaImage{ height: 70px; } .hohMessageText{ position: absolute; margin-top: 30px; margin-left: 80px; } .hohMediaImageContainer{ vertical-align: bottom; margin-left: 400px; display: inline; position: relative; display: inline-block; min-height: 70px; width: calc(100% - 500px); text-align: right; padding-bottom: 1px; } .hohMediaImageContainer > a{ height: 70px; line-height: 0!important; display: inline-block; z-index: 11; width: 50px; margin-right: 5px; background: rgb(var(--color-background),0.8); margin-top: 1px; margin-bottom: 1px; } span.hohMediaImageContainer{ line-height: 0!important; } .hohBackgroundCover{ height: 70px; width: 50px; display: inline-block; background-repeat: no-repeat; object-fit: cover; object-position: center; background-position: 50%; background-size: cover; line-height: 0; } .hohCommentsContainer{ margin-top: 5px; } .hohCommentsArea{ margin: 10px; display: none; padding-bottom: 2px; margin-top: 5px; width: 95%; } .hohCommentsContainer > a.link{ font-size: 1.3rem; } .hohComments{ float: right; display: none; margin-top: -21px; margin-right: 10px; cursor: pointer; margin-left: 600px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .hohCombined .hohComments{ display: none!important; } .hohQuickCom{ padding: 5px; background-color: rgb(var(--color-background)); margin-bottom: 5px; position: relative; } .hohQuickComName{ margin-right: 15px; color: rgb(var(--color-blue)); } .hohThisIsMe{ color: rgb(var(--color-green)); } .hohILikeThis{ color: rgb(var(--color-red)); } .hohQuickComName::after{ content: ":"; } .hohQuickComContent{ margin-right: 40px; display: block; } .hohQuickComContent > p{ margin: 1px; } .hohQuickComLikes{ position: absolute; right: 5px; bottom: 5px; display: inline-block; } .hohQuickComContent img { max-width: 100%; } .hohSpoiler::before{ color: rgb(var(--color-blue)); cursor: pointer; background: rgb(var(--color-background)); border-radius: 3px; content: "Spoiler, click to view"; font-size: 1.3rem; padding: 0 5px; } .hohSpoiler.hohClicked::before{ display: none; } .hohSpoiler > span{ display: none; } .hohMessageText > span > div.time{ display: none; } .hohUnhandledSpecial > div{ margin-top: -15px; } .hohMessageText a.link, .hohNewMedia a{ color: rgb(var(--color-blue)); } .hohNewMedia a[href^="/manga/"]{ color: rgb(var(--color-green)); } .hohDataChange a{ color: rgb(var(--color-blue)); } .hohDataChange .expand-reason{ display: none; } .hohMonospace{ font-family: monospace; } .hohCode{ font-family: monospace; background: rgb(var(--color-background)); overflow-x: scroll; padding: 2px; } .hohStatsTrigger{ cursor: pointer; border-radius: 3px; color: rgb(var(--color-text-lighter)); display: block; font-size: 1.4rem; margin-bottom: 8px; margin-left: -10px; padding: 5px 10px; font-weight: 700; } .hohActive{ background: rgba(var(--color-foreground),.8); color: rgb(var(--color-text)); font-weight: 500; } #hohFavCount{ position: absolute; right: 30px; color: rgba(var(--color-red)); top: 10px; font-weight: 400; } .hohSlidePlayer{ display: block; position: relative; width: 500px; } .hohSlide{ position: absolute; top: 0px; font-size: 500%; height: 100%; display: flex; align-items: center; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; opacity: 0.5; } .hohSlide:hover{ background-color: rgb(0,0,0,0.4); cursor: pointer; opacity: 1; } .hohRightSlide{ right: 0px; padding-left: 10px; padding-right: 20px; } .hohLeftSlide{ left: 0px; padding-left: 20px; padding-right: 10px; } .hohShare{ position: absolute; right: 12px; top: 30px; cursor: pointer; color: rgb(var(--color-blue-dim)); } .activity-entry{ position: relative; } .activity-entry.activity-text{ border-right-width: 0px!important; } .hohEmbed{ border-style: solid; border-color: rgb(var(--color-text)); border-width: 1px; padding: 15px; position: relative; } .hohEmbed .avatar{ border-radius: 3px; height: 40px; width: 40px; background-position: 50%; background-repeat: no-repeat; background-size: cover; display: inline-block; } .hohEmbed .name{ display: inline-block; height: 40px; line-height: 40px; vertical-align: top; color: rgb(var(--color-blue)); font-size: 1.4rem; margin-left: 12px !important; } .hohEmbed .time{ color: rgb(var(--color-text-lighter)); font-size: 1.1rem; position: absolute; right: 12px; top: 12px; } #hoh-character-roles .view-media-character{ grid-template-areas: "media character"; } #hoh-character-roles .view-media-character .media{ grid-area: media; } .hohRecsLabel{ color: rgb(var(--color-blue)) !important; } .hohRecsItem{ margin-top: 5px; margin-bottom: 10px; } .hohTaglessLinkException{ display: block; } .hohTaglessLinkException::after{ content: ""!important; } .hohStatValue{ color: rgb(var(--color-blue)); } .user-page-unscoped .markdown-editor{ width: 100%; } .markdown-editor > [title="Image"], .markdown-editor > [title="Youtube Video"], .markdown-editor > [title="WebM Video"]{ color: rgba(var(--color-red)); } .markdown-editor > [title="Link"]{ color: rgba(var(--color-blue)); } [slug="Sakasama-no-Patema"] .cover-wrap-inner .cover:hover{ transform: rotate(180deg); } [slug="Sakasama-no-Patema"] .cover-wrap-inner .cover{ transition: .2s; } .hohBackgroundUserCover{ height: 50px; width: 50px; display: inline-block; object-position: center; object-fit: cover; margin-top: 11px; margin-bottom: 1px; } .hohRegularTag{ border-style: solid; border-width: 1px; border-radius: 3px; padding: 2px; margin-right: 3px; } .hohTableHider{ cursor: pointer; margin: 4px; color: rgb(var(--color-blue)); } .hohCross{ cursor: pointer; margin-left: 2px; color: red; } .hohColourPicker{ position: absolute; right: 60px; margin-top: 0px; } .hohColourPicker h2{ color: #3db4f2; font-size: 1.6rem; font-weight: 400; padding-bottom: 12px; } .hohSecondaryRow{ background-color: rgb(var(--color-background)); } .hohSecondaryRow:hover{ background-color: rgb(var(--color-foreground)); } .hohSecondaryRow svg.repeat{ margin-left: 15px; } .media-preview-card meter{ width: 150px; margin-bottom: 5px; } .sidebar .tags .tag{ min-height: 35px; margin-bottom: 5px !important; } .custom-lists .el-checkbox__label{ display: inline !important; white-space: pre-wrap; white-space: -webkit-pre-wrap; white-space: normal; word-wrap: anywhere; word-break: break-word; } .hohStatusDot{ position: absolute; width: 10px; height: 10px; border-radius: 50px; } .hohStatusDotRight{ top: 2px; right: 2px; } .relations.hohRelationStatusDots .hohStatusDot{ position: relative; transform: translate(-5px,-5px); } .relations.hohRelationStatusDots > div.grid-wrap{ padding-top: 5px; padding-left: 5px; } .relations.hohRelationStatusDots > h2{ margin-bottom: 5px; } .recommendation-card .cover{ overflow: visible; } .recommendation-card .hohStatusDot{ transform: translate(-5px,-5px); } .studio .container.header{ position: relative; } .studio .favourite{ position: absolute; top: 10px; right: 30px; } .filter .view-all{ background-color: rgb(var(--color-foreground)); height: 32px; border-radius: 3px; text-align: center; padding-top: 8px; } .title > a{ line-height: 1.15!important; } .embed .title{ line-height: 18px!important; } #dubNotice{ font-size: 12px; font-weight: 500; text-align: center; text-transform: capitalize; background: rgb(var(--color-foreground)); margin-top: 0em; margin-bottom: 16px; border-radius: 3px; padding: 8px 12px; } .media-manga #dubNotice{ display: none; } #hohDraw3x3{ margin-top: 5px; cursor: pointer; } .hohFeedFilter{ position: absolute; top: 2px; font-size: 1.4rem; font-weight: 500; } .hohFeedFilter input{ width: 45px; background: none; border: none; margin-left: 6px; color: rgb(var(--color-text)); } .hohFeedFilter input::-webkit-outer-spin-button, .hohFeedFilter input::-webkit-inner-spin-button{ opacity: 1; } [list="staffRoles"]::-webkit-calendar-picker-indicator{ display: none; } [list="staffRoles"]{ background: rgb(var(--color-foreground)); background: rgb(var(--color-foreground)); padding: 5px; border-width: 0px; border-radius: 2px; margin-left: 20px; color: rgb(var(--color-text)); } .hohFeedFilter button{ color: rgb(var(--color-text)); cursor: pointer; background: none; border: none; margin-left: 10px; } .hohFeedFilter button:hover{ color: rgb(var(--color-blue)); } .noselect{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .actions .list .add{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .text div.markdown{ scrollbar-width: thin; } .user .about > div.content-wrap{ scrollbar-width: thin; } .list-wrap .section-name, .quick-search input[placeholder="Search AniList"]{ text-transform: none; } .list-wrap{ counter-reset: animeCounter; } .results.studios{ counter-reset: studioCounter; } .results.studios .studio > .name::before{ counter-increment: studioCounter; content: counter(studioCounter); opacity: 0.2; font-size: 70%; margin-left: -12px; margin-right: 3px; } .medialist.table.compact .entry .title::before{ counter-increment: animeCounter; content: counter(animeCounter); display: inline-block; margin-right: 4px; margin-left: -17px; opacity: 0.2; text-align: right; width: 25px; min-width: 25px; font-size: 70%; } .hohEnumerateStaff{ position: absolute; margin-left: -12px; margin-top: 10px; } #hohMALscore .type, #hohMALserialization .type{ font-size: 1.3rem; font-weight: 500; padding-bottom: 5px; display: inline-block; } #app .tooltip{ z-index: 9923; } #hohMALscore .value, #hohMALserialization .value{ color: rgb(var(--color-text-lighter)); font-size: 1.2rem; line-height: 1.3; display: block; } .hohMediaScore{ color: rgb(var(--color-text-lighter)); font-size: 1.2rem; position: absolute; top: -10px; padding-left: 10px; padding-right: 10px; margin-left: -10px; } .forum-thread .like .button{ margin-right: 0px!important; } .forum-thread .actions{ user-select: none; } #hohFilters{ margin-top: 5px; margin-bottom: 5px; } #hohFilters input{ width: 55px; margin: 5px; } .hohCompare{ margin-top: 10px; counter-reset: animeCounterComp; position: relative; overflow-x: scroll; } .hohCompare .hohUserRow, .hohCompare .hohHeaderRow{ background: rgb(var(--color-foreground)); } .hohCompare table, .hohCompare th, .hohCompare td{ border-top-width: 0px; border-bottom-width: 1px; border-right-width: 1px; border-left-width: 0px; border-style: solid; border-color: black; padding: 5px; } .hohCompare table{ background: rgb(var(--color-foreground-grey)); border-spacing: 0px; margin-top: 10px; border-right: none; border-bottom: none; } #graphiql{ --color-blue: 61,180,242; } .list-stats{ margin-bottom: 0px!important; } .activity-feed-wrap, .activity-feed-wrap + div{ margin-top: 25px; } .hohUserRow td, .hohUserRow th{ min-width: 120px; border-top-width: 1px; position: sticky; top: 3px; z-index: 1000; background: rgb(var(--color-foreground)); } .hohHeaderRow td, .hohHeaderRow th{ border-top: none; } .hohUserRow input{ width: 100px; } .hohUserRow img{ width: 30px; height: 30px; border-radius: 2px; } tr.hohAnimeTable:nth-child(2n+1){ background-color: rgb(var(--color-foreground)); } .hohAnimeTable, .hohAnimeTable td{ position: relative; } .hohAnimeTable .hohStatusDot{ top: calc(50% - 5px); right: 5px; } .hohHeaderRow .hohStatusDot{ background: rgb(var(--color-background)); top: calc(50% - 5px); right: 5px; cursor: pointer; } .hohStatusProgress{ position: absolute; left: 60px; top: calc(50% - 5px); font-size: 60%; } .hohAnimeTable > td:nth-child(1)::before{ counter-increment: animeCounterComp; content: counter(animeCounterComp) ". "; position: absolute; left: 1px; text-align: right; width: 40px; color: rgb(var(--color-blue)); } .hohAnimeTable > td:nth-child(1){ padding-left: 43px; border-left-width: 1px; } .hohUserRow > td:nth-child(1), .hohHeaderRow > th:nth-child(1){ border-left: solid; border-left-width: 1px; border-color: black; } .hohArrowSort{ font-size: 3rem; cursor: pointer; margin-left: 4px; margin-right: 4px; } .hohFilterSort{ cursor: pointer; border-width: 1px; border-style: solid; padding: 2px; border-radius: 4px; } .hohArrowSort:hover, .hohFilterSort:hover{ color: rgb(var(--color-blue)); } .hohAnimeTableRemove{ cursor: pointer; position: absolute; top: 0px; right: 0px; } .hohCheckbox.el-checkbox__input > span.el-checkbox__inner{ background-color: rgb(var(--color-foreground)); margin-right:10px; border-color: rgba(var(--color-text),.2); } .hohCheckbox input:checked + .el-checkbox__inner{ background-color: #409eff; border-color: #409eff; } .hohCheckbox input:checked + .el-checkbox__inner::after{ transform: rotate(45deg) scaleY(1); } .hohCheckbox input{ display: none; } .hohCheckbox{ margin-left: 2px; } .hohCheckbox .el-checkbox__inner::after { box-sizing: content-box; content: ""; border: 1px solid #fff; border-left: 0; border-top: 0; height: 7px; left: 4px; position: absolute; top: 1px; transform: rotate(45deg) scaleY(0); width: 3px; transition: transform .15s ease-in .05s; transform-origin: center; } .hohCheckbox .el-checkbox__inner { display: inline-block; position: relative; border: 1px solid #dcdfe6; border-radius: 2px; box-sizing: border-box; width: 14px; height: 14px; z-index: 1; transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46); } .hohCheckbox.el-checkbox__input{ white-space: nowrap; cursor: pointer; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .media-card .list-status[status="Repeating"]{ background: violet; } .sense-wrap{ display: none; } .hohDismiss{ cursor: pointer; transform: translate(20px,-11px); width: 10px; height: 5px; margin-left: -10px; } .substitution .media-roles:not(.substitution){ display: none; } .substitution .character-roles{ max-width: 1520px; } .hohButton{ align-items: center; background: #3db4f2; border-radius: 4px; color: rgb(var(--color-text-bright)); cursor: pointer; display: inline-flex; font-size: 1.3rem; margin-right: 10px; margin-top: 15px; padding: 10px 15px; transition: .2s; border-width: 0px; } .user-social .title::before{ font-size: 1.6rem; } textarea{ background: rgb(var(--color-foreground)); } select{ background: rgb(var(--color-foreground)); padding: 5px; border-radius: 4px; border-width: 0px; margin: 4px; color: rgb(var(--color-text)); } .hohPostLink{ position: absolute; top: 50px; } .hohRec{ position: relative; background: rgb(var(--color-foreground)); padding: 10px; border-radius: 3px; margin-bottom: 15px; } .hohBlock{ padding: 4px; border-width: 1px; border-style: solid; border-radius: 5px; margin: 2px; } .hohBlockSpec{ padding-right: 15px; } .hohBlockCross{ padding: 5px; color: red; cursor: pointer; } .medialist .filters .filter-group:first-child > span{ position: relative; } .medialist .filters .filter-group:first-child > span .count{ position: absolute; right: 0px; } .categories .category{ text-transform: none; white-space: nowrap; } .media-preview-card.hohFallback{ position: relative; } .media-preview-card .hohFallback{ position: absolute; top: 5px; left: 5px; word-break: break-word; overflow-y: hidden; max-height: 110px; max-width: 75px; } .media-preview-card .cover{ z-index: 3; } .hohChangeScore{ font-family: monospace; cursor: pointer; display: none; } .score[score="0"] .hohChangeScore, .medialist .score[score="0"]{ pointer-events: none; } .score[score="0"] .hohChangeScore{ display: none!important; } .row:hover .hohChangeScore, .hohMediaScore:hover .hohChangeScore{ display: inline; } .activity-text .name[href="/user/Dunkan85/"]::after{ /*https://upload.wikimedia.org/wikipedia/commons/e/e4/Twitter_Verified_Badge.svg*/ background-image: url('data:image/svg+xml;utf8,'); background-size: 12px; display: inline-block; width: 12px; height: 12px; content: ""; margin-left: 5px; } .hohSummableStatusContainer{ float: right; } .hohSummableStatus{ width: 16px; height: 16px; text-align: center; vertical-align: middle; border-radius: 16px; line-height: 16px; color: black; font-size: 10px; display: inline-block; margin-left: 2px; cursor: pointer; } .relations.small > div{ margin-left: 5px; } .hohMyThreads{ color: rgb(var(--color-text-lighter)); padding: 5px 10px; font-size: 1.4rem; display: inline-block; padding-bottom: 20px; } .hohImport .el-checkbox__label{ padding-left: 0px; } .hohImportEntry{ width: 30%; display: inline-block; background-color: rgb(var(--color-foreground)); padding: 5px; margin: 5px; border-radius: 2px; } .hohImportSelect{ display: inline-table; width: 80%; padding: 5px; } .hohImportArrow{ font-size: 40px; } .hohImportRow{ margin: 10px; display: flex; align-items: center; } .results.characters + .hohThemeSwitch, .results.staff + .hohThemeSwitch{ display: none; } .hohThemeSwitch{ align-items: center; background: rgb(var(--color-foreground)); border-radius: 4px; display: flex; justify-content: space-between; padding: 10px 13px; width: 100px; } .hohThemeSwitch .active{ color: rgb(var(--color-blue)); } .hohThemeSwitch > span{ cursor: pointer; } .studio .hohThemeSwitch{ position: absolute; left: calc(50% - 65px); width: 130px; top: 120px; } .user-social.listView .user-follow .wrap, .user-social.listView .hohSocialContent.user-follow{ display: block!important; } .user-social.listView .user-follow .user{ height: 50px; width: 50px; margin: 5px; overflow: visible; border-top-right-radius: 0px; border-bottom-right-radius: 0px; } .user-social.listView .user-follow .follow-card .name{ width: 250px; margin-left: 80px !important; opacity: 1; padding-bottom: 35px; } .user-social.listView .user-follow .follow-card{ margin: 2px; } .user-social.listView .user-follow .follow-card div.avatar{ overflow: visible!important; } .user-social.listView .thread-card .body-preview, .user-social.listView .thread-card .footer{ display: none; } .user-social.listView .thread-card .title{ margin-bottom: 0px; } .user-social.listView .thread-card{ margin-bottom: 10px; } .user-social.listView .user-comments .header{ display: none; } .user-social.listView .comment-wrap{ margin-bottom: 5px; } .hohDownload{ position: absolute; right: 10px; top: 305px; font-weight: bolder; font-size: 120%; } .media .hohDownload{ top: 375px; } meter::-webkit-meter-optimum-value{ background: rgb(var(--color-blue)); } meter::-moz-meter-bar{ background: rgb(var(--color-blue)); } .input-wrap.manga input[placeholder="Status"], .input-wrap.anime input[placeholder="Status"], .input-wrap.anime .form.score input{ width: 220px; } .substitution .role-card{ background: rgb(var(--color-foreground)); border-radius: 3px; display: inline-grid; grid-template-columns: 50% 50%; height: 80px; overflow: hidden; } .substitution .media-roles .role-card{ grid-template-columns: 100%; } .substitution .role-card > div{ display: inline-grid; grid-template-columns: 60px auto; grid-template-areas: "image content"; } .substitution .cover{ background-position: 50%; background-repeat: no-repeat; background-size: cover; grid-area: image; } .substitution .grid-wrap .content{ font-size: 1.2rem; grid-area: content; overflow: hidden; padding: 10px; position: relative; } .substitution .grid-wrap .content .name{ display: block; height: 48px; line-height: 1.3; } .substitution .grid-wrap{ display: grid; grid-column-gap: 30px; grid-row-gap: 15px; grid-template-columns: repeat(2,1fr); } .substitution .role{ color: rgb(var(--color-text-lighter)); font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; } .user-follow .follow-card{ background-color: rgb(var(--color-foreground)); } .recent-recommendations .switch .option{ white-space: nowrap; } .media-staff .role-card .role:hover, .media-roles.substitution .role-card .role:hover{ overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; } .media-staff .role-card .role:hover::-webkit-scrollbar, .media-roles.substitution .role-card .role:hover::-webkit-scrollbar{ width: 0; height: 0; } .substitution .container{ max-width: 1420px; } .tagIndex p{ cursor: pointer; line-break: anywhere; } .tagIndex p:hover{ cursor: pointer; color: rgb(var(--color-blue)); } .tagIndex .count{ font-size: small; float: right; opacity: 0.5; } .hohTable .row{ display: grid; grid-template-columns: 40% repeat(auto-fill, 120px); padding: 5px; cursor: pointer; } .hohTable .row:nth-child(odd){ background: rgba(var(--color-background-300), 0.5); } .hohTable .row.good{ grid-template-columns: 40% repeat(auto-fill, 150px); } .hohTable .row > div{ grid-row: 1; } .hohTable{ padding: 20px; background: rgb(var(--color-foreground)); } .hohTable .count{ display: inline-block; min-width: 20px; font-size: 70%; } .hohTable .hohSummableStatusContainer{ margin-right: 8px; } .hohTable .header.row{ background: rgb(var(--color-background)); } #regularAnimeTable, #regularMangaTable, #animeStaff, #animeStudios, #mangaStaff{ display: none!important; } .user[type="anime"][page="tags"]:not(.hohSpecialPage) #regularAnimeTable, .user[type="manga"][page="tags"]:not(.hohSpecialPage) #regularMangaTable, .user[type="anime"][page="staff"]:not(.hohSpecialPage) #animeStaff, .user[type="anime"][page="studios"]:not(.hohSpecialPage) #animeStudios, .user[type="manga"][page="staff"]:not(.hohSpecialPage) #mangaStaff{ display: block!important; } .user[type="anime"][page="tags"] .increase-stats::after, .user[type="manga"][page="tags"] .increase-stats::after, .user[type="anime"][page="staff"] .increase-stats::after, .user[type="anime"][page="studios"] .increase-stats::after, .user[type="manga"][page="staff"] .increase-stats::after{ content: "Or view the full list below:"; display: block; } .user .hohMilestones .milestones .milestone:nth-child(2)::after{ display: none; } #hohSettings .hohCategories{ margin-bottom: 20px; padding-right: 0px; padding-left: 0px; } .hohCategory{ display: inline-block; padding: 5px; color: rgb(var(--color-text)); } .hohCategory.active{ background: rgb(var(--color-blue)); color: rgb(var(--color-text-bright)); } .hohCategories{ display: flex; flex-wrap: wrap; position: relative; text-align: center; margin: 0; padding: 0; box-shadow: none; background-color: rgb(var(--color-background)); border-radius: 3px; } .hohCategory{ border: none; line-height: inherit; font-size: 1.2rem; font-weight: 500; white-space: nowrap; flex-grow: 1; margin: 0; padding: 6px 10px; color: rgb(var(--color-text)); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border-radius: 3px; } .hohCategory:hover{ background-color: inherit; color: rgb(var(--color-blue)); } .hohCategory.active, .hohCategory:active, .hohCategory:focus{ font-weight: 500; background-color: rgb(var(--color-foreground-blue)); color: rgb(var(--color-white)); border-radius: 0; } .hohCategory:focus:hover { background-color: rgb(var(--color-foreground-blue)); } .hohCategory:active:first-of-type, .hohCategory:first-of-type.active, .hohCategory:focus:first-of-type{ border-radius: 3px 0 0 3px; } .hohCategory:active:last-of-type, .hohCategory:last-of-type.active, .hohCategory:focus:last-of-type{ border-radius: 0 3px 3px 0; } #hohSettings .hohSetting{ display: none; position: relative; } #hohSettings.all .hohSetting, #hohSettings.Notifications .hohSetting.Notifications, #hohSettings.Feeds .hohSetting.Feeds, #hohSettings.Forum .hohSetting.Forum, #hohSettings.Lists .hohSetting.Lists, #hohSettings.Profiles .hohSetting.Profiles, #hohSettings.Stats .hohSetting.Stats, #hohSettings.Media .hohSetting.Media, #hohSettings.Navigation .hohSetting.Navigation, #hohSettings.Browse .hohSetting.Browse, #hohSettings.Script .hohSetting.Script, #hohSettings.NewlyAdded .hohSetting.NewlyAdded, #hohSettings.Login .hohSetting.Login{ display: block; } .noLogin .hohSetting.Login{ opacity: 0.4; } .medialist.cards .entry-card .progress{ width: 60%; } #titleAliasInput{ max-width: 100%; } .hohAdvancedDollar{ font-weight: bold; margin-left: 9px; } .social input[list="socialUsers"]{ background: rgb(var(--color-foreground)); border-width: 0px; padding: 5px; margin-right: 5px; } .termsFeed{ --color-blue: 61,180,242; --color-green: 123,213,85; --color-red: 232,93,117; --color-foreground: 39,44,56; } .hohFeed{ margin-top: 10px; margin-bottom: 20px; } .hohFeed video{ max-width: 100%; } .hohFeed .activity, .hohFeed .activity .reply{ min-height: 25px; position: relative; border-style: solid; border-width: 1px; border-bottom-width: 0px; } .hohFeed .activity .replies{ margin-left: 60px; margin-top: 5px; } .hohFeed .activity:last-child{ border-bottom-width: 1px; } .hohFeed a{ text-decoration: none; color: rgb(var(--color-blue)); } .hohFeed .hohButton{ font-size: 1rem; color: initial; margin: 5px; filter: drop-shadow(1px 1px 2px black); } .hohFeed img{ max-width: 500px; } .hohFeed .markdown_spoiler{ background: rgb(31, 35, 45); color: rgb(31, 35, 45); } .hohFeed .markdown_spoiler:hover{ color: rgb(159,173,189); } .hohFeed .markdown_spoiler img{ filter: blur(10px) hue-rotate(60deg) brightness(0.7); } .hohFeed .markdown_spoiler:hover img{ filter: none; } .hohFeed .markdown_spoiler::after{ content: "Spoiler"; color: rgb(159,173,189); margin-left: 2px; } .hohFeed .activity:hover::before{ content: ">"; position: absolute; left: -20px; top: 0px; } .hohLikeQuickView{ position: absolute; bottom: 0px; left: 45px; font-size: 70%; white-space: nowrap; overflow: hidden; max-width: 270px; } .hohFeed .hohLikes:hover{ color: rgb(var(--color-red)); filter: saturate(50%); } .hohFeed .hohLikes:hover .hohLikeQuickView{ filter: saturate(200%); } .hohFeed .hohLikes:hover .hohLikeQuickView{ color:rgb(159,173,189); } .hohFeed .activity:hover > .time{ color: rgb(var(--color-blue)); } .hohSearchResult{ width: 18.5%; display: inline-block; text-align: center; padding: 3px; height: 2.2em; overflow: hidden; border-style: solid; border-width: 1px; border-radius: 2px; cursor: pointer; background-color: inherit; margin: 1px; position: relative } .hohSearchResult.anime{ color: rgb(var(--color-blue)); } .hohSearchResult.manga{ color: rgb(var(--color-green)); } .hohSearchResult.anime:hover{ background-color: rgb(var(--color-blue),0.3); } .hohSearchResult.manga:hover{ background-color: rgb(var(--color-green),0.3); } .hohSearchResult.anime.selected{ background-color: rgb(var(--color-blue),0.3); cursor: initial; } .hohSearchResult.manga.selected{ background-color: rgb(var(--color-green),0.3); cursor: initial; } .termsFeedEdit{ cursor: pointer; font-size: small; position: absolute; right: 2px; top: 1px; } .termsFeedEdit:hover{ color: rgb(var(--color-text)); } .thisIsMe, a.thisIsMe{ color: rgb(var(--color-red)); } .hohTable.hohNoPointer .row, .hohNoPointer{ cursor: unset; } .hohNewChapter{ position: relative; padding-top: 8px; padding-bottom: 8px; margin-top: 0px; margin-bottom: 0px; padding-left: 10px; } .hohNewChapter:hover a::before{ content: ">"; position: absolute; margin-left: -10px; font-size: small; } .hohNewChapter:nth-child(odd){ background: rgb(var(--color-foreground-grey),0.3); } .banMode .hohNewChapter{ cursor: crosshair!important; } .banMode .hohNewChapter a{ pointer-events: none; } .banMode .hohNewChapter:hover .hohDisplayBoxClose{ display: none; } .hohSocialFeed{ position: relative; } .hohReplaceFeed > *:not(.hohSocialFeed){ display: none; } .hohSocialFeed .wrap{ background: rgb(var(--color-foreground)); border-radius: 4px; font-size: 1.3rem; overflow: hidden; position: relative; min-height: 55px !important; } .hohSocialFeed .activity-replies{ margin: 20px; } .hohSocialFeed .reply-wrap time{ font-size: 1.1rem; } .hohSocialFeed .cover{ background-position: 50%; background-repeat: no-repeat; background-size: cover; } .hohSocialFeed .avatar{ display: block; border-radius: 3px; height: 36px; margin-top: 9px; width: 36px; background-position: 50%; background-repeat: no-repeat; background-size: cover; } .hohSocialFeed .activity-entry{ margin-bottom: 10px } .hohSocialFeed .details{ min-width: 500px; padding: 10px 16px !important; } .hohSocialFeed .reply .avatar{ display: inline-block; height: 25px; width: 25px; margin-top: 0; } .hohSocialFeed .reply .name{ display: inline-block; line-height: 25px; margin-left: 6px; vertical-align: top; } .hohSocialFeed .activity-entry > .wrap > .actions{ bottom: 12px; color: rgb(var(--color-blue-dim)); position: absolute; right: 12px; } .hohSocialFeed .activity-entry > .wrap .action{ cursor: pointer; display: inline-block; padding-left: 5px; transition: .2s; } .hohSocialFeed .activity-entry > .wrap > .time{ color: rgb(var(--color-text-lighter)); font-size: 1.1rem; position: absolute; right: 12px; top: 12px; } .hohSocialFeed .reply{ background: rgb(var(--color-foreground)); border-radius: 3px; font-size: 1.3rem; margin-bottom: 15px; padding: 14px; padding-bottom: 4px; position: relative; } .hohSocialFeed .reply .actions{ color: rgb(var(--color-blue-dim)); position: absolute; right: 12px; top: 12px; } .hohSocialFeed .activity-entry > .wrap > .time .action{ cursor: pointer; opacity: 0; padding-right: 10px; transition: .2s; } .hohSocialFeed .activity-entry > .wrap > .time:hover .action{ opacity: 1; } .hohSocialFeed .liked{ color: rgb(var(--color-red)); } .hohSocialFeed .name, .hohSocialFeed .title{ color: rgb(var(--color-blue)); } .hohMilestones .stat .value{ color: rgb(var(--color-blue)); font-size: 1.4rem; font-weight: 700; padding-bottom: 8px; } .hohMilestones .stat .label{ color: rgb(var(--color-text-light)); font-size: 1.1rem; } .hohMediaEmbed .embed{ background: rgb(var(--color-background)); border-radius: 3px; display: inline-grid; font-size: 14px; grid-template-columns: 50px auto; line-height: 18px; max-width: 550px; min-height: 64px; overflow: hidden; width: auto; } .hohMediaEmbed .wrap{ color: rgb(var(--color-text-light)); overflow: hidden; padding: 10px 16px 10px 12px; text-overflow: ellipsis; } .hohMediaEmbed .title{ color: rgb(var(--color-blue)); font-size: 1.3rem; font-weight: 500; margin-bottom: -10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hohMediaEmbed .info{ font-size: 1.2rem; position: relative; } .hohMediaEmbed .genres{ min-height: 18px; min-width: 14px; opacity: 0; position: relative; top: 18px; transition: .2s; } .hohMediaEmbed .cover{ background-position: 50%; background-repeat: no-repeat; background-size: cover; } .hohMediaEmbed .info > span{ display: inline; transition: .2s; opacity: 1; } .hohMediaEmbed:hover .info > span{ opacity: 0; } .hohMediaEmbed:hover .info > .genres:empty ~ span, .embed:hover .info > .genres:empty ~ span{ opacity: 1!important; } .hohMediaEmbed:hover .info > .genres{ opacity: 1; } .hohGetMarkdown{ cursor: pointer; opacity: 0; padding-right: 10px; transition: .2s; } .activity-entry:hover .hohGetMarkdown{ color: rgb(var(--color-blue)); opacity: 1; } .hohMarkdownSource{ font-size: 1.4rem; line-height: 1.4; overflow-wrap: break-word; word-break: break-word; } .queryResults .message img{ max-width: 100%; } .hohTimelineEntry{ margin: 7px; position: relative; padding: 7px; border-radius: 2px; background: rgb(var(--color-foreground)); } .hohImport .dropbox{ align-items: center; background: rgba(var(--color-background),.6); border-radius: 4px; color: rgb(var(--color-text-lighter)); cursor: pointer; display: inline-flex; font-size: 1.3rem; height: 200px; justify-content: center; line-height: 2rem; margin-right: 20px; outline-offset: -12px; outline: 2px dashed rgba(var(--color-text),.2); padding: 18px 20px; position: relative; transition: .2s; vertical-align: text-top; width: 200px; } .hohImport .dropbox p{ font-size: 1.2em; padding: 50px 0; text-align: center; } .hohImport .dropbox .input-file{ cursor: pointer; height: 200px; opacity: 0; overflow: hidden; position: absolute; width: 100%; } .hohImport label.el-checkbox{ display: block; margin-top: 20px; margin-bottom: 10px; } .section.hohImport{ margin-bottom: 50px; } .media-manga .external-links{ position: relative; } .media-manga .external-links > h2{ visibility: hidden; } .media-manga .external-links > h2::after{ visibility: visible; position: absolute; left: 0px; top: 0px; content: "External & Reading links"; } .hohButton.danger{ background: rgba(var(--color-red),.8); color: rgb(var(--color-white)); } .hohButton:disabled{ opacity: 0.5; cursor: default; } .hohNameCel{ margin-left: 50px; display: block; } .trailer{ overflow: auto; resize: both; } .trailer .video{ height: calc(99% - 30px); } .hohResizePearl{ position: absolute; right: 2px; bottom: 2px; width: 20px; height: 20px; border: solid; border-radius: 10px; background: rgb(var(--color-foreground)); cursor: se-resize; } .activity-entry > .wrap > .time:hover{ background: rgb(var(--color-foreground)); z-index: 60; } .activity-entry > .wrap > .time .action{ margin-left: 5px; padding-right: 5px; } a.external::after{ content: url('data:image/svg+xml;utf8,'); position: absolute; } .load-more:hover{ color: rgb(var(--color-blue)); } #hohListPreview .media-preview-card:hover .image-text{ opacity: 0; } #hohListPreview .media-preview-card:hover .plus-progress{ opacity: 1; } #hohListPreview .plus-progress{ background: rgba(var(--color-overlay),.7); border-radius: 0 0 3px 3px; bottom: 0; color: rgba(var(--color-text-bright),.9); display: inline-block; font-size: 1.3rem; font-weight: 500; left: 0; letter-spacing: .2px; margin-bottom: 0; opacity: 0; padding-bottom: 8px; padding-top: 8px; position: absolute; transition: .3s; width: 100%; } #hohListPreview .content{ background: rgb(var(--color-background)); height: 100%; left: 100%; position: absolute; top: 0; opacity: 0; transition: opacity .3s; width: 212px; z-index: -1; border-radius: 0 3px 3px 0; padding: 12px; } #hohListPreview .info-left .content{ border-radius: 3px 0 0 3px; left: auto !important; right: 100%; text-align: right; } #hohListPreview .media-preview-card:hover .content{ opacity: 1; z-index: 5; } #hohListPreview .content:hover{ opacity: 0!important; z-index: -1!important; } #hohListPreview .size-toggle{ float: right; margin-top: -15px; } .site-theme-contrast .media-page-unscoped .header .description{ color: rgb(var(--color-text)); } .hohDeleteActivity{ position: absolute; top: 2px; right: -21px; width: 10px; color: rgb(var(--color-red)); cursor: pointer; display: none; padding-left: 5px; padding-right: 5px; background: rgb(39, 44, 56); } .hohFeed .activity:hover .hohDeleteActivity{ display: inline; } input[list="socialUsers"]{ color: rgb(var(--color-text)); } .footer > .actions > .button.like > .like-wrap > .button.liked .icon{ color: rgb(var(--color-peach)); } .favourite.media{ background-color: rgb(var(--color-background)); } .favourites .favourite{ background-color: rgb(var(--color-background)); } .hohCharacter .role-card div{ display: inline-grid; } .hohCharacter .role-card > div{ display: inline-grid; grid-template-columns: 60px auto; grid-template-areas: "image content"; } .hohCharacter .cover{ background-position: 50%; background-repeat: no-repeat; background-size: cover; grid-area: image; } .hohCharacter .content{ font-size: 1.2rem; grid-area: content; overflow: hidden; padding: 10px; } .hohCharacter .staff .content{ text-align: right; } .hohCharacter .name{ display: block; height: 48px; line-height: 1.3; } .hohCharacter .role{ color: rgb(var(--color-text-lighter)); font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; } .hohCharacter .view-media-staff{ grid-template-areas: "media staff"; } .hohCharacter .view-media-staff .staff{ grid-template-areas: "content image"; grid-template-columns: auto 60px; grid-area: staff; } .hohCharacter .view-media-staff .media{ grid-area: media; } .hohCharacter .role-card{ background: rgb(var(--color-foreground)); border-radius: 3px; display: inline-grid; grid-template-columns: 50% 50%; height: 80px; overflow: hidden; } .hohNoAWC .thread-card.small{ margin-bottom: 15px; background: rgb(var(--color-foreground)); border-radius: 3px; padding: 18px; position: relative; } .hohNoAWC .title{ font-size: 1.4rem; display: block; margin-bottom: 12px; margin-right: 110px; } .hohNoAWC .footer{ align-items: center; display: flex; flex-direction: row; } .hohNoAWC .avatar{ background-position: 50%; background-repeat: no-repeat; background-size: cover; border-radius: 3px; display: inline-block; height: 25px; vertical-align: text-top; width: 25px; } .hohNoAWC .name{ display: inline-block; font-size: 1.3rem; padding-left: 10px; } .hohNoAWC .name span{ color: rgb(var(--color-blue)); } .hohNoAWC .categories{ margin-left: auto; white-space: nowrap; max-width: 310px; } .hohNoAWC .category{ border-radius: 100px; color: #fff; display: inline-block; font-size: 1.1rem; margin-left: 10px; padding: 4px 8px; } .hohNoAWC .category.default{ text-transform: lowercase; } .hohNoAWC .category:hover{ color: rgba(26,27,28,.6); } .hohNoAWC .info{ color: rgb(var(--color-text-lighter)); font-size: 1.2rem; position: absolute; right: 12px; top: 12px; } .hohNoAWC .info span{ padding-left: 10px; } .hohYearHeading{ grid-column: 1 / -1; } #hohMALserialization{ padding-bottom: 14px; } #hohMALscore:empty, #hohMALserialization:empty{ display: none; } body.TMPreviewScore > .el-tooltip__popper{ display: none; } :root .__ns__pop2top{/*no-script placeholder, messes with the search if there are blocked media elements in the feed*/ z-index: initial!important; } .hohStudioSorter .selected{ color: rgb(var(--color-blue)); } .hohStudioSorter span{ font-weight: normal; color: rgb(var(--color-text-lighter)); display: inline; font-size: 1.2rem; padding: 4px 15px 5px 15px; border-radius: 3px; transition: .2s; background: none; cursor: pointer; } .hohStudioSorter span:hover{ color: rgb(var(--color-blue)); } .hohStudioSubstitute{ margin-top: 25px; display: grid; grid-column-gap: 30px; grid-row-gap: 30px; grid-template-columns: repeat(3,1fr); } .hohRecsSwitch{ min-width: 500px } .hohRecsSwitch .options{ min-width: 500px; justify-content: space-around; } .hohRecsSwitch .options .option{ border-radius: 30px; color: rgb(var(--color-text-light)); cursor: pointer; font-size: 1.5rem; margin-right: 3px; padding: 3px 12px; text-transform: capitalize; transition: .25s ease; } .hohRecsSwitch .options .option.active{ background: rgb(var(--color-blue)); color: rgba(var(--color-white),.9); } .recommendations-wrap.substitute{ display: grid; grid-gap: 60px 50px; grid-template-columns: repeat(auto-fill,330px); justify-content: center; margin-bottom: 60px; } .recommendations-wrap.substitute .recommendation-pair-card{ background: rgb(var(--color-foreground)); border-radius: 8px; box-shadow: 0 4px 4px rgba(var(--color-shadow-blue),.05); display: grid; font-family: Overpass,-apple-system,BlinkMacSystemFont,Segoe UI,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; grid-gap: 20px; grid-template-columns: 130px 130px; justify-content: space-evenly; max-width: 100%; padding: 20px; padding-bottom: 35px; position: relative; transition: box-shadow .2s ease-in-out; vertical-align: top; } .recommendations-wrap.substitute .recommendation-pair-card:hover{ box-shadow: 0 14px 20px rgba(var(--color-shadow-blue),.1),0 4px 4px rgba(var(--color-shadow-blue),.05); } .recommendations-wrap.substitute .cover{ background-size: cover; border-radius: 4px; box-shadow: 0 4px 4px rgba(var(--color-shadow-blue),.05); display: grid; grid-template-rows: 1fr auto; height: 180px; margin-bottom: 10px; overflow: hidden; position: relative; width: 130px; } .recommendations-wrap.substitute .title{ font-size: 1.3rem; font-weight: 600; line-height: 140%; white-space: normal; } .recommendations-wrap.substitute .rating-wrap{ align-items: center; background: rgba(var(--color-overlay),.9); border-radius: 5px; bottom: -18px; box-shadow: 0 4px 4px rgba(var(--color-shadow-blue),.05); color: rgba(var(--color-white),.8); cursor: auto; display: flex; left: calc(50% - 65px); padding: 10px 13px; position: absolute; width: 130px; } .recommendations-wrap.substitute .rating{ font-size: 1.5rem; font-weight: 900; margin-left: auto; } .recommendations-wrap.substitute .thumbs-down:hover{ color: rgba(var(--color-red)); } .recommendations-wrap.substitute .thumbs-up:hover{ color: rgba(var(--color-green)); } .recommendations-wrap.substitute .icon{ display: inline-block; cursor: pointer; transition: color .25s ease-in-out; } .recommendations-wrap.substitute .recommendation-pair-card .media:first-child::after{ content: "➡"; top: 35%; position: absolute; right: 48%; } .review .actions .icon{ opacity: 0.5; border: rgba(0, 0, 0, 0); border-width: 3px; border-style: solid; } .review .actions .icon:hover,.review .actions .icon.active{ opacity: 1; border: rgb(var(--color-text)); border-style: solid; } .home .activity-entry .actions{ user-select: none; } .hohStaffPageData{ position: absolute; right: 10px; top: 40%; } .hohSocialFeed .load-more{ display: none; background: rgb(var(--color-foreground)); border-radius: 4px; cursor: pointer; font-size: 1.4rem; margin-top: 20px; padding: 14px; text-align: center; transition: .2s; } .recent-recommendations > .header-wrap{ grid-template-columns: 330px 0 auto; justify-content: space-between; } .media-page .header .cover-wrap{ min-height: 340px; } #hohStaffTabFilter{ display: none; position: absolute; right: 0px; top: -25px; } .media-staff + #hohStaffTabFilter{ display: inline; } #hohStaffTabFilter > input{ height: 20px; margin-left: 3px; } #hohFilterRemover{ display: none; } #hohFilterRemover:hover{ cursor: pointer; } #hohEntryScore{ user-select: none; } .hohSorts{ color: rgb(var(--color-gray-700)); cursor: pointer; font-size: 1.3rem; font-weight: 600; padding: 8px 0; transition: color .2s ease; } .selects-wrap .icon-wrap.active{ color: rgb(var(--color-blue)); } .selects-wrap .icon-wrap:hover{ color: rgb(var(--color-blue)); } .range-wrap .handle{ height: 18px; } .range-wrap .handle-0{ background: rgba(var(--color-blue-600),.7); border-radius: 2px 2px 0px 20px; transform: translate(-13.5px,-4px); } .range-wrap .handle-1{ border-radius: 0px 20px 2px 2px; transform: translate(1px,1px); } .range-wrap .handle-0:hover{ transform: translate(-14px,-4px) scale(1.1); } .range-wrap .handle-1:hover{ transform: translate(1.5px,1.5px) scale(1.1); } .range-wrap .handle:hover{ background: rgba(var(--color-blue-600)); } .range-wrap .active-region{ border-radius: 0px; } .results.table{ counter-reset: entryCounter; } .results.table .media-card:not(.has-rank)::before{ counter-increment: entryCounter; content: counter(entryCounter); opacity: 0.5; font-size: 70%; margin-left: -21px; top: 2px; margin-right: 3px; position: absolute; } .results.cover .title{ position: relative; padding-left: 15px; margin-left: -12px; } .results.cover .title .list-status.circle{ visibility: visible; position: absolute; left: 0px; top: 3px; } .hohRoleLine{ height: 7px; position: absolute; left: 0px; top: -8px; width: 80%; border-radius: 3px; } #hohMarkdownHelper{ position: fixed; bottom: 20px; left: 20px; z-index: 999; cursor: pointer; } #hohMarkdownHelper:hover{ font-weight: bold; } .hohGuideHeading, .hohGuideHeading:visited{ color: rgb(var(--color-blue)); } .studio-page-unscoped.listView .grid-wrap{ grid-template-columns: none; grid-template-columns: 1fr; grid-gap: 12px 30px; } .studio-page-unscoped.listView .media-card{ backface-visibility: hidden; background: rgb(var(--color-background-100)); border-radius: 2px; box-shadow: 0 14px 30px rgba(var(--color-shadow-blue),.15),0 4px 4px rgba(var(--color-shadow-blue),.05); display: inline-grid; grid-template-columns: 48px auto; position: relative; text-align: left; min-height: 80px; width: 100%; } .studio-page-unscoped.listView .cover{ height: 81px; width: 54px; border-radius: 2px; } .studio-page-unscoped.listView .title{ margin-left: 20px; color: rgb(var(--color-gray-900)); display: block; font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; margin-top: 16px; } .studio-page-unscoped.listView .media-card .hover-data{ opacity: 1; left: 0px; background: none; box-shadow: none; padding: 10px; } .studio-page-unscoped.listView .media-card .hover-data .genres{ position: absolute; left: 50px; top: 20px; } .studio-page-unscoped.listView .media-card .hover-data .info{ position: absolute; right: 200px; top: 25px; width: 150px; } .studio-page-unscoped.listView .media-card .hover-data .score{ position: absolute; right: 400px; top: 25px; } .studio-page-unscoped.listView .media-card .hover-data .date{ position: absolute; right: 50px; top: 30px; width: 120px; } .studio-page-unscoped .hohThemeSwitch{ width: 75px; position: absolute; top: 60px; left: 50%; } .studio .media-card.isMain{ border-bottom: rgb(var(--color-blue)); border-bottom-width: 1px; border-bottom-style: solid; } .hohInfoButton{ position: absolute; right: 0px; top: 0px; cursor: pointer; } .anisong-entry{ background: rgb(var(--color-foreground)); margin-bottom: 5px; padding: 8px 10px; border-radius: 3px; } .anisongs .has-video { cursor: pointer; color: rgb(var(--color-text)); } .anisongs .has-video:hover { transition: .15s; color: rgb(var(--color-blue)); } .anisongs .anisong-entry video { cursor: auto; margin-top: 10px; max-width: 100%; } .search .filter > .icon{ display: inline-block; } .rules-notice{ display: none; } .sidebar .ranking{ padding-left: 8px; padding-right: 8px; } .recommendations > .wrap{ margin-left: 5px; } .substitution .character-roles > div:not(#hoh-character-roles){ display: none; } [data-icon="notesTags"] text{ fill: rgb(var(--color-foreground)); } .list-editor .custom-lists{ max-height: 400px; overflow-y: auto; } .list-editor .custom-lists:hover{ margin-right: 0; } .forum-thread .comment .actions .like-wrap.hohHandledLike .users{ width: max-content!important; max-width: 800px; } .forum-thread .body .actions .like-wrap.hohHandledLike .users{ width: max-content!important; max-width: 800px; } /*no !importants here, since Erwin is styling this on his own:*/ .activity-feed .hohNoteSuffix:not(:empty), .activity-feed .hohRewatchSuffix:not(:empty), .activity-feed .hohScore:not(.hohSmiley){ background-color: rgba(var(--color-black),0.5); padding: 0px 5px 1px 5px; border-radius: 3px; color: white; } .hohPinned{ margin-bottom: 20px; } .hohPinned .wrap{ background: rgb(var(--color-foreground)); border-radius: 4px; font-size: 1.3rem; overflow: hidden; position: relative; } } .hohPinned .text .header{ display: flex; align-items: center; } .hohPinned .text .avatar{ border-radius: 3px; height: 40px; width: 40px; background-position: 50%; background-repeat: no-repeat; background-size: cover; display: inline-block; } .hohPinned .text .name{ display: inline-block; height: 40px; line-height: 40px; margin-left: 12px; vertical-align: top; color: rgb(var(--color-blue)); display: inline-block; font-size: 1.4rem; } .hohPinned .activity-markdown{ font-size: 1.4rem; line-height: 1.4; overflow-wrap: break-word; word-break: break-word; } .hohPinned .markdown{ margin-bottom: 14px; margin-top: 14px; max-height: 560px; overflow: hidden; } .hohPinned .text{ padding: 20px; } .hohPinned .actions{ bottom: 12px; color: rgb(var(--color-blue-dim)); position: absolute; right: 12px; font-weight: 800; } .hohPinned .action{ cursor: pointer; display: inline-block; padding-left: 5px; transition: .2s; } .hohPinned .time{ color: rgb(var(--color-text-lighter)); font-size: 1.1rem; position: absolute; right: 12px; top: 12px; font-family: Overpass,-apple-system,BlinkMacSystemFont,Segoe UI,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; font-weight: 800; } .hohPinned .list{ display: grid; grid-template-columns: 80px auto; height: 100%; min-height: 110px; font-size: 1.4rem; } .hohPinned .list .details{ display: flex; flex-direction: column; justify-content: center; line-height: 1.4; min-height: 70px; } .hohPinned .status .title{ color: rgb(var(--color-blue)); } .hohPinned .cover{ background-position: 50%; background-repeat: no-repeat; background-size: cover; } .hohSpinner.spinnerDone, .spinnerDone{ color: rgb(var(--color-green)); } .hohSpinner.spinnerError, .spinnerError{ color: rgb(var(--color-red)); } .user-social .filter-group > span{ position: relative; } .hohCount{ position: absolute; right: 1px; top: 0px; } .forum-thread .comments .nav{ z-index: 2; /*the forum navigation should beat Automail UI elements*/ } a.external-link.Official.Site[href*=".jp"]::after{ content: "(JP)"; } .forum-feed .filter-group [href="/forum/subscribed"] + a[href="/forum/search"]::after{ content: " 🔎"; } .list-preview-wrap .size-toggle, .feed-filter.el-dropdown-link{ opacity: 1; } .medialist.table .entry:hover .cover .image{/*https://anilist.co/forum/thread/46727*/ z-index: 1000; } .ilink:hover{ color: rgb(var(--color-blue)); cursor: pointer; } .settings .nav a[href="/settings/apps"]::after{ content: " & Automail"; } .forum-thread h1.title.locked ~ div .nav svg[data-icon="reply"]{/*letting people write out entire comments before telling them the thread is locked is cruel*/ display: none; } .hohReverseTitle.status{ display: flex!important; } .hohReverseTitle .title{ order: -1; margin-right: 5px; } .footer .links a{ position:relative } .footer [href="https://discord.gg/TF428cr"]::before{ content: url('data:image/svg+xml;utf8, '); position: absolute; left: -10px; } .footer [href="https://twitter.com/AniListco"]::before{ content: url('data:image/svg+xml;utf8,'); position: absolute; left: -10px; } .footer [href="https://www.facebook.com/AniListco"]::before{ content: url('data:image/svg+xml;utf8,'); position: absolute; left: -10px; } .footer [href="https://github.com/AniList"]::before{ content: url('data:image/svg+xml;utf8,'); position: absolute; left: -10px; } .footer [href="/sitemap/index.xml"]::after{ content: ".xml"; } .hohDisplayBox{ position: fixed; top: 80px; left: 200px; z-index: 999; padding: 20px; background-color: rgb(var(--color-foreground)); border: solid 1px; border-radius: 4px; box-shadow: black 2px 2px 20px; overflow: hidden; filter: brightness(110%); } .hohDisplayBox .scrollableContent{ overflow: auto; height: 100%; scrollbar-width: thin; margin-top: 5px; } .hohDisplayBoxClose{ position: absolute; right: 15px; top: 15px; cursor: pointer; background-color: red; border: solid; border-width: 1px; border-radius: 2px; color: white; border-color: rgb(var(--color-text)); filter: drop-shadow(0 0 0.2rem crimson); z-index: 20; } } .hohDisplayBoxClose:hover{ filter: drop-shadow(0 0 0.75rem crimson); } .hohNewChapter .hohDisplayBoxClose{ display: none; top: 7px; } .hohNewChapter:hover .hohDisplayBoxClose{ display: inline; } .hohDisplayBoxTitle{ position: absolute; top: 3px; left: 3px; } @media(max-width: 1540px){ .substitution .container{ max-width: 1200px; } .hohStudioSubstitute{ grid-template-columns: repeat(2,1fr); } } @media(max-width: 1040px){ .input-wrap.manga input[placeholder="Status"], .input-wrap.anime input[placeholder="Status"], .input-wrap.anime .form.score input{ width: 100%; } .substitution .grid-wrap{ grid-template-columns: 1fr; } .home .list-preview .media-preview-card:nth-child(5n+3) .content{ text-align: left; right: unset; } .status{ font-size: small; } .status > .name{ padding: 5px; } } @media(max-width: 760px){ #hohMALscore{ padding-right: 25px; } #hohMALscore .type{ font-weight: 400; } #hohMALscore .value{ color: rgb(var(--color-text)); font-size: 1.4rem; } .hohMediaImageContainer{ position: absolute; right: -22px; max-height: 30px; width: 25px; overflow: scroll; scrollbar-width: thin; } .hohUserImageSmall{ display: none; } .hohMessageText{ margin-top: 30px!important; } .hohBackgroundUserCover{ margin-top: 1px; } .hohMediaImageContainer > a{ height: 20px; } .hohMediaImage{ height: 20px; width: 20px; margin-right: 0px } .hohNotification{ margin-right: 23px; font-size: 1.5rem; } .hohCommentsContainer{ position: relative; top: 70px; } .hohComments{ position: absolute; right: -5px; top: 5px; } .notifications-feed .filters p{ display: inline; margin-left: 10px; } .activity-feed .actions, .activity-feed .actions .action .count{ font-size: 1.6rem; } .hohDownload{ top: 50px; } .media .hohDownload{ top: 5px; } #dubNotice{ margin: 0px; } .hohFeedFilter .hohDescription{ display: none; } .forum-feed .create-btn + .filter-group > a{ display: inline-block; width: 19%; padding-top: 40px; padding-bottom: 40px; text-align: center; border-style: solid; border-width: 1px; border-color: rgb(var(--color-foreground)); } .hohExtraFilters{ max-height: 250px; overflow: auto; } .recommendations-wrap .actions .thumbs-down{ margin-right: 10px; } .relations.hohRelationStatusDots .hohStatusDot, .recommendation-card .hohStatusDot{ position: relative; transform: none; } .hohCategories::after{ display: block; color: rgb(var(--color-peach)); content: "On mobile? The 'mobile friendly' setting will probably make the script a lot less broken"; } .media .data-set a[href^="/studio/"]{ margin-left: 5px; } .media p.description:empty{ display: none; } } @media(max-width: 500px){ .footer [href="https://anilist.co"], .footer [href="/sitemap/index.xml"]{ display: none; } .footer .links{ margin-left: -20px; } .markdown-editor{ padding: 12px 2px!important; } .hohColourPicker{ display: none; } } `; let documentHead = document.querySelector("head"); if(documentHead && document.URL !== "https://anilist.co/graphiql"){ documentHead.appendChild(style) } else{ return//xml documents or something. At least it's not a place where the script can run } if(!String.prototype.includes){//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes String.prototype.includes = function(search,start){ 'use strict'; if(search instanceof RegExp){ throw TypeError('first argument must not be a RegExp'); } if(start === undefined){ start = 0 } return this.indexOf(search,start) !== -1; } } //https://github.com/JSmith01/broadcastchannel-polyfill //The Unlicense if(!window.BroadcastChannel){ var channels = []; function BroadcastChannel(channel) { var $this = this; channel = String(channel); var id = '$BroadcastChannel$' + channel + '$'; channels[id] = channels[id] || []; channels[id].push(this); this._name = channel; this._id = id; this._closed = false; this._mc = new MessageChannel(); this._mc.port1.start(); this._mc.port2.start(); window.addEventListener('storage', function(e) { if (e.storageArea !== window.localStorage) return; if (e.newValue == null || e.newValue === '') return; if (e.key.substring(0, id.length) !== id) return; var data = JSON.parse(e.newValue); $this._mc.port2.postMessage(data); }); } BroadcastChannel.prototype = { // BroadcastChannel API get name() { return this._name; }, postMessage: function(message) { var $this = this; if (this._closed) { var e = new Error(); e.name = 'InvalidStateError'; throw e; } var value = JSON.stringify(message); // Broadcast to other contexts via storage events... var key = this._id + String(Date.now()) + '$' + String(Math.random()); window.localStorage.setItem(key, value); setTimeout(function() { window.localStorage.removeItem(key); }, 500); // Broadcast to current context via ports channels[this._id].forEach(function(bc) { if (bc === $this) return; bc._mc.port2.postMessage(JSON.parse(value)); }); }, close: function() { if (this._closed) return; this._closed = true; this._mc.port1.close(); this._mc.port2.close(); var index = channels[this._id].indexOf(this); channels[this._id].splice(index, 1); }, // EventTarget API get onmessage() { return this._mc.port1.onmessage; }, set onmessage(value) { this._mc.port1.onmessage = value; }, addEventListener: function(/*type, listener , useCapture*/) { return this._mc.port1.addEventListener.apply(this._mc.port1, arguments); }, removeEventListener: function(/*type, listener , useCapture*/) { return this._mc.port1.removeEventListener.apply(this._mc.port1, arguments); }, dispatchEvent: function(/*event*/) { return this._mc.port1.dispatchEvent.apply(this._mc.port1, arguments); }, }; window.BroadcastChannel = window.BroadcastChannel || BroadcastChannel; } //begin "conditionalStyles.js" function initCSS(){ moreStyle.textContent = ""; let aliasFlag = false; if(useScripts.shortRomaji){ shortRomaji.forEach(createAlias); aliasFlag = true } const titleAliases = JSON.parse(localStorage.getItem("titleAliases")); if(titleAliases){ aliasFlag = true; titleAliases.forEach(createAlias) } if(aliasFlag){ moreStyle.textContent += ` a.title::before ,.quick-search-results .el-select-dropdown__item a > span::before{ visibility: visible; line-height: 1.15; margin-right: 2px; } .medialist.table .title > a::before{ visibility: visible; font-size: 1.5rem; margin-right: 2px; } .medialist.compact .title > a::before ,.medialist.cards .title > a::before ,.home .status > a.title::before ,.media-embed .title::before{ visibility: visible; font-size: 1.3rem; margin-right: 2px; } .role-card a.content > .name::before{ visibility: visible; font-size: 1.2rem; } .overlay > a.title::before ,.media-preview-card a.title::before{ visibility: visible; font-size: 1.4rem; line-height: 1.15; } .role-card a.content > .name{ line-height: 1.3!important; }` } if(useScripts.CSSfavs){ /*adds a logo to most favourite studio entries. Add more if needed */ const favStudios = [ [1, "Studio-Pierrot", "https://upload.wikimedia.org/wikipedia/commons/7/70/Studio_Pierrot_logo.svg"], [2, "Kyoto-Animation","https://upload.wikimedia.org/wikipedia/commons/b/bf/Kyoto_Animation_logo.svg"], [3, "GONZO", "https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Gonzo_company.png/220px-Gonzo_company.png"], [4, "BONES", "https://i.stack.imgur.com/7pRQn.png"], [5, "Bee-Train", "https://upload.wikimedia.org/wikipedia/commons/4/45/Bee_Train.svg"], [6, "Gainax", "https://upload.wikimedia.org/wikipedia/commons/2/27/GAINAX.svg"], [7, "JC-Staff", "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/J.C.Staff_Logo.svg/220px-J.C.Staff_Logo.svg.png"], [8, "Artland", "https://upload.wikimedia.org/wikipedia/commons/7/75/Artland_studio_logo.png"], [10, "Production-IG", "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Production_I.G_Logo.svg/250px-Production_I.G_Logo.svg.png"], [11, "MADHOUSE", "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Madhouse_studio_logo.svg/300px-Madhouse_studio_logo.svg.png"], [13, "Studio-4C", "https://upload.wikimedia.org/wikipedia/en/e/ec/Studio_4C_logo.png"], [14, "Sunrise", "https://upload.wikimedia.org/wikipedia/commons/6/60/Sunrise-Logo.svg"], [17, "Aniplex", "https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Aniplex_logo.svg/220px-Aniplex_logo.svg.png"], [18, "Toei-Animation", "https://i.stack.imgur.com/AjzVI.png",76,30], [21, "Studio-Ghibli", "https://upload.wikimedia.org/wikipedia/en/thumb/c/ca/Studio_Ghibli_logo.svg/220px-Studio_Ghibli_logo.svg.png",76,30], [22, "Nippon-Animation","https://upload.wikimedia.org/wikipedia/en/thumb/b/b4/Nippon.png/200px-Nippon.png"], [25, "Milky-Animation-Label","https://files.catbox.moe/begz5e.jpg"], [27, "Xebec", "https://upload.wikimedia.org/wikipedia/fr/b/bd/Logo_Xebec.svg"], [28, "Oriental-Light-and-Magic","https://i.stack.imgur.com/Sbllv.png"], [29, "VAP", "https://upload.wikimedia.org/wikipedia/commons/7/75/VAP_logo.svg"], [32, "Manglobe", "https://i.imgur.com/W8U74wO.png"], [34, "Hal-Film-Maker", "https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Hal_film_maker_logo.gif/220px-Hal_film_maker_logo.gif"], [35, "Seven-Arcs", "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Seven_Arcs_logo.svg/320px-Seven_Arcs_logo.svg.png"], [36, "Studio-Gallop", "https://upload.wikimedia.org/wikipedia/commons/3/37/Studio_Gallop.png"], [37, "Studio-DEEN", "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Studio_Deen_logo.svg/220px-Studio_Deen_logo.svg.png"], [38, "Arms", "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Arms_Corporation.png/200px-Arms_Corporation.png"], [39, "Daume", "https://upload.wikimedia.org/wikipedia/commons/3/3e/Daume_studio_logo.png",70,35], [41, "Satelight", "https://i.stack.imgur.com/qZVQg.png",76,30], [43, "ufotable", "https://upload.wikimedia.org/wikipedia/commons/1/19/Ufotable_Animaci%C3%B3n.png"], [44, "Shaft", "https://i.stack.imgur.com/tuqhK.png"], [45, "Pink-Pineapple", "https://i.stack.imgur.com/2NMQ0.png"], [47, "Studio-Khara", "https://i.stack.imgur.com/2d1TT.png",76,30], [48, "AIC", "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/AIC_logo.png/220px-AIC_logo.png"], [51, "diomeda", "https://i.stack.imgur.com/ZHt3T.jpg"], [53, "Dentsu", "https://upload.wikimedia.org/wikipedia/commons/thumb/1/10/Dentsu_logo.svg/200px-Dentsu_logo.svg.png"], [58, "Square-Enix", "https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Square_Enix_logo.svg/230px-Square_Enix_logo.svg.png"], [65, "Tokyo-Movie-Shinsha","https://upload.wikimedia.org/wikipedia/en/2/22/Tokyo_Movie_Shinsha.png"], [66, "Key", "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Key_Visual_Arts_Logo.svg/167px-Key_Visual_Arts_Logo.svg.png",76,25], [68, "Mushi-Productions","https://i.stack.imgur.com/HmYdT.jpg"], [73, "TMS-Entertainment","https://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/TMS_Entertainment_logo.svg/220px-TMS_Entertainment_logo.svg.png"], [79, "Genco", "https://www.thefilmcatalogue.com/assets/company-logos/5644/logo_en.png"], [86, "Group-TAC", "https://upload.wikimedia.org/wikipedia/commons/b/b7/Group_TAC.png"], [91, "feel", "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Feel_logo.png/320px-Feel_logo.png"], [95, "Doga-Kobo", "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Doga_Kobo_Logo.svg/220px-Doga_Kobo_Logo.svg.png"], [97, "ADV-Films", "https://upload.wikimedia.org/wikipedia/en/4/45/A.D._Vision_%28logo%29.png"], [102, "FUNimation-Entertainment","https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Funimation_2016.svg/320px-Funimation_2016.svg.png"], [103, "Tatsunoko-Production","https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Tatsunoko_2016_logo.png/300px-Tatsunoko_2016_logo.png"], [104, "Lantis", "https://upload.wikimedia.org/wikipedia/commons/3/39/Lantis_logo.png"], [108, "Media-Factory", "https://i.stack.imgur.com/rR7yU.png",76,25], [109, "Shochiku", "https://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Shochiku_logo_%28text%29.svg/320px-Shochiku_logo_%28text%29.svg.png"], [112, "Brains-Base", "https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Brain%27s_Base_logo.png/200px-Brain%27s_Base_logo.png"], [113, "Kadokawa-Shoten","https://i.stack.imgur.com/ZsUDR.gif"], [119, "Viz-Media", "https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Viz_Media_2017_logo.svg/320px-Viz_Media_2017_logo.svg.png"], [132, "PA-Works", "https://i.stack.imgur.com/7kjSn.png"], [143, "Mainichi-Broadcasting","https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Mainichi_Broadcasting_System_logo.svg/200px-Mainichi_Broadcasting_System_logo.svg.png"], [144, "Pony-Canyon", "https://i.stack.imgur.com/9kkew.png"], [145, "TBS", "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/TBS_logo.svg/200px-TBS_logo.svg.png"], [150, "Sanrio", "https://upload.wikimedia.org/wikipedia/en/thumb/4/41/Sanrio_logo.svg/220px-Sanrio_logo.svg.png"], [159, "Kodansha", "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Kodansha.png/200px-Kodansha.png"], [166, "Movic", "https://upload.wikimedia.org/wikipedia/commons/f/f3/Movic_logo.png"], [167, "Sega", "https://upload.wikimedia.org/wikipedia/commons/1/13/SEGA_logo.svg"], [169, "Fuji-TV", "https://upload.wikimedia.org/wikipedia/en/thumb/e/e9/Fuji_TV_logo.svg/225px-Fuji_TV_logo.svg.png",76,30], [193, "Idea-Factory", "https://upload.wikimedia.org/wikipedia/en/e/eb/Idea_factory.gif"], [196, "Production-Reed","https://upload.wikimedia.org/wikipedia/fr/7/7d/Production_Reed_Logo.png"], [199, "Studio-Nue", "https://i.stack.imgur.com/azzKH.png"], [200, "Tezuka-Productions","https://upload.wikimedia.org/wikipedia/fr/f/fe/Tezuka_Productions_Logo.png"], [238, "ATX", "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/AT-X_logo.svg/150px-AT-X_logo.svg.png",76,30], [247, "ShinEi-Animation","https://i.stack.imgur.com/b2lcL.png"], [262, "Kadokawa-Pictures-USA","https://i.stack.imgur.com/ZsUDR.gif"], [287, "David-Production","https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/David_Production_Logo.png/320px-David_Production_Logo.png",76,30], [290, "Kinema-Citrus", "https://upload.wikimedia.org/wikipedia/commons/c/c0/Kinema_Citrus_logo.png",76,25], [288, "Kaname-Productions","https://share.wildbook.me/1vyXEPUyUGnAHEnT.webp",73,30], [291, "CoMix-Wave", "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Cwflogo.png/150px-Cwflogo.png"], [292, "AIC-Plus", "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/AIC_logo.png/220px-AIC_logo.png"], [300, "SILVER-LINK", "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/Silver_Link_Logo.svg/220px-Silver_Link_Logo.svg.png"], [309, "GoHands", "https://i.stack.imgur.com/pScIZ.jpg"], [314, "White-Fox", "https://i.stack.imgur.com/lwG1T.png",76,30], [333, "TYO-Animations", "https://i.stack.imgur.com/KRqAp.jpg",76,25], [334, "Ordet", "https://i.stack.imgur.com/evr12.png",76,30], [346, "Hoods-Entertainment","https://i.stack.imgur.com/p7S0I.png"], [352, "Kadokawa-Pictures-Japan","https://i.stack.imgur.com/ZsUDR.gif"], [365, "PoRO", "https://i.stack.imgur.com/3rlAh.png"], [372, "NIS-America-Inc","https://upload.wikimedia.org/wikipedia/en/e/e7/Nis.png"], [376, "Sentai-Filmworks","https://i.stack.imgur.com/JV8R6.png",74,30], [397, "Bridge", "https://i.imgur.com/4Qn4EmK.png"], [418, "Studio-Gokumi", "https://i.stack.imgur.com/w1y22.png"], [436, "AIC-Build", "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/AIC_logo.png/220px-AIC_logo.png"], [437, "Kamikaze-Douga", "https://files.catbox.moe/48mdqh.jpg"], [456, "Lerche", "https://i.stack.imgur.com/gRQPc.png"], [459, "Nitroplus", "https://upload.wikimedia.org/wikipedia/en/thumb/0/09/Nitroplus_logo.png/220px-Nitroplus_logo.png"], [493, "Aniplex-of-America","https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Aniplex_logo.svg/220px-Aniplex_logo.svg.png"], [503, "Nintendo-Co-Ltd","https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Nintendo.svg/220px-Nintendo.svg.png"], [537, "SANZIGEN", "https://i.stack.imgur.com/CkuqH.png",76,30], [555, "Studio-Chizu", "https://i.stack.imgur.com/h2RuH.gif"], [561, "A1-Pictures", "https://i.stack.imgur.com/nBUYo.png",76,30], [569, "MAPPA", "https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/MAPPA_Logo.svg/220px-MAPPA_Logo.svg.png"], [681, "ASCII-Media-Works","https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/ASCII_Media_Works_logo.svg/220px-ASCII_Media_Works_logo.svg.png"], [803, "Trigger", "https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Trigger_Logo.svg/220px-Trigger_Logo.svg.png"], [783, "GKids", "https://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/GKIDS_logo.svg/150px-GKIDS_logo.svg.png"], [839, "LIDENFILMS", "https://upload.wikimedia.org/wikipedia/commons/6/6e/LidenFilms.png",76,30], [858, "Wit-Studio", "https://i.stack.imgur.com/o3Rro.png",76,30], [911, "Passione", "https://i.stack.imgur.com/YyEGg.jpg"], [4418,"8bit", "https://upload.wikimedia.org/wikipedia/commons/a/a6/Eight_Bit_logo.png"], [6069,"Studio-3Hz", "https://i.stack.imgur.com/eD0oe.jpg"], [6071,"Studio-Shuka", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Shuka_studio.jpg"], [6077,"Orange", "https://i.stack.imgur.com/ve9mm.gif"], [6142,"Geno-Studio", "https://upload.wikimedia.org/wikipedia/en/thumb/f/f4/Genostudio.jpg/220px-Genostudio.jpg",76,25], [6145,"Science-SARU", "https://i.stack.imgur.com/zo9Fx.png"], [6148,"NUT", "https://upload.wikimedia.org/wikipedia/commons/b/b0/NUT_animation_studio_logo.png"], [6222,"CloverWorks", "https://i.stack.imgur.com/9Fvr7.jpg"], [6225,"TriF-studio", "https://i.stack.imgur.com/lL85s.png",60,50], [6283,"Studio-Durian", "https://studio-durian.jp/images/ROGO2opa.png"] ] let favStudioString = ""; if(useScripts.CSSfavs){ favStudioString += ` .overview .favourites > .favourites-wrap > div, .overview .favourites > .favourites-wrap > a{ /*make the spaces in the grid even*/ margin-bottom: 0px!important; margin-right: 0px!important; column-gap: 10px!important; } .user .overview{ grid-template-columns: 470px auto!important; } .overview .favourites > .favourites-wrap{ display: grid!important; padding: 0px!important; display: grid; grid-gap: 10px; column-gap: 10px!important; grid-template-columns: repeat(auto-fill,85px); grid-template-rows: repeat(auto-fill,115px); background: rgb(0,0,0,0) !important; width: 470px; } .genre-overview .genre{ display: inline!important; } .genre-overview .genre .name{ font-size: small; } .overview .favourite.studio{ cursor: pointer; min-height: 115px; font-size: 15px; display: grid; grid-gap: 10px; padding: 2px!important; padding-top: 8px!important; background-color: rgba(var(--color-foreground))!important; text-align: center; align-content: center; } .site-theme-dark .overview .favourite.studio{ background-color: rgb(49,56,68)!important; } .preview .favourite.media, .preview .favourite.staff, .preview .favourite.character{ background-color: rgb(var(--color-foreground)); } .overview .favourite.studio::after{ display: inline-block; background-repeat: no-repeat; content:""; margin-left:5px; background-size: 76px 19px; width: 76px; height: 19px; }`; favStudios.forEach(studio => { if(studio[2] !== ""){ favStudioString += `.favourite.studio[href="/studio/${studio[0]}/${studio[1]}"]::after{background-image: url("${studio[2]}");`; if(studio.length === 5){ favStudioString += `background-size: ${studio[3]}px ${studio[4]}px;width: ${studio[3]}px;height: ${studio[4]}px;`; } favStudioString += "}"; } }); } moreStyle.textContent += favStudioString; } if(useScripts.CSScompactBrowse){ moreStyle.textContent += ` .results > .studio{ counter-reset: ranking; } .studio .media-card.isMain{ border-bottom: rgb(var(--color-blue)); border-bottom-width: 1px; border-bottom-style: solid; } .search .results.cover .media-card, .search .results .staff-card, .search-landing .results:not(.table) .media-card{ width: 150px; } .search .results.cover, .search-landing .results:not(.table){ grid-template-columns: repeat(auto-fill,150px); grid-gap: 25px 20px; } .search .results.table{ grid-gap: 12px; } .search .results.table .cover{ height: 81px; width: 54px; } .search .results.table .media-card{ padding: 0px; } .search .results.cover .media-card .cover, .search-landing .results:not(.table) .media-card .cover, .search .results .staff-card .cover{ height: 225px; } .search:not(.other-type) .landing-section:not(.top) .link{ max-width: 1000px; } ` } if(!useScripts.CSSverticalNav && useScripts.slimNav){ moreStyle.textContent += ` #nav.nav{ height: 40px; } ` } if(useScripts.annoyingAnimations){ moreStyle.textContent += ` .media-card .open-editor.circle{ transition: unset; } .media-card:hover .hover-data{ animation: none!important; } .cover.loading::before{ display: none!important; } .activity-entry .like-wrap .users{ transition: none; } .search .results .media-card{ animation: none; }` } if(useScripts.CSSprofileClutter){ moreStyle.textContent += ` .overview .list-stats > .footer{ display: none; } .overview > .section > .desktop:nth-child(2){ display: none; } .overview > .section > .desktop:nth-child(3){ display: none; } .overview > .section > .desktop.favourites{ display: inherit; } ` } if(useScripts.CSSbannerShadow){ moreStyle.textContent += ` .banner .shadow{ display: none; } .banner-content h1.name{ filter: drop-shadow(0px 0px 6px black); } ` } if(useScripts.betterListPreview && !(window.screen.availWidth && window.screen.availWidth <= 1040)){ moreStyle.textContent += ` .home{ grid-template-columns: auto 545px!important; } @media(min-width: 1040px) and (max-width: 1540px){ .page-content > .container{ max-width: 1300px; } .list-preview{ gap: 15px!important; } .home{ grid-template-columns: auto 525px!important; } } #hohListPreview + .list-previews .list-preview-wrap{ display: none; } #hohListPreview + .list-previews .list-preview-wrap:last-child{ display: block; } ` } if(useScripts.CSSgreenManga){ moreStyle.textContent += ` .review-card:hover .banner[data-src*="/media/manga/"] + .content > .header{ color: rgb(var(--color-green)); } .review-card:hover .banner[data-src*="/media/anime/"] + .content > .header{ color: rgb(var(--color-blue)); } .user .review-card:hover .banner[data-src*="/media/anime/"] + .content > .header{ color: rgb(61,180,242); } .activity-markdown a[href^="https://anilist.co/manga/"], .activity-markdown a[href^="https://anilist.co/search/manga"], .activity-markdown a[href^="/manga/"], .reply-markdown a[href^="https://anilist.co/manga/"], .reply-markdown a[href^="https://anilist.co/search/manga"], .reply-markdown a[href^="/manga/"]{ color: rgba(var(--color-green)); } .hohDataChange a[href^="/manga/"]{ color: rgba(var(--color-green)); } .activity-manga_list > div > div > div > div > .title, .hohPinned .list .title[href^="/manga/"]{ color: rgba(var(--color-green))!important; } .media .relations .cover[href^="/manga/"] + div div{ color: rgba(var(--color-green)); } .media .relations .cover[href^="/anime/"] + div div{ color: rgba(var(--color-blue)); } .media .relations .cover[href^="/manga/"]{ border-bottom-style: solid; border-bottom-color: rgba(var(--color-green)); border-bottom-width: 2px; } .character-wrap .role-card:hover .title[href^="/anime/"]{ color: rgb(var(--color-blue)) !important; } .character-wrap .role-card .title[href^="/manga/"], .character-wrap .role-card:hover .title[href^="/manga/"], .media-roles .media .content:hover[href^="/manga/"] .name{ color: rgb(var(--color-green)) !important; } .media .relations.small .cover[href^="/manga/"]::after{ position:absolute; left:1px; bottom:3px; content:""; border-style: solid; border-color: rgba(var(--color-green)); border-width: 2px; } .media .relations .cover[href^="/anime/"]{ border-bottom-style: solid; border-bottom-color: rgba(var(--color-blue)); border-bottom-width: 2px; } .media .relations .cover div.image-text{ margin-bottom: 2px!important; border-radius: 0px!important; padding-bottom: 8px!important; padding-top: 8px!important; font-weight: 500!important; } .media-embed[data-media-type="manga"] .title{ color: rgba(var(--color-green)); } .media-manga .actions .list{ background: rgba(var(--color-green)); } .media-manga .sidebar .review.button{ background: rgba(var(--color-green)); } .media-manga .container .content .nav .link{ color: rgba(var(--color-green)); } .hover-manga:hover{ color: rgba(var(--color-green))!important; } .home .recent-reviews + div .cover[href^="/manga/"] + .content .info-header{ color: rgba(var(--color-green)); } .recommendations-wrap .recommendation-pair-card a[href^="/manga/"]:hover .title{ color: rgba(var(--color-green)); } ` } if(useScripts.CSSexpandFeedFilters && (!useScripts.mobileFriendly)){ moreStyle.textContent += ` .home .activity-feed-wrap .section-header .el-dropdown-menu, .user .activity-feed-wrap .section-header .el-dropdown-menu{ background: none; position: static; display: inline !important; margin-right: 15px; box-shadow: none !important; } .home .activity-feed-wrap .section-header .el-dropdown-menu__item, .user .activity-feed-wrap .section-header .el-dropdown-menu__item{ font-weight: normal; color: rgb(var(--color-text-lighter)); margin-left: -2px !important; display: inline; font-size: 1.2rem; padding: 4px 15px 5px 15px; border-radius: 3px; transition: .2s; background: none; } .home .activity-feed-wrap .section-header .el-dropdown-menu__item.active, .user .activity-feed-wrap .section-header .el-dropdown-menu__item.active{ background: none!important; color: rgb(var(--color-blue)); } .home .activity-feed-wrap .section-header .el-dropdown-menu__item:hover, .user .activity-feed-wrap .section-header .el-dropdown-menu__item:hover{ background: none!important; color: rgb(var(--color-blue)); } .home .feed-select .feed-filter, .user .section-header > .el-dropdown > .el-dropdown-selfdefine{ display: none; } ` } if(useScripts.showRecVotes){ moreStyle.textContent += ` .recommendation-card .rating-wrap{ opacity: 1; }` } if(useScripts.CSSverticalNav && (!useScripts.mobileFriendly)){ moreStyle.textContent += ` .media .sidebar .tags .add-icon{ opacity: 1; } #hohListPreview .content{ width: 240px; } .user .overview > .section:first-child{ max-width: 555px; } .user .overview{ grid-template-columns: calc(25% + 200px) 55% !important;; } .media .activity-entry .cover{ display: none; } .media .activity-entry .embed .cover{ display: inline; } .media .activity-entry .details{ min-width: 500px; margin-left: 30px; } .media .activity-entry .details > .avatar{ position: absolute; top: 0px; left: 5px; } .media .activity-entry .list{ min-height: 55px !important; } .media .activity-entry .replies .count, .media .activity-entry .replies .count + svg{ color: rgb(var(--color-red)); } #app .tooltip.animate-position{ transition: opacity .26s ease-in-out,transform 0s ease-in-out; } .studio .hohThemeSwitch{ top: 30px; } .stats-wrap .stat-cards{ grid-gap: 20px; grid-template-columns: repeat(auto-fill, 300px); } .stats-wrap .stat-cards.has-images{ grid-gap: 20px; grid-template-columns: repeat(auto-fill, 600px); } .stats-wrap .stat-cards .stat-card{ box-shadow: none; padding: 10px; padding-bottom: 0px; } .stats-wrap .stat-cards .stat-card > .title{ font-size: 2rem; } .stats-wrap .stat-cards .stat-card.has-image > .wrap > .image{ margin-top: -45px; height: 100px; width: 70px; } .stats-wrap .highlight .value{ font-size: 2rem; } .stats-wrap .highlight .circle{ box-shadow: none; height: 35px; width: 35px; } .stats-wrap .highlights{ grid-gap: 30px 0px; margin-left: 1%; width: 98%; margin-top: 0px; grid-template-columns: repeat(6,1fr); margin-bottom: 20px; } .stats-wrap .stat-cards .stat-card.has-image > .title{ margin-left: 75px; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap{ padding: 5px 15px; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap .relations{ transition: transform .1s ease-in-out; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap .relation-card{ margin-right: 5px; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap .relation-card .image{ width: 70px; height: 100px; } .stats-wrap .stat-cards .stat-card .count.circle{ top: 12px; right: 12px; height: 20px; width: 20px; } .text div.markdown{ max-height: 660px; } .stats-wrap .stat-cards .stat-card .inner-wrap .detail .value{ font-size: 1.4rem; font-weight: 700; color: rgb(var(--color-blue)); } .stats-wrap .stat-cards .stat-card .inner-wrap .detail .label{ font-size: 1.1rem; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap .button{ box-shadow: none; top: 40px; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap .button.previous{ left: 18px; } .stats-wrap .stat-cards .stat-card .inner-wrap .relations-wrap .button.next{ right: 18px; } .user .desktop .genre-overview.content-wrap{ font-size: 1.3rem; } .forum-thread .comment-wrap{ margin-bottom: 10px!important; } .forum-thread .comment-wrap .collapse{ opacity: 1; border-left: 1px; border-left-style: solid; justify-content: left; } .forum-thread .comment-wrap .collapse .collapse-bar{ width: 8px; border-radius: 0px 8px 8px 0px; } .forum-feed .overview-header{ color: rgba(var(--color-blue))!important; font-size: 2rem!important; } .forum-feed .thread-card{ margin-bottom: 10px!important; } .forum-feed .filter-group > a{ margin-bottom: 2px!important; } .activity-entry > .wrap > .actions{ bottom: 0px!important; } .page-content > .container, .notifications-feed, .page-content > .studio{ margin-top: 25px !important; } .logo{ margin-left: -60px!important; /*the compact layout uses more of the space to the side, so we line up the logo to the left*/ } .footer{ margin-top: 0px !important; /*less space wasted over the footer*/ } .hohUserRow td, .hohUserRow th{ top: 44px; } .container{ padding-left: 10px; padding-right: 0px; } .hide{ top: 0px!important; /*stop that top bar from jumping all over the place*/ } .notification{ margin-bottom: 10px!important; } /*Dropdown menus are site theme based*/ .quick-search .el-select .el-input .el-input__inner, .quick-search .el-select .el-input.is-focus .el-input__inner, .el-select-dropdown, .el-dropdown-menu, .el-dropdown-menu__item--divided::before{ background: rgba(var(--color-foreground)); } .el-select-dropdown__item.hover, .el-select-dropdown__item:hover{ background: rgba(159, 173, 189, .2); } .el-dropdown-menu__item--divided{ border-color: rgba(var(--color-background)); } .el-select-group__wrap:not(:last-of-type)::after{ background: rgba(var(--color-foreground)); } .el-popper[x-placement^="bottom"] .popper__arrow, .el-popper[x-placement^="bottom"] .popper__arrow::after{ border-bottom-color: rgba(var(--color-foreground)); } .el-popper[x-placement^="top"] .popper__arrow, .el-popper[x-placement^="top"] .popper__arrow::after{ border-top-color: rgba(var(--color-foreground)); } .wrap .link.router-link-exact-active.router-link-active, .nav .link.router-link-exact-active.router-link-active, .nav .browse-wrap.router-link-exact-active.router-link-active{ background: rgba(var(--color-foreground-grey-dark)); color: rgba(var(--color-blue)); } /*--------------VERTICAL-NAV----------------*/ /*modified code from Kuwabara: https://userstyles.org/styles/161017/my-little-anilist-theme-can-not-be-this-cute*/ .hohDismiss{ transform: translate(17.5px,-40px); margin-left: 0px!important; } #app > .nav { border-top: none !important; } #app div#nav.nav{ width: 65px; height: 100%!important; position: fixed!important; top: 0!important; left: 0!important; transition: none!important; } .nav .wrap .links{ font-size: 1rem; height: 355px!important; margin-left: 0px; padding-left: 0px; width: 65px; min-width: 65px !important; flex-direction: column; } #app #nav.nav .wrap .links a.link{ width: 65px; padding: 5px 0px; margin-bottom: 10px; text-align: center; height: unset!important; transition: 0.3s; padding-left: 0px!important; } #app #nav.nav .browse-wrap{ text-align: center; margin-bottom: 10px; padding-bottom: 5px; padding-top: 5px; } .browse-wrap.subMenuContainer .dropdown{ display: none; } #app #nav.nav .browse-wrap .dropdown{ z-index: 2000; } div#nav.nav .link.router-link-exact-active.router-link-active, #nav > div > div.links > a:hover{ border-bottom-width: 0px!important; } .nav .wrap .links > .link:hover, .nav .wrap .links div .link:hover, .nav .browse-wrap:hover{ background: rgba(var(--color-blue),0.1); } .nav .wrap .links .link::before{ display: block; content: ""; height: 24px!important; width: 65px!important; background-size: 24px; margin-left: 0!important; margin-bottom: 3px!important; background-repeat: no-repeat; background-position: center; filter: grayscale(100%) brightness(1.4); } #app #nav.nav .subMenuContainer > a.link[href*="/user/"]{ height: 48px !important; } .nav .link[href*="/user/"]:hover::before, .nav .link[href^="/forum/"]:hover::before, .nav .link[href="/login"]::before, .nav .link[href="/social"]::before, .nav .link[href^="/search/"]:hover::before, .nav .link[href^="/home"]:hover::before, .site-theme-contrast .nav .link.router-link-active::before{ filter: grayscale(0%); } .logo-full{ display: none; } .nav .link[href="/home"]::before, .nav .link[href="/login"]::before{ background: url('data:image/svg+xml;utf8,'); } .nav .link[href^="/user/"]::before, .nav .link[href="/social"]::before{ background: url('data:image/svg+xml;utf8,'); } .nav .link[href*="/animelist"]::before, .nav .link[href*="/mangalist"]::before{ background: url('data:image/svg+xml;utf8,'); } .nav .link[href^="/search/"]::before{ background: url('data:image/svg+xml;utf8,'); } .nav .link[href*="/forum"]::before{ background: url('data:image/svg+xml;utf8,'); } .nav .link[href="/signup"]::before{ background: url('data:image/svg+xml;utf8,+'); } .landing .link{ margin-left: unset!important; } #nav > div.wrap.guest > div.links a.link.login, #nav > div.wrap.guest > div.links a.link.signup{ padding: 5px 0px!important; } #app{ margin-top: 0; padding-left: 65px; } :root { --color-nav-hoh: #2b2d42; } .site-theme-dark{ --color-nav-hoh: #152232; } #nav.transparent{ background: var(--color-nav-hoh); } .nav .user{ position: fixed; top: 0; display: grid; grid-gap: 40px; width: 65px; grid-template-rows: 50px 20px; } .nav .user-wrap .dropdown{ left: -2px; z-index: 2000; } .nav .user-wrap .dropdown::before{ left: 16px; } .search .dropdown.el-dropdown{ font-size: 10px; } .search .el-dropdown-link svg{ width: 65px; height: 23px; padding: 5px 0; background: rgba(0, 0, 0, 0.2); } .nav .search{ width: 65px; margin: 0; text-align: center; position: fixed; top: 56px; } .quick-search-results{ z-index: 999!important; top: 136px!important; } .user .avatar + .chevron{ opacity: 0!important; } .hide{ top:0px!important; } @media(max-width: 1040px){ #app{ padding-left: 0px; } .container{ padding-left: 20px; padding-right: 20px; } .footer > .container{ position: relative; } .hohColourPicker{ top: 0px; } .hohDismiss{ display: none; } .hohNotificationCake{ margin-left: -9px; } } /*-------------------*/ ::selection{ background: rgba(var(--color-blue),0.4); } ::-webkit-selection{ background: rgba(var(--color-blue),0.4); } ::-moz-selection{ background: rgba(var(--color-blue),0.4); } ::-webkit-scrollbar{ width: 7px; height: 7px; } ::-webkit-scrollbar-thumb{ background: #4e4e4e!important; } .user .header-wrap{ position: sticky; top: -332px; z-index: 100; } .list-stats{ margin-bottom:0px!important; } .activity-feed-wrap{ margin-top:25px; } .logo{ position: absolute; margin-bottom: -500px; display:none!important; margin-left: 0px !important; } /*home stuff*/ .reply .header a.name[href="/user/Taluun/"]::after{ content: "Best Friend"; margin-left:10px; padding:3px; border-radius:2px; animation-duration: 20s; animation-iteration-count: infinite; animation-name: rainbow; animation-timing-function: ease-in-out; color: rgba(var(--color-white)); } .details > .donator-badge{ left:105px!important; padding:2px!important; top: 100%!important; -ms-transform: translate(0px, -34px); -webkit-transform: translate(0px, -34px); transform: translate(0px, -34px); } .activity-text > div > div > div > .donator-badge{ position:relative!important; display:inline-block!important; left:0px!important; top:0px!important; -ms-transform: translate(0px, 0px); -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); } .activity-replies{ margin-top:5px!important; margin-left:30px!important; margin-right:0px!important; } .page-content > .container > .activity-entry .activity-replies{ margin-top: 15px !important; } .activity-entry{ margin-bottom: 10px!important; } .list-preview{ grid-gap: 10px!important; padding:0px!important; background: rgb(0,0,0,0)!important; } .home{ grid-column-gap: 30px!important; margin-top: 20px!important; grid-template-columns: auto 470px!important; } .activity-feed .reply{ padding: 8px!important; margin-bottom: 5px!important; } .list .details{ padding-left:10px!important; padding-top:5px!important; padding: 10px 16px!important; padding-bottom: 7px !important; } .search{ margin-top:0px!important; } .emoji-spinner{ display:none!important; } .wrap{ border-radius: 2px!important; } .name{ margin-left: 0px!important; } .activity-text > div > div > div > .name, .activity-message > div > div > div > .name{ margin-left: 12px!important; } .button{ margin-right: 5px!important; } .actions{ margin-bottom: 5px!important; } .status{ display: inline-block!important; } .avatar{ display: block!important; } /*https://anilist.co/activity/29333544*/ .activity-entry .header a:nth-child(1){ display: inline-block!important; } .wrap > .list{ min-height: 80px!important; grid-template-columns: 60px auto!important; } .popper__arrow{ display: none!important; } .media-preview{ grid-gap: 10px!important; padding: 0px!important; background: rgb(0,0,0,0)!important; } .media-preview-card{ display: inline-grid!important; } .replies > .count{ color: rgba(var(--color-blue)); } .action.likes{ color: unset; } .like-wrap > .button:hover{ color: rgba(var(--color-red)); } .replies > svg:nth-child(2){ color: rgba(var(--color-blue)); } .actions{ cursor: default; } .markdown-editor > [title="Image"], .markdown-editor > [title="Youtube Video"], .markdown-editor > [title="WebM Video"]{ color: rgba(var(--color-red)); } .markdown-editor > div > svg{ min-width: 1em!important; } .feed-select .toggle > div.active{ color: rgba(var(--color-blue))!important; } .home .details .status:first-letter, .social .details .status:first-letter, .activity-entry .details .status:first-letter{ text-transform: lowercase; } .activity-edit .markdown-editor, .activity-edit .input{ margin-bottom: 10px!important; } .activity-edit .actions{ margin-bottom: 25px!important; } .page-content .container .home.full-width{ grid-template-columns: unset !important; } .activity-text .text { border-left: solid 5px rgba(var(--color-blue)); } .section-header{ padding-left:0px!important; } .cover[href="/anime/440/Shoujo-Kakumei-Utena/"] + .details{ border-color: #eb609e; border-width: 4px; border-style: solid; border-left-width: 0px; } .sticky .avatar, .sticky .body-preview, .sticky .categories, .sticky .name{ display: none!important; } .search > .filter, .search > .preview{ margin-top: 20px; } .home .media-preview-card:nth-child(5n+3) .content{ border-radius: 3px 0 0 3px; left: auto !important; right: 100%; text-align: right; } .home .media-preview-card:nth-child(5n+3) .content .info{ right: 12px; } .link:hover .hohSubMenu{ color: rgb(var(--color-text-bright)); } .hohSubMenu{ position: absolute; left: 64px; top: 0px; display: none; background: #152232; border-top-right-radius: 3px; border-bottom-right-radius: 3px; padding: 2px 0px; } .hohSubMenuLink{ display: block; margin-left: 3px; padding: 4px; font-size: 130%; text-align: left; color: rgb(160, 177, 197); z-index: 1; position: relative; } .hohSubMenuLink:visited{ color: rgb(160, 177, 197); } @media(max-width: 1540px){ .container{ max-width: 1200px; } } .media .activity-feed .donator-badge{ transform: translate(-70px,-25px); } .media-page-unscoped .description{ color: rgb(var(--color-text)); } .user .list.small .avatar{ display: none!important; } .el-slider[aria-valuemin="1950"] .el-slider__runway::after{ content: ""; width: 101%; margin-left: -0.3%; height: 20px; display: block; /*update stroke-dasharray every few years*/ background-image: url('data:image/svg+xml;utf8,00LAMUATOM'); background-size: cover; } .user .el-slider[aria-valuemin="1950"] .el-slider__runway::after{ background-size: contain; } .medialist.table .row{ border-bottom: solid; border-bottom-width: 1px; border-color: rgb(var(--color-text),0.1); } .markdown .markdown-spoiler.spoiler-visible i.hide-spoiler{ right: -10px; } `; if(useScripts.rightToLeft || useScripts.rightSideNavbar){ moreStyle.textContent += ` #app{ padding-right: 65px; padding-left: 0px!important; } .page-content{ padding-left: 5px; } #app div#nav.nav{ left: inherit !important; right: 0px; } #app div#nav.nav .links{ border-left: none; border-right: 1px solid hsla(0,0%,93.3%,.16); } .subMenuContainer{ margin-left: -172px; } .subMenuContainer > .link{ margin-left: 86px; } .hohSubMenu{ left: 0px; width: 86px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; } .hohColourPicker{ right: 70px; } #app .nav .user-wrap .dropdown{ left: unset; right: 0px; } #app .nav .user-wrap .dropdown::before{ left: unset; right: 16px; } .nav .browse-wrap .dropdown{ left: -200px; } .user .header-wrap{ margin-left: -5px; }` } } if(useScripts.CSSdecimalPoint){ moreStyle.textContent += ` .medialist.POINT_10_DECIMAL .score[score="10"]::after, .medialist.POINT_10_DECIMAL .score[score="9"]::after, .medialist.POINT_10_DECIMAL .score[score="8"]::after, .medialist.POINT_10_DECIMAL .score[score="7"]::after, .medialist.POINT_10_DECIMAL .score[score="6"]::after, .medialist.POINT_10_DECIMAL .score[score="5"]::after, .medialist.POINT_10_DECIMAL .score[score="4"]::after, .medialist.POINT_10_DECIMAL .score[score="3"]::after, .medialist.POINT_10_DECIMAL .score[score="2"]::after, .medialist.POINT_10_DECIMAL .score[score="1"]::after{ margin-left: -4px; content: ".0"; } ` } if(useScripts.CSSdarkDropdown){ moreStyle.textContent += ` .site-theme-dark .quick-search.el-select .el-input.el-input__inner, .site-theme-dark .quick-search .el-select .el-input.is-focus .el-input__inner, .site-theme-dark .el-select-dropdown, .site-theme-dark .el-dropdown-menu, .site-theme-dark .el-dropdown-menu__item--divided::before{ background: rgba(17, 22, 29); } .site-theme-dark .el-select-group__wrap:not(:last-of-type)::after{ background: rgba(17, 22, 29); } .site-theme-dark .el-popper[x-placement^="bottom"] .popper__arrow, .site-theme-dark .el-popper[x-placement^="bottom"] .popper__arrow::after{ border-bottom-color: rgba(17, 22, 29); opacity: 1; } .site-theme-dark .el-popper[x-placement^="top"] .popper__arrow, .site-theme-dark .el-popper[x-placement^="top"] .popper__arrow::after{ border-top-color: rgba(17, 22, 29); opacity: 1; } ` } if(useScripts.CSSsmileyScore){ moreStyle.textContent += ` .fa-frown{ color: red; } .fa-smile{ color: green; } .fa-meh{ color: rgb(var(--color-orange)); } ` } if(useScripts.limitProgress8){ moreStyle.textContent += ` .home:not(.full-width) .media-preview-card:nth-child(n+9){ display:none!important; } ` } else if(useScripts.limitProgress10){ moreStyle.textContent += ` .home:not(.full-width) .media-preview-card:nth-child(n+11){ display:none!important; } ` } if(parseInt(useScripts.forumPreviewNumber) === 0){ moreStyle.textContent += ` .home .recent-threads{ display: none!important; } ` } if(useScripts.SFWmode){ moreStyle.textContent += ` .forum-thread .no-comments::after{ content: "No replies yet"; visibility: visible; margin-left: -250px; } .forum-thread .no-comments{ visibility: hidden; } .list-preview .cover, .favourites .cover{ background-image: none!important; } .logo{ display: none!important; } .user .banner, .media .banner{ background-image: none!important; height: 200px; } .review-card .banner{ display: none; } .home .review-card,.home .review-card .content{ min-height: 120px; } .donator-badge{ animation-name: none!important; display: none; } .list-editor .header, .review .banner{ background-image: none !important; } .list-editor .cover{ display: none; } .emoji-spinner{ display:none!important; } .avatar[style*=".gif"]{ background-image: none!important; } img[src*=".gif"], video, .youtube{ filter: contrast(0); } img[src*=".gif"]:hover, video:hover, .youtube:hover{ filter: contrast(1); } .activity-entry .cover{ filter: contrast(0.1) brightness(0.5); } .activity-entry .cover:hover{ filter: none; } .activity-markdown img{ max-width: 30%; } .recent-reviews + div{ display: none; } .favourite.studio::after{ background-image: none!important; } .hohDownload{ display: none; } .history-day.lv-1{ background: rgba(var(--color-green),.2)!important; } .history-day.lv-3{ background: rgba(var(--color-green),.5)!important; } .history-day.lv-5{ background: rgba(var(--color-green),.9)!important; } .history-day.lv-7{ background: rgba(var(--color-green))!important; } .history-day.lv-9{ background: rgba(var(--color-green))!important; } .percentage-bar{ display: none!important; } .medialist.compact .cover .image, .medialist.table .cover .image{ opacity: 0; } .hohCencor .header img.cover, .hohCencor .relations .cover, .hohCencor .character .cover{ filter: contrast(0); } .hohCencor .header img.cover:hover, .hohCencor .relations .cover:hover, .hohCencor .character .cover:hover{ filter: contrast(1); } .categories > span{ position: relative; } .category[href="/forum/recent?category=1"], .category[href="/forum/recent?category=1"]:hover{ color: rgb(78, 163, 230); } .category[href="/forum/recent?category=1"]:hover::after{ color: rgba(26,27,28,.6); } .category[href="/forum/recent?category=1"]::after{ content: "View"; color: #fff; left: 20px; position: absolute; } .category[href="/forum/recent?category=2"], .category[href="/forum/recent?category=2"]:hover{ color: rgb(76, 175, 80); } .category[href="/forum/recent?category=2"]:hover::after{ color: rgba(26,27,28,.6); } .category[href="/forum/recent?category=2"]::after{ content: "Read"; color: #fff; left: 20px; position: absolute; } .avatar[style*="/default.png"]{ background-image: url("https://i.stack.imgur.com/TRuSD.png")!important; } `; if(useScripts.CSSverticalNav){ moreStyle.textContent += ` #nav .link[href*="/animelist"]{ visibility: hidden; } #nav .link[href*="/animelist"]::after{ content: "View List"; visibility: visible; left: 0; right: 0; position: absolute; margin-left: auto; margin-right: auto; } #nav .link[href*="/animelist"]::before{ visibility: visible; } #nav .link[href*="/mangalist"]{ visibility: hidden; } #nav .link[href*="/mangalist"]::after{ content: "Read List"; visibility: visible; left: 0; right: 0; position: absolute; margin-left: auto; margin-right: auto; } #nav .link[href*="/mangalist"]::before{ visibility: visible; }` } } if(useScripts.cleanSocial){ moreStyle.textContent += ` .social .activity-feed + div{ display: flex; flex-direction: column; } .social .activity-feed + div > div:first-child{ order: 2; margin-top: 25px; }` } if(useScripts.statusBorder){ moreStyle.textContent += ` .home .activity-text .wrap{ border-right-width: 0px !important; margin-right: 0px !important; }` } if(useScripts.rightToLeft){ moreStyle.textContent += ` .favourites-wrap.anime, .favourites-wrap.manga, .favourites-wrap.staff, .favourites-wrap.characters, .favourites-wrap.studios{ direction: rtl; } .genre-overview .genres{ direction: rtl; } .genre-overview .percentage-bar{ direction: rtl; } .milestones{ direction: rtl; } .milestones + .progress{ transform: scale(-1); } .list-preview{ direction: rtl; } #hohListPreview .list-preview{ width: 100%; } .media-preview-card .hohFallback, .media-preview-card .content{ direction: ltr; } .media-preview-card .content meter{ direction: rtl; } .banner-content{ direction: rtl; } .banner-content .actions{ margin-right: auto; margin-left: inherit!important; } #hohListPreview .info-left .content { border-radius: 3px 0 0 3px; left: auto !important; right: 100%; text-align: right; } #app .home{ grid-template-columns: 470px auto !important; } .home > .activity-feed-wrap + div{ grid-row: 1; } .recent-reviews .review-wrap{ direction: rtl; } .recent-reviews .review-card{ direction: ltr; } .recent-reviews + div .media-preview{ direction: rtl; } #app > .progress{ transform: scale(-1); } .hohColourPicker{ margin-right: 20px; } .home .activity-feed-wrap .section-header{ direction: rtl; } .home .activity-feed-wrap .section-header .feed-select{ margin-right: auto; margin-left: inherit; } .home .activity-feed-wrap .section-header .feed-select .el-dropdown{ direction: ltr; margin-left: 20px; } .hohSubMenuLink{ text-align: right; } .quick-search .input{ direction: rtl; } .quick-search .results{ direction: rtl; } .quick-search .results .result{ direction: ltr; } .quick-search .results .result-col h3.title{ right: 0px; } .home .section-header{ text-align: right; } .home .list-previews .section-header{ direction: rtl; } .user .nav-wrap{ direction: rtl; } .user .medialist{ direction: rtl; } .medialist .filters .filter-group:first-child > span .count{ left: 0px; right: inherit; } .medialist.table .entry .title a{ margin-left: auto; margin-right: 10px; direction: ltr; } .medialist .lists > .actions{ left: 0px; right: inherit; } .list-editor-wrap .header .content{ direction: rtl; } ` } if(useScripts.partialLocalisationLanguage === "Português" || useScripts.partialLocalisationLanguage === "Español"){//https://github.com/hohMiyazawa/Automail/pull/123 moreStyle.textContent += ` #app #nav.nav .wrap .links a.link{ text-transform: none; }` } };initCSS(); documentHead.appendChild(moreStyle); let customStyle = create("style"); let currentUserCSS = ""; customStyle.id = "customCSS-automail-styles"; customStyle.type = "text/css"; documentHead.appendChild(customStyle); let aliases = new Map(); shortRomaji.concat( JSON.parse( localStorage.getItem("titleAliases") ) || [] ).forEach(alias => { let matches = alias[0].match(/^\/(anime|manga)\/(\d+)\/$/); if(matches){ aliases.set(parseInt(matches[2]),alias[1]) } }); //end "conditionalStyles.js" //begin "localisation.js" const languageFiles = { "English": { "info": { "language": "English", "language_english": "English", "locale": "en-UK", "fallback": [], "maintainer": "hoh", "maintainer_link": "https://anilist.co/user/hoh/", "discussion_link": "", "notes": "This is the default language of Automail. This key should have all the translation keys, while other translations don't have to. I'm not a native speaker, but I try to stick to British English here (feel free to britpick!). You can make translation files for other version of English too if you want, name it something like 'English (US)', and put 'English' in the fallback array. You need only include the keys that are different." }, "keys": { "$meta_scriptDescription": "Extra parts for Anilist.co", "$loading": "Loading...", "$searching": "Searching...", "$load_more": "Load More", "$time_now": "Just now", "$time_1second": "1 second ago", "$time_Msecond": "{0} seconds ago", "$time_1minute": "1 minute ago", "$time_Mminute": "{0} minutes ago", "$time_1hour": "1 hour ago", "$time_Mhour": "{0} hours ago", "$time_1day": "1 day ago", "$time_Mday": "{0} days ago", "$time_1week": "1 week ago", "$time_Mweek": "{0} weeks ago", "$time_1month": "1 month ago", "$time_Mmonth": "{0} months ago", "$time_1year": "1 year ago", "$time_Myear": "{0} years ago", "$time_medium_second": "second", "$time_medium_minute": "minute", "$time_medium_hour": "hour", "$time_medium_day": "day", "$time_medium_week": "week", "$time_medium_month": "month", "$time_medium_year": "year", "$time_medium_Msecond": "seconds", "$time_medium_Mminute": "minutes", "$time_medium_Mhour": "hours", "$time_medium_Mday": "days", "$time_medium_Mweek": "weeks", "$time_medium_Mmonth": "months", "$time_medium_Myear": "years", "$time_short_second": "s", "$time_short_minute": "m", "$time_short_hour": "h", "$time_short_day": "d", "$time_short_week": "w", "$time_short_month": "m", "$time_short_year": "y", "$language_English": "English", "$language_German": "German", "$language_Italian": "Italian", "$language_Spanish": "Spanish", "$language_French": "French", "$language_Korean": "Korean", "$language_Portuguese": "Portuguese", "$language_Hebrew": "Hebrew", "$language_Hungarian": "Hungarian", "$language_Chinese": "Chinese", "$language_Japanese": "Japanese", "$language_Arabic": "Arabic", "$language_Filipino": "Filipino", "$language_Catalan": "Catalan", "$language_Polish": "Polish", "$language_Norwegian": "Norwegian", "$default_filename": "File from Anilist.co", "$generic_anime": "Anime", "$generic_manga": "Manga", "$page": "Page {0}", "$dubMarker_notice": "{0} dub exists", "$button_submit": "Submit", "$button_search": "Search", "$button_run": "Run", "$button_add": "Add", "$button_reset": "Reset", "$button_resetAll": "Reset all", "$button_defaultSettings": "Default Settings", "$button_next": "Next →", "$button_previous": "← Previous", "$button_refresh": "Refresh", "$button_edit": "Edit", "$button_publish": "Publish", "$button_cancel": "Cancel", "$placeholder_status": "Write a status...", "$placeholder_reply": "Write a reply...", "$placeholder_message": "Write a message...", "$placeholder_forum": "Write a forum post...", "$forumMedia_backlink": "Add a link back to a work's database page on its forum feed", "$settings_title": "Automail Settings", "$notImplemented": "Sorry, not implemented yet", "$settings_version": "Version: ", "$settings_homepage": "Homepage: ", "$settings_repository": "Repository: ", "$settings_moreInfo_tooltip": "More info", "$settings_category_Notifications": "Notifications", "$settings_category_Feeds": "Feeds", "$settings_category_Forum": "Forum", "$settings_category_Lists": "Lists", "$settings_category_Profiles": "Profiles", "$settings_category_Stats": "Stats", "$settings_category_Media": "Media", "$settings_category_Navigation": "Navigation", "$settings_category_Browse": "Browse", "$settings_category_Script": "Script", "$settings_category_Login": "Login", "$settings_category_Newly Added": "Newly Added", "$settings_button_export": "Export settings", "$settings_export_description": "Might come in handy to keep a backup if you do stuff like wiping your browser cache/storage, which will wipe your Automail settings too", "$settings_import": "Import settings:", "$settings_experimental_suffix": "[EXPERIMENTAL]", "$settings_partialLocalisationLanguage_description": "Automail language", "$settings_CSSadd": "Add custom CSS to your profile. This will be visible to others with the script.", "$settings_CSSlinkTip": "(You can also use a direct link to a stylesheet)", "$settings_pinnedActivity": "Add a pinned activity to your profile", "$settings_notificationDotColour": "Notification Dot Colours", "$setting_notifications": "Improve notifications", "$setting_moreStats": "Show an additional tab on the stats page", "$setting_compare": "Replace the native comparison feature", "$setting_CSSsmileyScore": "Give smiley ratings distinct colours", "$setting_tweets": "Embed linked tweets", "$setting_CSSgreenManga": "Green titles for manga", "$setting_CSSbannerShadow": "Remove banner shadows", "$setting_CSSmobileTags": "Don't hide tag voting from media pages on mobile", "$setting_infoTable": "Use a two-column table layout for info on media pages", "$setting_reinaDark": "Add a High Contrast Dark site theme [by Reina]", "$setting_MALserial": "Add MAL serialisation info to manga", "$setting_MALscore": "Add MAL scores to media", "$setting_MALrecs": "Add MAL recs to media", "$cssTooBig": "Custom CSS is over 1MB. Make it smaller, or use a link instead.", "$jsonTooBig": "Profile JSON is over 1MB", "$debug_tip": "(Hey, it would be nice if you include this file when you report bugs. Makes my life easier)", "$profileBackground_help1": "Set a profile background, examples:", "$profileBackground_help2": "Tip: Use a colour with transparency, to work better with both light and dark themes. Example:", "$profileBackground_help3": "Tip2: Do you want a faded image, staying fixed in place, and filling the screen? This is how:", "$mediaStatus_current": "current", "$mediaStatus_watching": "watching", "$mediaStatus_reading": "reading", "$mediaStatus_completed": "completed", "$mediaStatus_completedWatching": "completed", "$mediaStatus_completedReading": "completed", "$mediaStatus_repeating": "repeating", "$mediaStatus_rewatching": "rewatching", "$mediaStatus_rereading": "rereading", "$mediaStatus_paused": "paused", "$mediaStatus_dropped": "dropped", "$mediaStatus_planning": "planning", "$mediaStatus_planning_time": "planned {0}", "$mediaReleaseStatus_finished": "Finished", "$mediaReleaseStatus_releasing": "Releasing", "$mediaReleaseStatus_notYetReleased": "Not Yet Released", "$mediaReleaseStatus_cancelled": "Cancelled", "$mediaReleaseStatus_hiatus": "Hiatus", "$mediaReleaseStatusManga_finished": "Finished", "$mediaReleaseStatusManga_releasing": "Releasing", "$mediaReleaseStatusManga_notYetReleased": "Not Yet Released", "$mediaReleaseStatusManga_cancelled": "Cancelled", "$mediaReleaseStatusManga_hiatus": "Hiatus", "$mediaReleaseStatusAnime_finished": "Finished", "$mediaReleaseStatusAnime_releasing": "Releasing", "$mediaReleaseStatusAnime_notYetReleased": "Not Yet Released", "$mediaReleaseStatusAnime_cancelled": "Cancelled", "$mediaReleaseStatusAnime_hiatus": "Hiatus", "$listActivity_MreadChapter": "read chapter {0} of ", "$listActivity_MwatchedEpisode": "watched episode {0} of ", "$listActivity_MreadChapter_known": "read chapter {0}", "$listActivity_MwatchedEpisode_known": "watched episode {0}", "$listActivity_planningManga": "plans to read ", "$listActivity_planningAnime": "plans to watch ", "$listActivity_planningManga_known": "plans to read", "$listActivity_planningAnime_known": "plans to watch", "$listActivity_completedManga": "completed ", "$listActivity_completedAnime": "completed ", "$listActivity_completedManga_known": "completed", "$listActivity_completedAnime_known": "completed", "$listActivity_repeatedManga": "reread ", "$listActivity_repeatedAnime": "rewatched ", "$listActivity_repeatedManga_known": "reread", "$listActivity_repeatedAnime_known": "rewatched", "$listActivity_pausedManga": "paused reading ", "$listActivity_pausedAnime": "paused watching ", "$listActivity_pausedManga_known": "paused reading", "$listActivity_pausedAnime_known": "paused watching", "$listActivity_droppedManga": "dropped ", "$listActivity_droppedAnime": "dropped ", "$listActivity_droppedManga_known": "dropped", "$listActivity_droppedAnime_known": "dropped", "$listActivity_MdroppedManga": "dropped {0} of ", "$listActivity_MdroppedAnime": "dropped {0} of ", "$listActivity_MdroppedManga_known": "dropped {0}", "$listActivity_MdroppedAnime_known": "dropped {0}", "$listActivity_MrepeatingManga": "reread chapter {0} of ", "$listActivity_MrepeatingAnime": "rewatched episode {0} of ", "$listActivity_MrepeatingManga_known": "reread chapter {0}", "$listActivity_MrepeatingAnime_known": "rewatched episode {0}", "$notification_likeActivity_1person_1activity": " liked your activity.", "$notification_likeActivity_1person_Mactivity": " liked your activities.", "$notification_likeActivity_2person_1activity": " liked your activity.", "$notification_likeActivity_2person_Mactivity": " liked your activities.", "$notification_likeActivity_Mperson_1activity": " liked your activity.", "$notification_likeActivity_Mperson_Mactivity": " liked your activities.", "$notification_likeReply_1person_1reply": " liked your reply.", "$notification_likeReply_1person_Mreply": " liked your replies.", "$notification_likeReply_2person_1reply": " liked your reply.", "$notification_likeReply_2person_Mreply": " liked your replies.", "$notification_likeReply_Mperson_1reply": " liked your reply.", "$notification_likeReply_Mperson_Mreply": " liked your replies.", "$notification_reply_1person_1reply": " replied to your activity.", "$notification_reply_1person_Mreply": " replied to your activities.", "$notification_reply_2person_1reply": " replied to your activity.", "$notification_reply_2person_Mreply": " replied to your activities.", "$notification_reply_Mperson_1reply": " replied to your activity.", "$notification_reply_Mperson_Mreply": " replied to your activities.", "$notification_replyReply_1person_1reply": " replied to activity you're subscribed to.", "$notification_newMedia": "was recently added to the site.", "$notification_airing": "Episode {0} of {1} aired.", "$notification_message": " sent you a message.", "$notification_mention": " mentioned you in their activity.", "$notification_follow": " started following you.", "$notification_forumCommentLike": " liked your comment, in the forum thread ", "$notification_forumMention": " mentioned you, in the forum thread ", "$notifications_softBlock": "Soft block users", "$notifications_hideLike": "Hide like notifications", "$notifications_showHoh": "Show hoh notifications", "$notifications_showDefault": "Show default notifications", "$notifications_comments": "comments", "$notifications_button_reset": "Mark all as read", "$documentTitle_notifications": "Notifications · AniList", "$documentTitle_home": "Home · AniList", "$documentTitle_forum": "Forum - Anime & Manga Discussion · AniList", "$documentTitle_forum_prefix": "Forum", "$documentTitle_appSettings": "App & Automail Settings · AniList", "$preview_animeSection_title": "Anime in Progress", "$preview_mangaSection_title": "Manga in Progress", "$preview_airingSection_title": "Airing", "$preview_1behind": "1 episode behind", "$preview_Mbehind": "{0} episodes behind", "$preview_progress": "Progress:", "$publishingReply": "Publishing reply...", "$anisongs_openings": "Openings", "$anisongs_opening": "Opening", "$anisongs_endings": "Endings", "$anisongs_ending": "Ending", "$menu_home": "home", "$menu_profile": "profile", "$menu_animelist": "anime list", "$menu_mangalist": "manga list", "$menu_browse": "browse", "$menu_forum": "forum", "$submenu_stats": "Stats", "$submenu_social": "Social", "$submenu_reviews": "Reviews", "$submenu_favourites": "Favourites", "$submenu_submissions": "Submissions", "$submenu_anime": "Anime", "$submenu_manga": "Manga", "$submenu_staff": "Staff", "$submenu_characters": "Characters", "$submenu_recommendations": "Recommendations", "$mainMenu_notifications": "Notifications", "$mainMenu_profile": "Profile", "$mainMenu_settings": "Settings", "$timeline_search_description": "Looking for the activities of someone else?", "$noScrollPosts_description": "Display all status posts in full regardless of their length", "$ALbuttonReload_description": "Make the 'AL' button reload the feeds on the homepage", "$timeline_title": "Activity Timeline", "$filter_replies": "Has Replies", "$filter_following": "Following", "$input_user_placeholder": "User", "$error_userNotFound": "User not found", "$error_connection": "Connection error", "$myThreads_link": "My Threads", "$piracy_message": "THIS BE BAD LINK, IT'S NOW VEWY DISPOSED OF OwO (click the report button to call the mods on this naughty user)", "$compare_default": "Show default compare", "$compare_hoh": "Show hoh compare", "$compare_minRatings": "Min. ratings:", "$compare_individualRatings": "Individual rating systems:", "$compare_normalizeRatings": "Normalise ratings:", "$compare_colourCell": "Colour entire cell:", "$compare_listStatus": "any list status\nclick to toggle", "$404_private_or_noUser": "{0} does not exist or has a private profile", "$404_private": "{0} has a private profile", "$404_noUser": "{0} does not exist", "$404_blocked": "{0} has blocked you", "$recs_forYou": "For You", "$download_banner_tooltip": "Download banner", "$recs_description": "Each pair is one you like + one you haven't started\nBest match first", "$module_unicodifier_description": "Convert emojis so they work on anilist", "$module_unicodifier_extendedDescription": "Anilist doesn't handle some Unicode characters correctly, leading to truncated posts. This module coverts them to HTML entity escape codes instead, which the site can handle (they can easily do this themselves if they want to)\nOriginal idea by the great GoBusto: https://files.kiniro.uk/unicodifier.html", "$rewatch_suffix_1": "[rewatch]", "$rewatch_suffix_M": "[rewatch {0}]", "$reread_suffix_1": "[reread]", "$reread_suffix_M": "[reread {0}]", "$reviewLike_tooltip": "{0} out of {1} liked this review", "$review_reviewTitle": "Review of {0} by\u00a0{1}", "$updates_noNewManga": "No new items found :(", "$staff_filter_placeholder": "Filter by title, role, etc.", "$relations_following_only": "Following Only", "$relations_followers_only": "Followers Only", "$relations_mutuals": "Mutuals", "$relations_shared_following": "Shared Following", "$relations_shared_followers": "Shared Followers", "$relations_description": "Add separate tabs on the social page for various types of followers", "$additionalTranslation_description": "Translate additional parts of the Anilist UI", "$twoColumnFeed_description": "Split the home feed into two columns", "$markdown_help_title": "Markdown help", "$markdown_help_description": "Add a markdown helper to the bottom left corner", "$markdown_help_images_header": "Images", "$markdown_help_imageUpload": "(you must upload it somewhere else to get a link)", "$markdown_help_imageSize": "Adjusting size:", "$markdown_help_links_header": "Links", "$markdown_help_formatting_header": "Formatting", "$markdown_help_infixOr": "or", "$navigation_profileLink": "{0}'s profile", "$MAL_score": "MAL Score", "$MAL_serialization": "Serialisation", "$adjustColours_title": "Adjust Colours", "$button_newChapters": "New Chapters", "$scanning": "Scanning...", "$noResults": "No results found", "$filters": "Filters", "$filters_lists": "Lists", "$filters_year": "Year", "$heading_anime": "Anime:", "$heading_manga": "Manga:", "$heading_similarFavs": "Similar favs:", "$stats_animeOnList": "Anime on list: ", "$stats_mangaOnList": "Manga on list: ", "$stats_animeRated": "Anime rated: ", "$stats_mangaRated": "Manga rated: ", "$stats_averageScore": "Average score: ", "$stats_onlyOne": "Only one score given: ", "$stats_medianScore": "Median score: ", "$stats_globalDifference": "Global difference: ", "$stats_globalDeviation": "Global deviation: ", "$stats_ratingEntropy": "Rating Entropy: ", "$stats_mostCommonScore": "Most common score: ", "$stats_timeWatched": "Time watched: ", "$stats_totalChapters": "Total chapters: ", "$stats_totalVolumes": "Total volumes: ", "$stats_TVEpisodesWatched": "TV episodes watched: ", "$stats_TVEpisodesRemaining": "TV episodes remaining for current shows: ", "$stats_firstLoggedAnime": "First logged anime: ", "$stats_firstLoggedAnime_note": "(users can freely change start dates)", "$stats_weightComment_duration": " (duration weighted)", "$stats_weightComment_chapers": " (chapter weighted)", "$stats_globalDifference_comment": " (average difference from global average)", "$stats_globalDeviation_comment": " (standard deviation from the global average of each entry)", "$stats_ratingEntropy_comment": " bits/rating (higher number = more fine-grained ratings. Usually between 1 - 6)", "$stats_moreStats_title": "More Stats", "$stats_genresTags_title": "Genres & Tags", "$stats_genre": "Genre", "$stats_tag": "Tag", "$stats_count": "Count", "$stats_name": "Name", "$stats_siteStats_title": "Site Stats", "$stats_anime_heading": "Anime stats for {0}", "$stats_manga_heading": "Manga stats for {0}", "$stats_loadingAnime": "loading anime list...", "$stats_loadingManga": "loading manga list...", "$stats_instances": "({0} instances)", "$stats_instances_unique": "no two scores alike", "$stats_longestTime": "{0}% is {1}", "$stats_varousStats_heading": "Various statistics", "$stats_longest_watching": "Currently watching.", "$stats_longest_paused": "On hold.", "$stats_longest_dropped": "Dropped.", "$stats_longest_1rewatch": "Rewatched once.", "$stats_longest_2rewatch": "Rewatched twice.", "$stats_longest_Mrewatch": "Rewatched {0} times.", "$stats_longest_1rewatching": "First rewatch in progress.", "$stats_longest_2rewatching": "Second rewatch in progress.", "$stats_longest_Mrewatching": "Rewatch number {0} in progress.", "$stats_longest_1rewatchPaused": "First rewatch on hold.", "$stats_longest_2rewatchPaused": "Second rewatch on hold.", "$stats_longest_MrewatchPaused": "Rewatch number {0} on hold.", "$stats_longest_1rewatchDropped": "Dropped on first rewatch.", "$stats_longest_2rewatchDropped": "Dropped on second rewatch.", "$stats_longest_MrewatchDropped": "Dropped on rewatch number {0}.", "$characterBrowseTooltip": "Favourites", "$make3x3": "Make 3x3", "$make3x3_title": "Click this button, then 9 entries on your list", "$forum_preview_reply": "replied ", "$staff_filterHelp": "Filter help", "$staff_hoursWatched": "Hours Watched: ", "$staff_chaptersRead": " Chapters Read: ", "$staff_volumesRead": " Volumes Read: ", "$staff_meanScore": " Mean Score: ", "$staff_sort": "Sort", "$sort_alphabetical": "Alphabetical", "$sort_newest": "Newest", "$sort_oldest": "Oldest", "$sort_length": "Length", "$sort_popularity": "Popularity", "$sort_score": "Score", "$sort_myScore": "My Score", "$sort_myProgress": "My Progress", "$milestones_totalVolumes": "Total Volumes", "$milestones_totalEpisodes": "Total Episodes", "$milestones_daysWatched": "{0} Days Watched", "$milestones_chaptersRead": "{0} Chapters Read", "$colour_transparent": "Transparent", "$colour_blue": "Blue", "$colour_white": "White", "$colour_black": "Black", "$colour_red": "Red", "$colour_peach": "Peach", "$colour_orange": "Orange", "$colour_yellow": "Yellow", "$colour_green": "Green", "$terms_description": "Add a low bandwidth feed to the https://anilist.co/terms page", "$terms_privacyPolicy": "View Privacy Policy instead", "$terms_privacyPolicy_title": "This page usually shows the privacy policy of Anilist. Click to get the default view", "$terms_signin": "This module does not work without signing in to Automail", "$terms_signin_link": "Sign in with the script", "$terms_option_global": "Global", "$terms_option_text": "Text posts", "$terms_option_replies": "Has replies", "$terms_option_forum": "Forum", "$terms_option_reviews": "Reviews", "$terms_option_user": "User", "$terms_option_media": "Media", "$mediaStaff_filter": "Filter", "$socialTab_tooManyChapters": "Most likely the database total has been updated", "$socialTab_users": "Users", "$socialTab_shortAverage": "Avg", "$query_firstActivity": "First Activity", "$query_autorecs": "Autorecs", "$query_autorecs_collecting": "Collecting list data...", "$query_autorecs_processing": "Processing...", "$query_autorecs_info": "Top picks, based on your ratings, the ratings of others, and the recommendation database. Best matches on top", "$mobileFriendly_description": "Mobile Friendly mode. Disables some modules not working properly on mobile, and adjusts others", "$hideLikes_description": "Hide like notifications. Will not affect the notification count", "$settingsTip_description": "Show a notice on the notification page for where the script settings can be found", "$settings_errorInvalidJSON": "Invalid profile JSON", "$settings_errorInvalidActivity": "must be a direct link to an activity or an activity ID", "$settings_errorInvalidActivity2": "activity not found!", "$dismissDot_description": "Show a spec to dismiss notifications when signed in", "$socialTab_description": "Media social tab average score, progress and notes", "$socialTabFeed_description": "Media social tab feed filters", "$socialTabFeed_noActivities": "No matching activities", "$forumMedia_description": "Add the tagged media to the forum preview on the home page", "$mangaBrowse_description": "Make browse default to manga", "$dblclickZoom_description": "Double click activities to zoom", "$draw3x3_description": "Add a button to lists to create 3x3's from list entries. Click the button, and then select nine entries", "$subTitleInfo_description": "Add basic data below the title on media pages", "$entryScore_description": "Add your score and progress to media pages", "$activityTimeline_description": "Link your activities in the social tab of media, and between individual activities", "$CSSfollowCounter_description": "Follow count on social page", "$completedScore_description": "Show the score on the activity when people complete something", "$droppedScore_description": "Show the score on the activity when people drop something", "$replaceNativeTags_description": "Full lists for tags, staff and studios in stats", "$hideGlobalFeed_description": "Hide the global feed", "$CSScompactBrowse_description": "Make the browse section more compact", "$cleanSocial_description": "Place 'following' before 'forum threads' on media social tabs", "$CSSverticalNav_description": "Alternative browse mode [with vertical navbar by Kuwabara]", "$nonJumpScroll_description": "Stop activity content from jumping around when using scrollbars [by Reina]", "$blockWord_description": "Hide status posts containing this word:", "$statusBorder_description": "Colour code the right border of activities by media status", "$dblclickZoom_extendedDescription": "There are likely better browser accessibility addons for this.", "$staff_animeRoles": "Anime Staff Roles", "$staff_mangaRoles": "Manga Staff Roles", "$staff_voiceRoles": "Character Voice Roles", "$forumHeading_recentlyActive": "Recently Active Threads", "$forumHeading_releaseDiscussion": "Release Discussion Threads", "$forumHeading_newThreads": "Newly Created Threads", "$home_reviewLink": "Recent Reviews", "$home_forumLink": "Forum Activity", "$home_trendingAnime": "Trending Anime", "$home_trendingManga": " & Manga", "$home_newAnime": "Newly Added Anime", "$home_newManga": "Newly Added Manga", "$footer_siteTheme": "Site Theme", "$theme_default": "Default", "$theme_dark": "Dark", "$theme_highContrast": "High Contrast", "$theme_highContrastDark": "High Contrast Dark", "$feed_header": "Activity", "$feedSelect_all": "All", "$feedSelect_text": "Text Status", "$feedSelect_list": "List Progress", "$feedSelect_status": "Status", "$feedSelect_message": "Messages", "$mediaFormat_TV" : "TV", "$mediaFormat_TV_SHORT" : "TV Short", "$mediaFormat_MOVIE" : "Movie", "$mediaFormat_SPECIAL" : "Special", "$mediaFormat_OVA" : "OVA", "$mediaFormat_ONA" : "ONA", "$mediaFormat_MUSIC" : "Music", "$mediaFormat_MANGA" : "Manga", "$mediaFormat_NOVEL" : "Light Novel", "$mediaFormat_ONE_SHOT" : "One Shot", "$forumCategory_1": "Anime", "$forumCategory_2": "Manga", "$forumCategory_3": "Light Novels", "$forumCategory_4": "Visual Novels", "$forumCategory_5": "Release Discussion", "$forumCategory_7": "General", "$forumCategory_8": "News", "$forumCategory_9": "Music", "$forumCategory_10": "Gaming", "$forumCategory_11": "Site Feedback", "$forumCategory_12": "Bug Reports", "$forumCategory_13": "Site Announcements", "$forumCategory_14": "List Customisation", "$forumCategory_15": "Recommendations", "$forumCategory_16": "Forum Games", "$forumCategory_17": "Misc", "$forumCategory_18": "AniList Apps" } } , "Português": { "info": { "language": "Português", "language_english": "Portuguese", "locale": "pt", "fallback": ["English"], "maintainer": "samOAK", "maintainer_link": "https://anilist.co/user/samOAK/", "discussion_link": "https://github.com/hohMiyazawa/Automail/issues/69", "notes": "tentei usar português europeu" }, "keys": { "$loading": " A cargar…", "$searching": "A buscar…", "$load_more": "Cargar Mais", "$time_now": "Agora", "$time_1second": "Há 1 segundo", "$time_Msecond": "Há {0} segundos", "$time_1minute": "Há 1 minuto", "$time_Mminute": "Há {0} minutos", "$time_1hour": "Há 1 hora", "$time_Mhour": "Há {0} horas", "$time_1day": "Há 1 dia", "$time_Mday": "Há {0} dias", "$time_1week": "Há 1 semana", "$time_Mweek": "Há {0} semanas", "$time_1month": "Há 1 mês", "$time_Mmonth": "Há {0} meses", "$time_1year": "Há 1 ano", "$time_Myear": "Há {0} anos", "$time_medium_Mday": "dias", "$time_short_second": "s", "$time_short_minute": "m", "$time_short_hour": "h", "$time_short_day": "d", "$time_short_week": "sem", "$time_short_month": "mes", "$time_short_year": "a", "$language_English": "Inglês", "$language_German": "Alemão", "$language_Italian": "Italiano", "$language_Spanish": "Espanhol", "$language_French": "Francês", "$language_Korean": "Coreano", "$language_Portuguese": "Português", "$language_Hebrew": "Hebraico", "$language_Hungarian": "Húngaro", "$language_Chinese": "Chinês", "$language_Japanese": "Japonês", "$language_Arabic": "Árabe", "$language_Filipino": "Filipino", "$language_Catalan": "Catalão", "$language_Polish": "Polaco", "$language_Norwegian": "Norueguês", "$default_filename": "Ficheiro de Anilist.co", "$generic_anime": "Anime", "$generic_manga": "Manga", "$page": "Página {0}", "$dubMarker_notice": "Dobrado em {0}", "$button_submit": "Enviar", "$button_search": "Buscar", "$button_run": "Executar", "$button_add": "Adir", "$button_reset": "Restaurar", "$button_resetAll": "Restaurar tudo", "$button_defaultSettings": "Definições Padrão", "$button_next": "Seguinte →", "$button_previous": "← Anterior", "$button_refresh": "Recargar", "$button_edit": "Editar", "$button_publish": "Enviar", "$button_cancel": "Cancelar", "$placeholder_status": "Escreve um post…", "$placeholder_reply": "Escreve uma resposta…", "$placeholder_message": "Escreve uma mensagem…", "$placeholder_forum": "Escreve um fio no foro…", "$forumMedia_backlink": "Põe um link à página da obra em seu fio do foro", "$settings_title": "Definições de Automail", "$notImplemented": "Ainda não implementado", "$settings_version": "Versão: ", "$settings_homepage": "Página inicial: ", "$settings_repository": "Repositório: ", "$settings_moreInfo_tooltip": "Mais info", "$settings_category_Notifications": "Notificações", "$settings_category_Feeds": "Feeds", "$settings_category_Forum": "Foro", "$settings_category_Lists": "Listas", "$settings_category_Profiles": "Perfis", "$settings_category_Stats": "Estat.", "$settings_category_Media": "Mídia", "$settings_category_Navigation": "Navegação", "$settings_category_Browse": "Explorar", "$settings_category_Script": "Script", "$settings_category_Login": "Sessão", "$settings_category_Newly Added": "Novas", "$settings_button_export": "Exportar definições", "$settings_export_description": "Pode ser útil ter uma cópia de salvaguarda se costumas limpar cache/cookies, que também limpará as definições de Automail", "$settings_import": "Importar definições:", "$settings_experimental_suffix": "[EXPERIMENTAL]", "$settings_partialLocalisationLanguage_description": "Língua de Automail", "$settings_CSSadd": "Aplicar CSS personalizado a teu perfil. Poderão ver quem tiver o script.", "$settings_CSSlinkTip": "(Também podes usar um link a um ficheiro CSS)", "$settings_pinnedActivity": "Pôr uma atividade fixada em teu perfil", "$settings_notificationDotColour": "Cor dos Pontos de Notificação", "$setting_notifications": "Melhorar notificações", "$setting_moreStats": "Mostrar uma aba extra em Estatísticas", "$setting_compare": "Substituir função nativa de comparação", "$setting_CSSsmileyScore": "Dar cores distintas às notas smiley", "$setting_tweets": "Embutir tuítes ligados", "$setting_CSSgreenManga": "Títulos de manga verdes", "$setting_CSSbannerShadow": "Remover sombra da capa", "$setting_CSSmobileTags": "Não ocultar tags da página da obra no telemóvel", "$setting_infoTable": "Usar uma tabela de duas colunas nos dados da obra", "$setting_reinaDark": "Adir um tema de Alto Contraste Escuro [por Reina]", "$setting_MALserial": "Adir dado de serialização de MAL a mangas", "$setting_MALscore": "Adir notas de MAL à obra", "$setting_MALrecs": "Adir recomendações de MAL à obra", "$cssTooBig": "CSS personalizado excede 1MB. Reduze-o ou usa um link a ele.", "$jsonTooBig": "JSON de perfil excede 1MB", "$debug_tip": "(Ei, seria bom incluires este ficheiro ao relatar erros. Facilita minha vida)", "$profileBackground_help1": "Definir um fundo de perfil, exemplo:", "$profileBackground_help2": "Dica: Usa cor transparente pois funciona bem nos temas Claro e Escuro. Exemplo:", "$profileBackground_help3": "Dica2: Queres uma imagem desbotada, fixa e a preencher o ecrã? Eis como:", "$mediaStatus_current": "em curso", "$mediaStatus_watching": "vendo", "$mediaStatus_reading": "lendo", "$mediaStatus_completed": "concluído", "$mediaStatus_completedWatching": "visto", "$mediaStatus_completedReading": "lido", "$mediaStatus_repeating": "repetindo", "$mediaStatus_rewatching": "revendo", "$mediaStatus_rereading": "relendo", "$mediaStatus_paused": "pausado", "$mediaStatus_dropped": "largado", "$mediaStatus_planning": "planejado", "$listActivity_MreadChapter": "leu capítulo {0} de ", "$listActivity_MwatchedEpisode": "viu episódio {0} de ", "$listActivity_planningManga": "planeja ler ", "$listActivity_planningAnime": "planeja ver ", "$listActivity_completedManga": "concluiu ", "$listActivity_completedAnime": "concluiu ", "$listActivity_repeatedManga": "releu ", "$listActivity_repeatedAnime": "reviu ", "$listActivity_pausedManga": "pausou ler ", "$listActivity_pausedAnime": "pausou ver ", "$listActivity_droppedManga": "largou ", "$listActivity_droppedAnime": "largou ", "$listActivity_MdroppedManga": "largou {0} de ", "$listActivity_MdroppedAnime": "largou {0} de ", "$listActivity_MrepeatingManga": "releu capítulo {0} de ", "$listActivity_MrepeatingAnime": "reviu episódio {0} de ", "$notification_likeActivity_1person_1activity": " curtiu tua atividade.", "$notification_likeActivity_1person_Mactivity": " curtiu tuas atividades.", "$notification_likeActivity_2person_1activity": " curtiram tua atividade.", "$notification_likeActivity_2person_Mactivity": " curtiram tuas atividades.", "$notification_likeActivity_Mperson_1activity": " curtiram tua atividade.", "$notification_likeActivity_Mperson_Mactivity": " curtiram tuas atividades.", "$notification_likeReply_1person_1reply": " curtiu tua resposta.", "$notification_likeReply_1person_Mreply": " curtiu tuas respostas.", "$notification_likeReply_2person_1reply": " curtiram tua resposta.", "$notification_likeReply_2person_Mreply": " curtiram tuas respostas.", "$notification_likeReply_Mperson_1reply": " curtiram tua resposta.", "$notification_likeReply_Mperson_Mreply": " curtiram tuas respostas.", "$notification_reply_1person_1reply": " respondeu tua atividade.", "$notification_reply_1person_Mreply": " respondeu tuas atividades.", "$notification_reply_2person_1reply": " responderam tua atividade.", "$notification_reply_2person_Mreply": " responderam tuas atividades.", "$notification_reply_Mperson_1reply": " responderam tua atividade.", "$notification_reply_Mperson_Mreply": " responderam tuas atividades.", "$notification_replyReply_1person_1reply": " respondeu à atividade que subscreveste.", "$notification_newMedia": "foi recém-adido ao sítio.", "$notification_airing": "Episódio {0} de {1} exibido.", "$notification_message": " enviou-te uma mensagem.", "$notification_mention": " mencionou-te em sua atividade.", "$notification_follow": " passou a seguir-te.", "$notification_forumCommentLike": " curtiu teu comentário no fio do foro ", "$notification_forumMention": " mencionou-te no fio do foro ", "$notifications_softBlock": "Ocultar usuários", "$notifications_hideLike": "Ocultar notificação de curtida", "$notifications_showHoh": "Mostrar notificações hoh", "$notifications_showDefault": "Mostrar notificações padrão", "$notifications_comments": "comentários", "$notifications_button_reset": "Marcar tudo como lido", "$documentTitle_notifications": "Notificações · AniList", "$documentTitle_home": "Início · AniList", "$documentTitle_forum": "Foro - Debate de Anime e Manga · AniList", "$documentTitle_forum_prefix": "Foro", "$documentTitle_appSettings": "Definições de App e Automail · AniList", "$preview_animeSection_title": "Anime em Progresso", "$preview_mangaSection_title": "Manga em Progresso", "$preview_airingSection_title": "No Ar", "$preview_1behind": "1 episódio atrasado", "$preview_Mbehind": "{0} episódios atrasados", "$preview_progress": "Progresso:", "$publishingReply": "A enviar resposta…", "$anisongs_openings": "Aberturas", "$anisongs_opening": "Abertura", "$anisongs_endings": "Encerramentos", "$anisongs_ending": "Encerramento", "$menu_home": "Início", "$menu_profile": "Perfil", "$menu_animelist": "Lista de Anime", "$menu_mangalist": "Lista de Manga", "$menu_browse": "Explorar", "$menu_forum": "Foro", "$submenu_stats": "Estatíst.", "$submenu_social": "Social", "$submenu_reviews": "Resenhas", "$submenu_favourites": "Favoritos", "$submenu_submissions": "Envios", "$submenu_anime": "Anime", "$submenu_manga": "Manga", "$submenu_staff": "Pessoal", "$submenu_characters": "Personagens", "$submenu_recommendations": "Recomendações", "$mainMenu_notifications": "Notificações", "$mainMenu_profile": "Perfil", "$mainMenu_settings": "Definições", "$timeline_search_description": "Buscas atividades dalguém?", "$noScrollPosts_description": "Não encurtar posts, inobstante o tamanho", "$ALbuttonReload_description": "Fazer botão 'AL' recargar os feeds em Início", "$timeline_title": "Cronologia de Atividade", "$filter_replies": "Há Resposta", "$filter_following": "Seguindo", "$input_user_placeholder": "Usuário", "$error_userNotFound": "Usuário não encontrado", "$error_connection": "Erro de Conexão", "$myThreads_link": "Meus Fios", "$piracy_message": "ISTO É UM LINK MAL, JÁ FOI DESCARTADO OwO (clica o botão reportar para relatar aos mods esse usuário travesso)", "$compare_default": "Mostrar comparação padrão", "$compare_hoh": "Mostrar comparação hoh", "$compare_minRatings": "Notas mín.:", "$compare_individualRatings": "Sistemas de nota individuais:", "$compare_normalizeRatings": "Igualar notas:", "$compare_colourCell": "Pintar célula toda:", "$compare_listStatus": "qualquer estado da lista\nclica para mudar", "$404_private_or_noUser": "{0} não existe ou é um perfil privado", "$404_private": "{0} é um perfil privado", "$404_noUser": "{0} não existe", "$404_blocked": "{0} bloqueou-te", "$recs_forYou": "Para Ti", "$download_banner_tooltip": "Guardar capa", "$recs_description": "Cada par é um que gostas + não viste\nMelhor primeiro", "$module_unicodifier_description": "Converter emojis para usar no anilist", "$module_unicodifier_extendedDescription": "Anilist não maneja uns carateres Unicode bem, gerando posts truncados. Este módulo converte-os a 'HTML entity escape codes', cujo sítio aceita (eles mesmos o podem fazer facilmente se quiserem)\nIdeia original do grão GoBusto: https://files.kiniro.uk/unicodifier.html", "$rewatch_suffix_1": "[reviu]", "$rewatch_suffix_M": "[reviu {0}]", "$reread_suffix_1": "[releu]", "$reread_suffix_M": "[releu {0}]", "$reviewLike_tooltip": "{0} de {1} curtiram essa resenha", "$review_reviewTitle": "Resenha de {0} por\u00a0{1}", "$updates_noNewManga": "Nada novo encontrado :(", "$staff_filter_placeholder": "Filtrar por título, função etc.", "$relations_following_only": "Só Seguidos", "$relations_followers_only": "Só Seguidores", "$relations_mutuals": "Mútuo", "$relations_shared_following": "Seguidos Partilhados", "$relations_shared_followers": "Seguidores Partilhados", "$relations_description": "Separar em abas tipos de seguidores em Social", "$additionalTranslation_description": "Traduzir partes extras da IU de Anilist", "$twoColumnFeed_description": "Partir feed inicial em duas colunas", "$markdown_help_title": "Ajuda para Markdown", "$markdown_help_description": "Pôr uma ajuda de Markdown no canto inferior esquerdo", "$markdown_help_images_header": "Imagens", "$markdown_help_imageUpload": "(deves enviá-la algures para obter o link)", "$markdown_help_imageSize": "Ajustar tamanho:", "$markdown_help_links_header": "Links", "$markdown_help_formatting_header": "Formatação", "$markdown_help_infixOr": "ou", "$navigation_profileLink": "Perfil de {0}", "$MAL_score": "Nota no MAL", "$MAL_serialization": "Serialização", "$adjustColours_title": "Ajustar Cores", "$button_newChapters": "Novos Capítulos", "$scanning": "A examinar…", "$noResults": "Sem resultados", "$filters": "Filtros", "$filters_lists": "Listas", "$filters_year": "Ano", "$heading_anime": "Anime:", "$heading_manga": "Manga:", "$heading_similarFavs": "Favs similares:", "$stats_animeOnList": "Animes na lista: ", "$stats_mangaOnList": "Mangas na lista: ", "$stats_animeRated": "Animes avaliados: ", "$stats_mangaRated": "Mangas avaliados: ", "$stats_averageScore": "Nota média: ", "$stats_onlyOne": "Dada uma nota só: ", "$stats_medianScore": "Nota mediana: ", "$stats_globalDifference": "Diferença global: ", "$stats_globalDeviation": "Deviação global: ", "$stats_ratingEntropy": "Entropia de Nota: ", "$stats_mostCommonScore": "Nota mais comum: ", "$stats_timeWatched": "Tempo visto: ", "$stats_totalChapters": "Total de capítulos: ", "$stats_totalVolumes": "Total de volumes: ", "$stats_TVEpisodesWatched": "Episódios de TV vistos: ", "$stats_TVEpisodesRemaining": "episódios restando de séries em curso: ", "$stats_firstLoggedAnime": "Primeiro anime: ", "$stats_firstLoggedAnime_note": "(usuários podem mudar livremente datas de início)", "$stats_weightComment_duration": " (medido pela duração)", "$stats_weightComment_chapers": " (medido pelo número de capítulos)", "$stats_globalDifference_comment": " (diferença média da média global)", "$stats_globalDeviation_comment": " (desvio padrão da média global de cada obra)", "$stats_ratingEntropy_comment": " bits/nota ", "$stats_moreStats_title": "Mais Estatíst.", "$stats_genresTags_title": "Gêneros e Tags", "$stats_genre": "Gênero", "$stats_tag": "Tag", "$stats_count": "Quantia", "$stats_name": "Nome", "$stats_siteStats_title": "Estatíst. do Sítio", "$stats_anime_heading": "Estat. para anime de {0}", "$stats_manga_heading": "Estat. para manga de {0}", "$stats_loadingAnime": "a cargar lista de anima…", "$stats_loadingManga": "a cargar lista de manga…", "$stats_instances": "({0} instâncias)", "$stats_instances_unique": "sem duas notas iguais", "$stats_longestTime": "{0}% é {1}", "$stats_varousStats_heading": "Várias estatísticas", "$stats_longest_watching": "Vendo.", "$stats_longest_paused": "Pausado.", "$stats_longest_dropped": "Largado.", "$stats_longest_1rewatch": "Revisto uma vez.", "$stats_longest_2rewatch": "Revisto duas vezes.", "$stats_longest_Mrewatch": "Revisto {0} vezes.", "$stats_longest_1rewatching": "Primeira repetição em curso.", "$stats_longest_2rewatching": "Segunda repetição em curso.", "$stats_longest_Mrewatching": "Repetição n.º {0} em curso.", "$stats_longest_1rewatchPaused": "Primeira repetição em pausa.", "$stats_longest_2rewatchPaused": "Segunda repetição em pausa.", "$stats_longest_MrewatchPaused": "Repetição n.º {0} em pausa.", "$stats_longest_1rewatchDropped": "Largado na primeira repetição.", "$stats_longest_2rewatchDropped": "Largado na segunda repetição.", "$stats_longest_MrewatchDropped": "Largado na repetição n.º {0}.", "$characterBrowseTooltip": "Favoritos", "$make3x3": "Fazer 3x3", "$make3x3_title": "Clica este botão, depois 9 itens de tua lista", "$forum_preview_reply": "respondeu ", "$staff_filterHelp": "Ajuda para filtro", "$staff_hoursWatched": "Horas a Ver: ", "$staff_chaptersRead": " Capítulos Lidos: ", "$staff_volumesRead": " Volumes Lidos: ", "$staff_meanScore": " Nota Média: ", "$staff_sort": "Ordenar", "$sort_alphabetical": "Alfabético", "$sort_newest": "Novos", "$sort_oldest": "Velhos", "$sort_length": "Longura", "$sort_popularity": "Popular", "$sort_score": "Nota", "$sort_myScore": "Minha Nota", "$sort_myProgress": "Meu Progresso", "$milestones_totalVolumes": "Volumes Totais", "$milestones_totalEpisodes": "Episódios Totais", "$milestones_daysWatched": "{0} Dias a Ver", "$milestones_chaptersRead": "{0} Capítulos Lidos", "$colour_transparent": "Transparente", "$colour_blue": "Azul", "$colour_white": "Branco", "$colour_black": "Preto", "$colour_red": "Vermelho", "$colour_peach": "Pêssego", "$colour_orange": "Laranja", "$colour_yellow": "Amarelo", "$colour_green": "Verde", "$terms_description": "Pôr um feed para redes lentas em https://anilist.co/terms", "$terms_privacyPolicy": "Ver Política de Privacidade", "$terms_privacyPolicy_title": "Esta página mostrava a política de privacidade do Anilist. Clica para ir à vista padrão", "$terms_signin": "Este módulo só funciona iniciando sessão no Automail", "$terms_signin_link": "Iniciar sessão com o script", "$terms_option_global": "Global", "$terms_option_text": "Posts de texto", "$terms_option_replies": "Há resposta", "$terms_option_forum": "Foro", "$terms_option_reviews": "Resenhas", "$terms_option_user": "Usuário", "$terms_option_media": "Mídia", "$mediaStaff_filter": "Filtro", "$socialTab_tooManyChapters": "Possivelmente o total da base de dados atualizou-se", "$socialTab_users": "Usuários", "$socialTab_shortAverage": "Média", "$query_firstActivity": "Primeira Atividade", "$query_autorecs": "Autorecs", "$query_autorecs_collecting": "A coletar dados de lista…", "$query_autorecs_processing": "A processar…", "$query_autorecs_info": "Top escolhas, segundo tuas notas, as de outros, e a base de dados de sugestões. Destaques no topo", "$mobileFriendly_description": "Modo para Móvel. Desativa módulos falhos no telemóvel e ajusta outros", "$hideLikes_description": "Ocultar notificações de curtida. Não afetará sua contagem", "$settingsTip_description": "Mostrar um aviso em Notificações aonde estão as definições de script", "$settings_errorInvalidJSON": "JSON de perfil inválido", "$settings_errorInvalidActivity": "deve ser um link direto a uma atividade ou seu ID", "$settings_errorInvalidActivity2": "atividade não encontrada!", "$dismissDot_description": "Mostrar como dispensar notificações ao iniciar sessão", "$socialTab_description": "Nota média, progresso e anotações da obra em Social", "$socialTabFeed_description": "Fitros de feed da obra em Social", "$forumMedia_description": "Pôr a obra citada à prévia do foro em Início", "$mangaBrowse_description": "Fazer manga padrão em Explorar", "$dblclickZoom_description": "Clique duplo para ampliar atividades", "$dblclickZoom_extendedDescription": "Talvez haja melhores extensões de acessibilidade no navegador.", "$staff_animeRoles": "Papéis em Anime", "$staff_mangaRoles": "Papéis em Manga", "$staff_voiceRoles": "Papéis de voz", "$forumHeading_recentlyActive": "Fios Recém-Ativos", "$forumHeading_releaseDiscussion": "Fios a Debater Lançamento", "$forumHeading_newThreads": "Fios Recém-Criados", "$home_reviewLink": "Resenhas Novas", "$home_forumLink": "Atividade do Foro", "$home_trendingAnime": "Animes e ", "$home_trendingManga": "Mangas em Alta", "$home_newAnime": "Animes Recém-Adidos", "$home_newManga": "Mangas Recém-Adidos", "$footer_siteTheme": "Tema do Sítio", "$theme_default": "Padrão", "$theme_dark": "Escuro", "$theme_highContrast": "Alto Contraste", "$theme_highContrastDark": "Alto Contraste Escuro", "$feed_header": "Atividade", "$feedSelect_all": "Tudo", "$feedSelect_text": "Post Texto", "$feedSelect_list": "Progresso Lista", "$feedSelect_status": "Posts", "$feedSelect_message": "Mensagens", "$mediaFormat_TV" : "TV", "$mediaFormat_TV_SHORT" : "TV Curta", "$mediaFormat_MOVIE" : "Filme", "$mediaFormat_SPECIAL" : "Especial", "$mediaFormat_OVA" : "OVA", "$mediaFormat_ONA" : "ONA", "$mediaFormat_MUSIC" : "Música", "$mediaFormat_MANGA" : "Manga", "$mediaFormat_NOVEL" : "Light Novel", "$mediaFormat_ONE_SHOT" : "One Shot", "$forumCategory_1": "Animes", "$forumCategory_2": "Mangas", "$forumCategory_3": "Light Novels", "$forumCategory_4": "Visual Novels", "$forumCategory_5": "Debate de Lançamento", "$forumCategory_7": "Geral", "$forumCategory_8": "Notícias", "$forumCategory_9": "Música", "$forumCategory_10": "Jogos", "$forumCategory_11": "Comentário ao Sítio", "$forumCategory_12": "Relatos de Erro", "$forumCategory_13": "Anúncios do Sítio", "$forumCategory_14": "Personalização de Listas", "$forumCategory_15": "Recomendações", "$forumCategory_16": "Jogos no foro", "$forumCategory_17": "Outros", "$forumCategory_18": "Apps de AniList", "$role_Original Creator": "Criador Original", "$role_Creator": "Criador", "$role_Music": "Música", "$role_Key Animation": "Animação-Chave", "$role_Key Animation Assistance": "Assistência de Animação-Chave", "$role_In-Between Animation": "Animação de Intervalação", "$role_Animator": "Animador", "$role_Animation": "Animação", "$role_Main Animator": "Animador Principal", "$role_Opening Animation": "Animação de Abertura", "$role_Art": "Arte", "$role_Illustration": "Ilustração", "$role_End Card": "Cartão Final", "$role_Original Concept": "Conceito Original", "$role_Story Concept": "Conceito da Estória", "$role_Original Story": "Estória Original", "$role_Story": "Estória", "$role_Official Writer": "Escritor Oficial", "$role_Story & Art": "Estória e Arte", "$role_Director": "Diretor", "$role_CG Director": "Diretor de CG", "$role_Character Design": "Design de Personagem", "$role_Original Character Design": "Design de Personagem Original", "$role_Animation Director": "Diretor de Animação", "$role_Assistant Episode Director": " Diretor de Episodio Assistente", "$role_Assistant Animation Director": "Diretor de Animação Assistente", "$role_Assistant Director": "Diretor Assistente", "$role_Chief Animation Director": "Diretor-Chefe de Animação", "$role_Episode Director": "Diretor de Episódio", "$role_Sound Director": "Diretor de Som", "$role_Chief Director": "Diretor-Chefe", "$role_Unit Director": "Diretor de Unidade", "$role_Art Director": "Diretor de Arte", "$role_Art Design": "Design de Arte", "$role_Chief Unit Director": "Diretor-Chefe de Unidade", "$role_Planning Producer": "Produtor de Planejamento", "$role_Producer": "Produtor", "$role_Co-Producer": "Coprodutor", "$role_Production Coordination": "Coordenação de Produção", "$role_Production Generalization": "Generalização de Produção", "$role_Executive Director": "Diretor Executivo", "$role_Executive Producer": "Produtor Executivo", "$role_Animation Producer": "Produtor de Animação", "$role_Creative Producer": "Produtor Criativo", "$role_Production Assistant": "Assistente de Produção", "$role_Production Assistance": "Assistência de Produção", "$role_Photography Assistance": "Assistência de Fotografia", "$role_Director of Photography": "Diretor de Fotografia", "$role_Photography": "Fotografia", "$role_Camera": "Câmera", "$role_Advertising": "Publicidade", "$role_Finishing": "Acabamento", "$role_Recording": "Gravação", "$role_Recording Assistant": "Assistente de Gravação", "$role_Dialogue Recording": "Gravação de Diálogos", "$role_3D Works": "Trabalhos 3D", "$role_CG Animation": "Animação CG", "$role_Color Design": "Design de Cores", "$role_Color Coordination": "Coordenação de Cores", "$role_Insert Song Lyrics": "Letra de Música Incidental", "$role_Theme Song Lyrics": "Letra da Música Tema", "$role_Theme Song Composition": "Estruturação da Música Tema", "$role_Theme Song Performance": "Performance da Música Tema", "$role_Theme Song Arrangement": "Arranjo da Música Tema", "$role_Music Piano Performance": "Performance da Música de Piano", "$role_Conductor": "Maestro", "$role_Special Thanks": "Agradecimento Especial", "$role_Material Texture": "Textura de Materiais", "$role_Original Plan": "Plano Original", "$role_Editing": "Edição", "$role_PV Production": "Produção de PV", "$role_Title Design": "Design de Título", "$role_Title Logo Design": "Design de Logo do Título", "$role_Visual Effects": "Efeitos Visuais", "$role_Digital Effects": "Efeitos Digitais", "$role_Prop Design": "Design de Objeto", "$role_Firearms Design": "Design de Armas", "$role_ADR Script": "Guião de Dobragem", "$role_ADR Scriptwriter": "Guionista de Dobragem", "$role_ADR Script Adaptation": "Adaptação de Guião de Dobragem", "$role_Layout": "Layout", "$role_Layout Composition": "Estruturação de Layout", "$role_Scene Design": "Design de Cenas", "$role_Mechanical Design": "Design Mecânico", "$role_Background Art": "Arte de Fundo", "$role_In-Betweens Check": "Verificação de Intervalação", "$role_Animation Check": "Verificação de Animação", "$role_Series Composition": "Estruturação de Série", "$role_Animation Supervisor": "Supervisor de Animação", "$role_Supervisor": "Supervisor", "$role_Supervision": "Supervisão", "$role_Planning": "Planejamento", "$role_Title": "Título", "$role_Script": "Guião", "$role_Screenplay": "Roteiro", "$role_Setting": "Cenário", "$role_Storyboard": "Esboço Sequencial", "$role_Translator": "Tradutor", "$role_Assistant": "Assistente", "$role_Main": "Principal", "$role_Supporting": "Apoio", "$role_Background": "Fundo" } } , "Deutsch": { "info": { "language": "Deutsch", "language_english": "German", "locale": "de-DE", "fallback": ["English"], "maintainer": "Koopz", "maintainer_link": "https://anilist.co/user/Koopz/", "discussion_link": "", "notes": "" }, "keys": { "$time_now": "gerade eben", "$time_1second": "vor einer Sekunde", "$time_Msecond": "vor {0} Sekunden", "$time_1minute": "vor einer Minute", "$time_Mminute": "vor {0} Minuten", "$time_1hour": "vor einer Stunde", "$time_Mhour": "vor {0} Stunden", "$time_1day": "gestern", "$time_Mday": "vor {0} Tagen", "$time_1week": "letzte Woche", "$time_Mweek": "vor {0} Wochen", "$time_1month": "letzten Monat", "$time_Mmonth": "vor {0} Monaten", "$time_1year": "letztes Jahr", "$time_Myear": "vor {0} Jahren", "$button_submit": "Senden", "$button_search": "Suchen", "$button_run": "Ausführen", "$button_add": "Hinzufügen", "$button_reset": "Zurücksetzen", "$settings_title": "Automail Einstellungen", "$settings_version": "Version: ", "$settings_homepage": "Homepage: ", "$settings_repository": "Quellcode: ", "$settings_moreInfo_tooltip": "Mehr Informationen", "$settings_category_Notifications": "Benachrichtigungen", "$settings_category_Feeds": "Feeds", "$settings_category_Forum": "Forum", "$settings_category_Lists": "Listen", "$settings_category_Profiles": "Profile", "$settings_category_Stats": "Statistiken", "$settings_category_Media": "Medien", "$settings_category_Navigation": "Navigation", "$settings_category_Browse": "Browse", "$settings_category_Script": "Skript", "$settings_category_Login": "Login", "$settings_category_Newly Added": "Neu hinzugefügt", "$settings_button_export": "Einstellungen exportieren", "$settings_export_description": "Könnte hilfreich sein, ein Backup zu haben, wenn du den Browser Cache/Storage leerst, was dazu führt, dass alle Automail Einstellungen verloren gehen", "$settings_import": "Einstellungen importieren:", "$settings_experimental_suffix": "[EXPERIMENTELL]", "$settings_partialLocalisationLanguage_description": "Automail Sprache", "$stats_moreStats_title": "Mehr Statistiken", "$stats_genresTags_title": "Genres & Tags", "$stats_siteStats_title": "Seiten-Statistiken", "$stats_anime_heading": "Anime Statistiken für {0}", "$stats_manga_heading": "Manga Statistiken für {0}", "$notification_likeActivity_1person_1activity": " gefiel deine Aktivität.", "$notification_likeActivity_1person_Mactivity": " gefiel deine Aktivitäten.", "$notification_likeActivity_2person_1activity": " gefielen deine Aktivität.", "$notification_likeActivity_2person_Mactivity": " gefielen deine Aktivitäten.", "$notification_likeActivity_Mperson_1activity": " gefielen deine Aktivität.", "$notification_likeActivity_Mperson_Mactivity": " gefielen deine Aktivitäten.", "$notification_likeReply_1person_1reply": " gefiel deine Antwort.", "$notification_likeReply_1person_Mreply": " gefiel deine Antworten.", "$notification_likeReply_2person_1reply": " gefielen deine Antwort.", "$notification_likeReply_2person_Mreply": " gefielen deine Antworten.", "$notification_likeReply_Mperson_1reply": " gefielen deine Antwort.", "$notification_likeReply_Mperson_Mreply": " gefielen deine Antworten.", "$notification_reply_1person_1reply": " hat auf deine Aktivität geantwortet.", "$notification_reply_1person_Mreply": " hat auf deine Aktivitäten geantwortet.", "$notification_reply_2person_1reply": " haben auf deine Aktivität geantwortet.", "$notification_reply_2person_Mreply": " haben auf deine Aktivitäten geantwortet.", "$notification_reply_Mperson_1reply": " haben auf deine Aktivität geantwortet.", "$notification_reply_Mperson_Mreply": " haben auf deine Aktivitäten geantwortet.", "$notification_replyReply_1person_1reply": " hat auf einer von dir verfolgten Aktivität geantwortet.", "$notification_newMedia": "wurde vor Kurzem zur Seite hinzugefügt.", "$notification_message": " hat dir eine Nachricht gesendet.", "$notification_mention": " hat dich in ihrer Aktivität erwähnt.", "$notification_follow": " folgt dir jetzt.", "$notification_forumCommentLike": " gefiel dein Kommentar im Forumthread ", "$notification_forumMention": " erwähnte dich im Forumthread ", "$notifications_softBlock": "Softblocke Benutzer", "$notifications_hideLike": "Verstecke 'Gefällt mir' Benachrichtigungen", "$preview_animeSection_title": "Aktueller Anime", "$preview_mangaSection_title": "Aktueller Manga", "$preview_airingSection_title": "Ausstrahlend", "$preview_1behind": "1 Episode hinterher", "$preview_Mbehind": "{0} Episoden hinterher", "$preview_progress": "Fortschritt:", "$timeline_search_description": "Suchst du nach den Aktivitäten eines anderen Benutzers?", "$timeline_title": "Aktivitäten Zeitleiste", "$filter_replies": "Hat Antworten", "$filter_following": "Gefolgte", "$input_user_placeholder": "Benutzer", "$error_userNotFound": "Benutzer nicht gefunden", "$myThreads_link": "Meine Threads", "$piracy_message": "DAS IST EIN PÖSER LINK, ER WIRD NUN SEHR BESEITIGT OwO (Klicke auf den Melde-Button, um die Moderatoren auf diesen bösartigen Benutzer aufmerksam zu machen)", "$compare_default": "Zeige Standard-Vergleich", "$compare_hoh": "Zeige hoh-Vergleich", "$404_private_or_noUser": "{0} existiert nicht oder hat ein privates Profil", "$404_private": "{0} hat ein privates Profil", "$404_noUser": "{0} existiert nicht", "$404_blocked": "{0} hat dich geblockt", "$recs_forYou": "Für dich", "$recs_description": "Paare bestehen aus Medien, die du magst + Medien, die du noch nicht angefangen hast\nBeste Übereinstimmungen zuerst", "$module_unicodifier_description": "Konvertiert Emojis, damit sie auf Anilist funktionieren", "$module_unicodifier_extendedDescription": "Anilist verarbeitet einige Unicode Zeichen inkorrekt, was zum Abschneiden von Posts führt. Dieses Modul konvertiert sie zu sog. 'HTML entity escape codes', mit denen die Seite umgehen kann. (Dies könnten sie selber tun, wenn sie wollten)\nOriginale Idee vom großartigen GoBusto: https://files.kiniro.uk/unicodifier.html", "$rewatch_suffix_1": "[Rewatch]", "$rewatch_suffix_M": "[Rewatch {0}]", "$reread_suffix_1": "[Reread]", "$reread_suffix_M": "[Reread {0}]" } } , "日本語": { "info": { "language": "日本語", "language_english": "Japanese", "locale": "jp-JP", "fallback": ["English"], "maintainer": "SoulBlade17", "maintainer_link": "https://anilist.co/user/SoulBlade17/", "discussion_link": "https://github.com/hohMiyazawa/Automail/issues/69", "notes": "Japanese is not my first language, so errors may be present in the translation. Please let me know if you find any errors." }, "keys": { "$loading": "読み込んでいます...", "$searching": "検索しています", "$load_more": "もっと読み込み", "$button_next": "次へ →", "$button_previous": "前へ", "$button_refresh": "更新する", "$button_edit": "編集", "$button_search": "検索", "$button_submit": "送信", "$button_publish": "著す", "$button_cancel": "キャンセル", "$button_add": "加える", "$button_run": "動く", "$placeholder_status": "ステータスを書く", "$placeholder_reply": "返事を書く", "$placeholder_message": "メッセージを書く", "$placeholder_forum": "フォーラムポストを書く", "$settings_title": "Automail設定", "$notImplemented": "申し訳ありませんが、まだ実装されていません。", "$settings_version": "バージョン: ", "$settings_homepage": "ホームページ: ", "$settings_repository": "レポジトリ: ", "$settings_category_Notifications": "通知", "$settings_category_Feeds": "フィード", "$settings_category_Forum": "フォーラム", "$settings_category_Lists": "リスト", "$settings_category_Profiles": "プロフィール", "$settings_category_Stats": "スタッツ", "$settings_category_Media": "メディア", "$settings_category_Navigation": "ナビゲーション", "$settings_category_Browse": "閲覧", "$settings_category_Script": "スクリプト", "$settings_category_Login": "ログイン", "$settings_category_Newly Added": "新規追加", "$settings_button_export": "エクスポート設定", "$settings_import": "インポート設定:", "$settings_experimental_suffix": "[実験的]", "$settings_partialLocalisationLanguage_description": "Automail言語", "$settings_notificationDotColour": "通知ドットの色", "$setting_notifications": "通知の改善", "$setting_tweets": "リンクされたツイートを埋め込む", "$setting_CSSgreenManga": "漫画の緑のタイトル", "$setting_CSSbannerShadow": "バナーの影を消す", "$setting_MALserial": "漫画にMALの連載情報を追加", "$setting_MALscore": "メディアにMALの点数を追加", "$setting_MALrecs": "メディアにMALの推奨事項を追加", "$settings_moreInfo_tooltip": "もっと見る", "$settings_export_description": "ブラウザのキャッシュやストレージを消去するような場合、バックアップをとっておくと便利かもしれません。Automailの設定も消去されます。", "$settings_CSSadd": "プロフィールにカスタムCSSを追加します。これはスクリプトで他の人にも見えるようになります。", "$settings_CSSlinkTip": "(スタイルシートへの直接リンクも使用できます)", "$settings_pinnedActivity": "プロフィールにピン留めされたアクティビティを追加する", "$setting_moreStats": "統計ページで追加のタブを表示する", "$setting_compare": "ネイティブ比較機能を置き換える", "$setting_CSSsmileyScore": "スマイリーのレーティングに明確な色を付ける", "$setting_CSSmobileTags": "モバイルのメディアページでタグ投票を非表示にしない", "$setting_infoTable": "メディアページの情報は2カラムのテーブルレイアウトを使用する", "$setting_reinaDark": "ハイコントラストダークサイトテーマを追加する 【Reinaによる】", "$cssTooBig": "カスタムCSSが1MBを超えています。小さくするか、リンクで代用して下さい。", "$jsonTooBig": "プロファイルのJSONが1MBを超える", "$debug_tip": "(おい、バグを報告するときにこのファイルを添付してくれると助かるんだけどな。私の生活が楽になります)", "$profileBackground_help1": "プロフィールの背景を設定する、例:", "$profileBackground_help2": "ヒント:透明度の高い色を使用すると、明るいテーマと暗いテーマの両方でより効果的に機能します。例:", "$profileBackground_help3": "ヒント2:色あせた画像を固定したまま、画面いっぱいに表示させたい?これはその方法です。", "$mediaStatus_current": "現在", "$mediaStatus_watching": "視聴している", "$mediaStatus_reading": "読んでいる", "$mediaStatus_completed": "完成", "$mediaStatus_completedWatching": "完成", "$mediaStatus_completedReading": "完成", "$mediaStatus_repeating": "繰り返している", "$mediaStatus_rewatching": "再視聴", "$mediaStatus_rereading": "再読", "$mediaStatus_paused": "休止中", "$mediaStatus_dropped": "ドロップした", "$mediaStatus_planning": "志している", "$listActivity_MreadChapter": " の第 {0} 章を読みました。", "$listActivity_MwatchedEpisode": " の第 {0} 話を見ました。", "$listActivity_planningManga": " を読む予定です。", "$listActivity_planningAnime": " を見る予定です。", "$listActivity_completedManga": " を完成させました。", "$listActivity_completedAnime": " を完成させました。", "$listActivity_repeatedManga": " を再読しました。", "$listActivity_repeatedAnime": " を再視聴しました。", "$listActivity_pausedManga": " 読むのを一時中断しました。", "$listActivity_pausedAnime": " 見るのを一時中断しました。", "$listActivity_droppedManga": " をドロップしました。", "$listActivity_droppedAnime": " をドロップしました。", "$listActivity_MdroppedManga": " の {0} をドロップしました。", "$listActivity_MdroppedAnime": " の {0} をドロップしました。", "$listActivity_MrepeatingManga": " の第 {0} 章を再読しました。", "$listActivity_MrepeatingAnime": " の第 {0} 章を再視聴しました。", "$notification_likeActivity_1person_1activity": " は貴方のアクティビティを気に入っていました。", "$notification_likeActivity_1person_Mactivity": " は貴方のアクティビティを気に入っていました。", "$notification_likeActivity_2person_1activity": " は貴方のアクティビティを気に入っていました。", "$notification_likeActivity_2person_Mactivity": " は貴方のアクティビティを気に入っていました。", "$notification_likeActivity_Mperson_1activity": " は貴方のアクティビティを気に入っていました。", "$notification_likeActivity_Mperson_Mactivity": " は貴方のアクティビティを気に入っていました。", "$notification_likeReply_1person_1reply": " は貴方の返事を気に入っていました。", "$notification_likeReply_1person_Mreply": " は貴方の返事を気に入っていました。", "$notification_likeReply_2person_1reply": " は貴方の返事を気に入っていました。", "$notification_likeReply_2person_Mreply": " は貴方の返事を気に入っていました。", "$notification_likeReply_Mperson_1reply": " は貴方の返事を気に入っていました。", "$notification_likeReply_Mperson_Mreply": " は貴方の返事を気に入っていました。", "$notification_reply_1person_1reply": " は貴方のアクティビティに返信しました。", "$notification_reply_1person_Mreply": " は貴方のアクティビティに返信しました。", "$notification_reply_2person_1reply": " は貴方のアクティビティに返信しました。", "$notification_reply_2person_Mreply": " は貴方のアクティビティに返信しました。", "$notification_reply_Mperson_1reply": " は貴方のアクティビティに返信しました。", "$notification_reply_Mperson_Mreply": " は貴方のアクティビティに返信しました。", "$notification_replyReply_1person_1reply": " は貴方が申し込んだアクティビティに返信しました。", "$notification_newMedia": " が最近追加されました。", "$notification_airing": "{1}の{0}話が放送されました。", "$notification_message": " 貴方にメッセージを送りました。", "$notification_mention": " のアクティビティで貴方をメンションしました。", "$notification_follow": " が貴方のフォローを開始しました。", "$notifications_softBlock": "ソフトブロックユーザー", "$notifications_hideLike": "「いいね!」通知を隠す", "$notifications_showDefault": "デフォルトの通知を表示する", "$notifications_comments": "コメント", "$notifications_button_reset": "全て既読にする", "$notifications_showHoh": "代替の通知を表示する", "$notification_forumCommentLike": " フォーラムスレッドで、は貴方のコメントが気に入りました。", "$notification_forumMention": " フォーラムスレッドで、は貴方にメンションしました。,", "$timeline_search_description": "誰かのアクティビティを探していますか?", "$noScrollPosts_description": "長さに関係なく、すべてのステータスポストをフルで表示する", "$ALbuttonReload_description": "「AL」ボタンでトップページのフィードを再読み込みする", "$piracy_message": "これは悪いリンクです、現在処分です (通報ボタンをクリックして、このいたずらなユーザーをモデレーターで呼び出します)", "$recs_description": "各ペアは、自分の好きなもの+始めていないもの\nベストマッチを先にする", "$module_unicodifier_description": "絵文字をAnilistで使えるように変換する", "$module_unicodifier_extendedDescription": "Anilistは一部のUnicode文字を正しく扱えないため、投稿が切り捨てられることがあります。このモジュールはそれらをHTMLエンティティエスケープコードに変換し、サイトが扱えるようにします。(やろうと思えば簡単に自分でできます)\n創意は偉大なGoBustoによるものです: https://files.kiniro.uk/unicodifier.html", "$query_autorecs_info": "貴方の評価、他の人の評価、レコメンデーションデータベースを基にしたトップピックです。ベストマッチが上位に表示されます。", "$mobileFriendly_description": "モバイルフレンドリーモード。モバイルで正常に動作しない一部のモジュールを無効化し、その他のモジュールを調整します。", "$compare_hoh": "代替の比較を表示する", "$documentTitle_notifications": "通知 · AniList", "$documentTitle_home": "ホーム · AniList", "$documentTitle_forum": "フォーラム - アニメ・マンガの議論 · AniList", "$documentTitle_forum_prefix": "フォーラム", "$documentTitle_appSettings": "アプリとAutomailの設定 · AniList", "$preview_animeSection_title": "アニメ放映中", "$preview_mangaSection_title": "連載中のマンガ", "$preview_airingSection_title": "放映中", "$preview_1behind": "1話遅れ", "$preview_Mbehind": "{0}話遅れ", "$preview_progress": "進捗状況:", "$publishingReply": "出版返信...", "$anisongs_openings": "アニメ OP", "$anisongs_opening": "アニメ OP", "$anisongs_endings": "アニメ ED", "$anisongs_ending": "アニメ ED", "$submenu_stats": "スタッツ", "$submenu_social": "社会的", "$submenu_reviews": "レビュー", "$submenu_favourites": "お気に入り", "$submenu_submissions": "投稿", "$submenu_staff": "スタッフ", "$submenu_characters": "キャラクター", "$submenu_recommendations": "おすすめ", "$mainMenu_notifications": "通知", "$mainMenu_profile": "プロフィール", "$mainMenu_settings": "設定", "$timeline_title": "アクティビティタイムライン", "$filter_replies": "返信あり", "$filter_following": "フォロー中", "$input_user_placeholder": "ユーザー", "$error_userNotFound": "ユーザーが見つかりません", "$error_connection": "接続エラー", "$myThreads_link": "私のスレッド", "$compare_default": "デフォルトの比較を表示する", "$compare_minRatings": "最低レーティング:", "$compare_individualRatings": "個別レーティングシステム:", "$compare_normalizeRatings": "レーティングをノーマライズする:", "$compare_colourCell": "セル全体をカラー化:", "$compare_listStatus": "任意のリストの状態\nクリックして切り替える", "$404_private_or_noUser": "{0} は存在しないか、プライベートなプロファイルを持っています。", "$404_private": "{0} はプライベートなプロフィールです。", "$404_noUser": "{0} は存在しません。", "$404_blocked": "{0} が貴方をブロックしました。", "$recs_forYou": "貴方へ", "$download_banner_tooltip": "ダウンロードバナー", "$rewatch_suffix_1": "[再視聴]", "$rewatch_suffix_M": "[再視聴 {0}]", "$reread_suffix_1": "[再読]", "$reread_suffix_M": "[再読 {0}]", "$reviewLike_tooltip": "{1}人中{0}人がこのレビューを気に入りました。", "$review_reviewTitle": "{1} による {0} のレビュー", "$updates_noNewManga": "新しいアイテムは見つかりませんでした。 :(", "$staff_filter_placeholder": "タイトルや役割などによる絞り込み", "$relations_following_only": "フォロー中のみ", "$relations_followers_only": "フォロワーのみ", "$relations_mutuals": "共通", "$relations_shared_following": "共通フォロー中", "$relations_shared_followers": "共通フォロワー", "$relations_description": "ソーシャルページに様々なタイプのフォロワーに対応した個別のタブを追加", "$additionalTranslation_description": "Anilist UI の追加部分を翻訳する", "$twoColumnFeed_description": "ホームフィードを2列に分割する", "$markdown_help_title": "マークダウンヘルプ", "$markdown_help_description": "左下にマークダウンヘルパーを追加する", "$markdown_help_images_header": "イメージ", "$markdown_help_imageUpload": "(リンクを得るにはどこかにアップロードする必要があります)", "$markdown_help_imageSize": "サイズ調整:", "$markdown_help_links_header": "リンク", "$markdown_help_formatting_header": "書式設定", "$markdown_help_infixOr": "または", "$navigation_profileLink": "{0}のプロフィール", "$MAL_score": "MALのスコア", "$MAL_serialization": "連載", "$adjustColours_title": "色を調整する", "$button_newChapters": "新しい章", "$scanning": "スキャニング...", "$noResults": "結果は見つかりませんでした。", "$filters": "フィルター", "$filters_lists": "リスト", "$filters_year": "年", "$heading_anime": "アニメ:", "$heading_manga": "漫画:", "$heading_similarFavs": "類似のお気に入り:", "$stats_animeRated": "アニメ評価: ", "$stats_mangaRated": "漫画評価: ", "$stats_averageScore": "平均スコア: ", "$stats_onlyOne": "1点のみ採点: ", "$stats_medianScore": "スコア中央値: ", "$stats_globalDifference": "世界的差異: ", "$stats_globalDeviation": "世界偏差値: ", "$stats_ratingEntropy": "評価エントロピー: ", "$stats_mostCommonScore": "最も多いスコア: ", "$stats_timeWatched": "視聴時間: ", "$stats_totalChapters": "全チャプター: ", "$stats_totalVolumes": "全巻共通: ", "$stats_TVEpisodesWatched": "視聴したテレビエピソード: ", "$stats_TVEpisodesRemaining": "現在放送中の番組の残りエピソード: ", "$stats_firstLoggedAnime": "初ログしたアニメ: ", "$stats_firstLoggedAnime_note": "(開始日はユーザーが自由に変更可能です)", "$stats_weightComment_duration": " (期間加重)", "$stats_weightComment_chapers": " (チャプター加重)", "$stats_globalDifference_comment": " (世界平均との平均差)", "$stats_globalDeviation_comment": " (各エントリーの世界平均からの標準偏差)", "$stats_ratingEntropy_comment": " ビット/レーティング(数字が大きいほど細かいレーティングです。 通常は1〜6までです。)", "$stats_moreStats_title": "その他の統計情報", "$stats_genresTags_title": "ジャンル&タグ", "$stats_genre": "ジャンル", "$stats_tag": "タグ", "$stats_count": "回数", "$stats_name": "名前", "$stats_siteStats_title": "サイトスタッツ", "$stats_anime_heading": "{0}のアニメのスタッツ", "$stats_manga_heading": "{0}漫画のスタッツ", "$stats_loadingAnime": "アニメリストを読み込んでいます...", "$stats_loadingManga": "マンガリストを読み込んでいます...", "$stats_instances": "({0} 回)", "$stats_longestTime": "{0}% は {1}", "$stats_varousStats_heading": "各種統計", "$stats_longest_watching": "現在視聴中。", "$stats_longest_paused": "保留中。", "$stats_longest_dropped": "ドロップした。", "$stats_longest_1rewatch": "一度再視聴した。", "$stats_longest_2rewatch": "2回再視聴した。", "$stats_longest_Mrewatch": "{0} 回再視聴した。", "$stats_longest_1rewatching": "初めての再視聴中。", "$stats_longest_2rewatching": "2回目の再視聴中。", "$stats_longest_Mrewatching": "{0} 回目の再視聴中。", "$stats_longest_1rewatchPaused": "初めての再視聴は保留。", "$stats_longest_2rewatchPaused": "2回目の再視聴は保留。", "$stats_longest_MrewatchPaused": "{0} 回目の再視聴は保留。", "$stats_longest_1rewatchDropped": "1回目の再視聴でドロップした。", "$stats_longest_2rewatchDropped": "2回目の再視聴でドロップした。", "$stats_longest_MrewatchDropped": "{0} 回目の再視聴でドロップした。", "$stats_animeOnList": "アニメのリスト数: ", "$stats_mangaOnList": "漫画のリスト数: ", "$stats_instances_unique": "同じスコアが2つとない", "$time_now": "今", "$time_1second": "1秒前", "$time_Msecond": "{0}秒前", "$time_1minute": "1分前", "$time_Mminute": "{0}分前", "$time_1hour": "1時間前", "$time_Mhour": "{0}時間前", "$time_1day": "1日前", "$time_Mday": "{0}日前", "$time_1week": "1週間前", "$time_Mweek": "{0}週間前", "$time_1month": "1ヶ月前", "$time_Mmonth": "{0}ヶ月前", "$time_1year": "1年前", "$time_Myear": "{0}年前", "$time_medium_Mday": "日前", "$time_short_second": "秒", "$time_short_minute": "分", "$time_short_hour": "時間", "$time_short_day": "日", "$time_short_week": "週間", "$time_short_month": "ヶ月", "$time_short_year": "年", "$language_English": "英語", "$language_German": "ドイツ語", "$language_Italian": "イタリア語", "$language_Spanish": "スペイン語", "$language_French": "フランス語", "$language_Korean": "朝鮮語", "$language_Portuguese": "ポルトガル語", "$language_Hebrew": "ヘブライ語", "$language_Hungarian": "ハンガリー語", "$language_Chinese": "中国語", "$language_Japanese": "日本語", "$language_Arabic": "アラビア語", "$language_Filipino": "フィリピン語", "$language_Catalan": "カタルーニャ語", "$language_Polish": "ポーランド語", "$language_Norwegian": "ノルウェー語", "$default_filename": "Anilist.coからのファイル", "$page": "{0}ページ", "$dubMarker_notice": "{0}ダビングがあります", "$button_reset": "リセットする", "$button_resetAll": "全てをリセットする", "$button_defaultSettings": "デフォルト設定", "$menu_animelist": "アニメリスト", "$menu_mangalist": "マンガリスト", "$preview_animeSection_title": "進行中のアニメ", "$preview_mangaSection_title": "進行中のマンガ", "$characterBrowseTooltip": "お気に入り", "$make3x3": "3×3を作る", "$make3x3_title": "このボタンをクリックして、リストにある9つのエントリーをクリックします。", "$forum_preview_reply": " 返事した", "$staff_filterHelp": "フィルターヘルプ", "$staff_hoursWatched": "視聴時間数: ", "$staff_chaptersRead": " 読まれた章: ", "$staff_volumesRead": " 読了巻数: ", "$staff_meanScore": " 平均スコア: ", "$staff_sort": "ソート", "$sort_alphabetical": "アルファベット順", "$sort_newest": "最新", "$sort_oldest": "最高齢", "$sort_length": "長さ", "$sort_popularity": "人気", "$sort_score": "スコア", "$sort_myScore": "私のスコア", "$sort_myProgress": "私の進歩", "$milestones_totalVolumes": "全巻共通", "$milestones_totalEpisodes": "全話数", "$milestones_daysWatched": "{0} 視聴日数", "$milestones_chaptersRead": "{0} 章を読んだ", "$colour_transparent": "透明", "$colour_blue": "青", "$colour_white": "白い", "$colour_black": "黒", "$colour_red": "赤", "$colour_peach": "ピーチカラー", "$colour_orange": "オレンジ", "$colour_yellow": "黄", "$colour_green": "緑", "$terms_description": "https://anilist.co/terms ページに低帯域のフィードを追加する", "$terms_privacyPolicy": "代わりにプライバシーポリシーを見る", "$terms_privacyPolicy_title": "このページは通常Anilistのプライバシーポリシーを表示しています。クリックするとデフォルトの表示になります。", "$terms_signin": "このモジュールは、Automailにサインインしていないと動作しません", "$terms_signin_link": "スクリプトでサインイン", "$terms_option_global": "世界的", "$terms_option_text": "テキストポスト", "$terms_option_replies": "返信あり", "$terms_option_forum": "フォーラム", "$terms_option_reviews": "レビュー", "$terms_option_user": "ユーザー", "$terms_option_media": "メディア", "$mediaStaff_filter": "フィルター", "$socialTab_tooManyChapters": "データベースが更新された可能性が高いです。", "$socialTab_users": "ユーザー", "$socialTab_shortAverage": "平均", "$query_firstActivity": "最初のアクティビティ", "$query_autorecs": "自動のおすすめ", "$query_autorecs_collecting": "リストデータを収集する...", "$query_autorecs_processing": "処理中...", "$hideLikes_description": "「いいね!」を非表示にします。通知回数には影響しません", "$settingsTip_description": "通知ページでスクリプトの設定がどこにあるか通知を表示します", "$settings_errorInvalidJSON": "無効なプロファイルJSON", "$settings_errorInvalidActivity": "はアクティビティまたはアクティビティIDへの直接リンクでなければなりません", "$settings_errorInvalidActivity2": "アクティビティが見つかりませんでした", "$dismissDot_description": "サインイン時に通知を解除する仕様を表示します", "$socialTab_description": "メディアソーシャルタブの平均スコア、進捗、メモ", "$socialTabFeed_description": "メディアソーシャルタブフィードフィルター", "$forumMedia_description": "トップページのフォーラムプレビューにタグ付けされたメディアを追加する", "$mangaBrowse_description": "閲覧のデフォルトを漫画にする", "$dblclickZoom_description": "アクティビティをダブルクリックすると拡大表示されます", "$dblclickZoom_extendedDescription": "ブラウザのアクセシビリティアドオンにはもっと良いものがありそうです。", "$staff_animeRoles": "アニメスタッフの役割", "$staff_mangaRoles": "漫画スタッフの役割", "$staff_voiceRoles": "声優の役割", "$forumHeading_recentlyActive": "最近アクティブなスレッド", "$forumHeading_releaseDiscussion": "リリースに関するディスカッションスレッド", "$forumHeading_newThreads": "新規作成スレッド", "$forumMedia_backlink": "フォーラムフィードに作品のデータベースページへのリンクバックを追加する", "$home_reviewLink": "最近のレビュー", "$home_forumLink": "フォーラムアクティビティ", "$home_trendingAnime": "トレンドアニメ", "$home_trendingManga": " & 漫画", "$home_newAnime": "新規追加アニメ", "$home_newManga": "新規追加漫画", "$footer_siteTheme": "サイトテーマ", "$theme_default": "デフォルト", "$theme_dark": "ダーク", "$theme_highContrast": "ハイコントラスト", "$theme_highContrastDark": "ハイコントラストダーク", "$feed_header": "アクティビティ", "$feedSelect_all": "全て", "$feedSelect_text": "テキストステータス", "$feedSelect_list": "リストの進捗", "$feedSelect_status": "ステータス", "$feedSelect_message": "メッセージ", "$mediaFormat_NOVEL" : "ライトノベル", "$mediaFormat_TV" : "テレビ", "$mediaFormat_TV_SHORT" : "テレビショート", "$mediaFormat_MOVIE" : "映画", "$mediaFormat_SPECIAL" : "スペシャル", "$mediaFormat_OVA" : "OVA", "$mediaFormat_ONA" : "ONA", "$mediaFormat_MUSIC" : "音楽", "$mediaFormat_MANGA" : "漫画", "$mediaFormat_ONE_SHOT" : "1コマ", "$forumCategory_1": "アニメ", "$forumCategory_2": "漫画", "$forumCategory_3": "ライトノベル", "$forumCategory_4": "ビジュアルノベル", "$forumCategory_9": "音楽", "$forumCategory_5": "リリースディスカッション", "$forumCategory_7": "一般", "$forumCategory_8": "ニュース", "$forumCategory_10": "ゲーミング", "$forumCategory_11": "サイトフィードバック", "$forumCategory_12": "バグレポート", "$forumCategory_13": "サイト告知", "$forumCategory_14": "リストカスタマイズ", "$forumCategory_15": "おすすめ", "$forumCategory_16": "フォーラムゲーム", "$forumCategory_17": "その他", "$forumCategory_18": "AniList アップ", "$submenu_anime": "アニメ", "$submenu_manga": "漫画", "$menu_home": "ホーム", "$menu_profile": "プロフィール", "$menu_browse": "閲覧", "$menu_forum": "フォーラム", "$generic_anime": "アニメ", "$generic_manga": "漫画", "$role_Animation Director": "アニメーション監督", "$role_Director": "監督", "$role_Assistant Director": "助監督", "$role_Key Animation": "原画", "$role_In-Between Animation": "動画", "$role_Storyboard": "絵コンテ", "$role_Planning": "企画", "$role_Music": "音楽", "$role_Color": "カラー", "$role_Color Coordination": "色指定", "$role_Art Director": "美術監督", "$role_Theme Song Arrangement": "テーマ曲のアレンジ", "$role_Theme Song Lyrics": "テーマ曲の歌詞", "$role_Chief Producer": "チーフプロデューサー", "$role_Episode Director": "エピソード監督", "$role_Theme Song Performance (OP)": "テーマ曲演奏(OP)", "$role_Theme Song Performance (ED)": "テーマ曲演奏(ED)", "$role_Character Design": "キャラクターデザイン", "$role_Sound Director": "音響監督", "$role_Chief Animation Director": "総作画監督", } } , "Åarjelsaemie": { "info": { "language": "Åarjelsaemie", "language_english": "Southern Sami", "locale": "sma", "fallback": ["Norsk","Svenska","English"], "maintainer": "hoh", "maintainer_link": "https://anilist.co/user/hoh/", "discussion_link": "", "notes": "" }, "keys": { "$button_search": "Ohtsh", "$settings_experimental_suffix": "[PRYÖVENASSE]", "$settings_partialLocalisationLanguage_description": "Automailen gïele", "$stats_moreStats_title": "Vielie Deahpadimmieh", "$stats_siteStats_title": "Sijjien Deahpadimmieh", "$stats_longestTime": "{1} {0}% lea", "$stats_mostCommonScore": "Sïejhmemes: ", "$stats_name": "Nomme", "$settings_title": "Automailen bïjre", "$settings_version": "Versjovne: ", "$settings_homepage": "Gaskeviermesne: ", "$settings_category_Feeds": "Galkijh", "$settings_category_Newly Added": "Orre", "$notification_likeActivity_1person_1activity": " dov aatem lyjhki.", "$notification_likeActivity_1person_Mactivity": " dov aath lyjhki.", "$notification_likeActivity_2person_1activity": " dov aatem lyjhkigan.", "$notification_likeActivity_2person_Mactivity": " dov aath lyjhkigan.", "$notification_likeActivity_Mperson_1activity": " dov aatem lyjhkin.", "$notification_likeActivity_Mperson_Mactivity": " dov aath lyjhkin.", "$notification_message": " prieviem seedti.", "$menu_home": "gåetie", "$menu_profile": "manne", "$menu_animelist": "animelæstoe", "$menu_mangalist": "mangalæstoe", "$menu_browse": "ohtsh", "$menu_forum": "digkie", "$filters_year": "Jaepie", "$markdown_help_images_header": "Guvvieh", "$markdown_help_infixOr": "jallh", "$preview_animeSection_title": "Dov Anime", "$preview_mangaSection_title": "Dov Manga", "$preview_airingSection_title": "Saadtegh", "$recs_forYou": "Dutnjien", "$colour_transparent": "Tjaetsie", "$colour_blue": "Plaave", "$colour_white": "Veelkes", "$colour_black": "Tjeehpes", "$colour_red": "Rööpses", "$colour_peach": "Peersika", "$colour_orange": "Rööps-viskes", "$colour_yellow": "Viskes", "$colour_green": "Kruana", "$mediaFormat_ONE_SHOT" : "Oktegh" } } , "Norsk": { "info": { "language": "Norsk", "language_english": "Norwegian", "locale": "nn-NO", "fallback": ["Svenska","English"], "maintainer": "hoh", "maintainer_link": "https://anilist.co/user/hoh/", "discussion_link": "", "notes": "" }, "keys": { "$meta_scriptDescription": "Ekstradelar for Anilist.co", "$loading": "Lastar...", "$searching": "Søker", "$load_more": "Last Meir", "$time_now": "No", "$time_1second": "1 sekund sida", "$time_Msecond": "{0} sekund sida", "$time_1minute": "1 minutt sida", "$time_Mminute": "{0} minutt sida", "$time_1hour": "1 time sida", "$time_Mhour": "{0} timar sida", "$time_1day": "1 dag sida", "$time_Mday": "{0} dagar sida", "$time_1week": "1 veke sida", "$time_Mweek": "{0} veker sida", "$time_1month": "1 månad sida", "$time_Mmonth": "{0} månadar sida", "$time_1year": "1 år sida", "$time_Myear": "{0} år sida", "$time_medium_second": "sekund", "$time_medium_minute": "minutt", "$time_medium_hour": "hour", "$time_medium_day": "dag", "$time_medium_week": "veke", "$time_medium_month": "månad", "$time_medium_year": "år", "$time_medium_Msecond": "sekund", "$time_medium_Mminute": "minutt", "$time_medium_Mhour": "timar", "$time_medium_Mday": "dagar", "$time_medium_Mweek": "veker", "$time_medium_Mmonth": "månadar", "$time_medium_Myear": "år", "$time_short_second": "s", "$time_short_minute": "m", "$time_short_hour": "t", "$time_short_day": "d", "$time_short_week": "v", "$time_short_month": "m", "$time_short_year": "å", "$language_English": "engelsk", "$language_German": "tysk", "$language_Italian": "italiensk", "$language_Spanish": "spansk", "$language_French": "fransk", "$language_Korean": "koreansk", "$language_Portuguese": "portugisisk", "$language_Hebrew": "hebraisk", "$language_Hungarian": "ungarsk", "$language_Chinese": "kinesisk", "$language_Japanese": "japansk", "$language_Arabic": "arabisk", "$language_Filipino": "filippinsk", "$language_Catalan": "katalansk", "$language_Polish": "polsk", "$language_Norwegian": "norsk", "$default_filename": "Fil frå Anilist.co", "$generic_anime": "Anime", "$generic_manga": "Manga", "$page": "Side {0}", "$dubMarker_notice": "Har {0} tale", "$button_submit": "Send inn", "$button_search": "Søk", "$button_next": "Neste →", "$button_previous": "← Forrige", "$button_refresh": "Last på nytt", "$button_add": "Legg til", "$button_edit": "Endra", "$button_run": "Køyr", "$button_reset": "Nullstill", "$button_resetAll": "Nullstill alle", "$button_defaultSettings": "Nullstill alle innstillingar", "$button_publish": "Post", "$button_cancel": "Avbryt", "$placeholder_status": "Skriv ein post...", "$placeholder_reply": "Skriv eit svar...", "$placeholder_message": "Skriv ei melding...", "$placeholder_forum": "Skriv ein forumtråd...", "$publishingReply": "Postar svar...", "$settings_title": "Innstillingar for Automail", "$settings_version": "Versjon: ", "$settings_homepage": "Heimeside: ", "$settings_repository": "Kjeldekode: ", "$settings_moreInfo_tooltip": "Meir info", "$settings_category_Notifications": "Meldingar", "$settings_category_Feeds": "Straumar", "$settings_category_Forum": "Forum", "$settings_category_Lists": "Lister", "$settings_category_Profiles": "Profilar", "$settings_category_Stats": "Statistikk", "$settings_category_Media": "Media", "$settings_category_Navigation": "Navigering", "$settings_category_Browse": "Leit", "$settings_category_Script": "Skript", "$settings_category_Login": "Innlogging", "$settings_category_Newly Added": "Nytt", "$settings_experimental_suffix": "[UNDER UTRPROVING]", "$settings_CSSadd": "Skriv CSS til profilen din. Andre med skriptet vil sjå dette.", "$settings_CSSlinkTip": "(Du kan og nytta ei lenkje til ei CSS-fil)", "$settings_notificationDotColour": "Meldingsdottfargar", "$setting_MALserial": "Publiseringsinfo frå MAL", "$setting_MALscore": "Snittvurdering frå MAL", "$setting_MALrecs": "Tildrådingar frå MAL", "$setting_reinaDark": "Lett til eit mørkt kontrastfargetema [av Reina]", "$setting_CSSmobileTags": "Ikkje skjul emner på mobilsida", "$setting_infoTable": "Bruk dobbel kolonne for infoboksen på mediasider", "$cssTooBig": "Meir enn 1MB CSS. Gjer det mindre, eller nytt ei lenkje.", "$jsonTooBig": "Profil-JSON er over 1MB", "$settings_errorInvalidJSON": "Ugyldig profil-JSON", "$noScrollPosts_description": "Ikkje kort ned tekstpostar, uansett kor lange dei er", "$notImplemented": "Ikkje implementert", "$socialTabFeed_noActivities": "Ingen treff", "$rewatch_suffix_1": "[sett oppatt]", "$reread_suffix_1": "[lese oppatt]", "$reread_suffix_M": "[oppattlesing {0}]", "$settings_partialLocalisationLanguage_description": "Automailspråk", "$additionalTranslation_description": "Omset meir av Anilist", "$button_newChapters": "Nye Kapittel", "$stats_anime_heading": "Animestatistikk for {0}", "$stats_manga_heading": "Mangastatistikk for {0}", "$stats_moreStats_title": "Meir Statistikk", "$stats_genresTags_title": "Sjangrar & Emne", "$stats_genre": "Sjanger", "$stats_tag": "Emne", "$stats_count": "Tal", "$stats_name": "Namn", "$stats_globalDifference": "Global skilnad: ", "$stats_globalDeviation": "Globalt avvik: ", "$stats_siteStats_title": "Sidestatistikk", "$stats_averageScore": "Gjennomsnitt: ", "$stats_weightComment_duration": " (vekta etter lengd)", "$stats_weightComment_chapers": " (vekta etter lengd i kapittel)", "$stats_medianScore": "Median: ", "$stats_mostCommonScore": "Mest vanleg: ", "$stats_ratingEntropy": "Entropi: ", "$stats_ratingEntropy_comment": " bit/vurdering (større tal = meir finkorna. Vanlegvis mellom 1 - 6)", "$stats_firstLoggedAnime": "Fyrste anime: ", "$stats_firstLoggedAnime_note": "(folk kan fritt endra datoen)", "$staff_filterHelp": "Filterhjelp", "$stats_loadingAnime": "lastar animelista...", "$stats_loadingManga": "lastar mangalista...", "$stats_instances": "({0} gongar)", "$stats_longestTime": "{0}% er {1}", "$stats_totalChapters": "Kapittel: ", "$stats_totalVolumes": "Band: ", "$stats_varousStats_heading": "Anna statistikk", "$stats_longest_watching": "Ser no.", "$stats_longest_paused": "Stogga.", "$stats_longest_dropped": "Droppa.", "$stats_longest_1rewatch": "Sett to gongar.", "$stats_longest_2rewatch": "Sett tre gongar.", "$stats_longest_Mrewatch": "Sett på nytt {0} gongar.", "$stats_longest_1rewatching": "Ser oppatt for fyrste gong.", "$stats_longest_2rewatching": "Ser oppatt for andre gong.", "$stats_longest_Mrewatching": "Ser oppatt gong nummer {0}.", "$stats_longest_1rewatchPaused": "Fyrste oppattsjåing stogga.", "$stats_longest_2rewatchPaused": "Andre oppattsjåing stogga.", "$stats_longest_MrewatchPaused": "Oppattsjåing {0} stogga.", "$stats_instances_unique": "ingen like", "$stats_onlyOne": "Berre ei vurdering: ", "$stats_TVEpisodesWatched": "TV-episodar sett: ", "$stats_TVEpisodesRemaining": "TV-episodar som står att: ", "$stats_animeOnList": "Anime på lista: ", "$stats_mangaOnList": "Manga på lista: ", "$stats_animeRated": "Anime med vurdering: ", "$stats_mangaRated": "Manga med vurdering: ", "$heading_similarFavs": "Like favorittar:", "$socialTab_tooManyChapters": "Talet i databasen har nok endra seg", "$socialTab_shortAverage": "Snitt", "$socialTab_users": "Fylgjer", "$profileBackground_help1": "Lag ein profilbakgrunn, døme:", "$profileBackground_help2": "Tips: Bruk ein gjennomsiktig farge, så han fungerer for både det ljose og mørke fargetemaet. Døme:", "$MAL_score": "MAL-vurdering", "$MAL_serialization": "Blad", "$filters": "Filter", "$filters_lists": "Lister", "$filters_year": "År", "$markdown_help_links_header": "Lenkjer", "$markdown_help_imageSize": "Endra storleik:", "$markdown_help_imageUpload": "(du må lasta opp biletet ein anna stad for å få ein link)", "$markdown_help_formatting_header": "Formatering", "$stats_timeWatched": "Tid sett: ", "$setting_notifications": "Betre meldingssystem", "$adjustColours_title": "Fargejustering", "$settings_import": "Importer innstillingar:", "$setting_moreStats": "Legg til ei ekstra fane på statistikksida", "$setting_compare": "Betre listesamanlikning", "$compare_listStatus": "kva status som helst\nklikk for å endra", "$compare_normalizeRatings": "Normalisert skala:", "$heading_anime": "Anime:", "$heading_manga": "Manga:", "$submenu_stats": "Statistikk", "$submenu_anime": "Anime", "$submenu_manga": "Manga", "$mainMenu_notifications": "Meldingar", "$mainMenu_profile": "Profil", "$mainMenu_settings": "Innstillingar", "$mediaStaff_filter": "Filtrer", "$notification_likeActivity_1person_1activity": " likte posten din.", "$notification_likeActivity_1person_Mactivity": " likte postane dine.", "$notification_likeActivity_2person_1activity": " likte posten din.", "$notification_likeActivity_2person_Mactivity": " likte postane dine.", "$notification_likeActivity_Mperson_1activity": " likte posten din.", "$notification_likeActivity_Mperson_Mactivity": " likte postane dine.", "$notification_likeReply_1person_1reply": " likte svaret ditt.", "$notification_likeReply_1person_Mreply": " likte svara dine.", "$notification_likeReply_2person_1reply": " likte svaret ditt.", "$notification_likeReply_2person_Mreply": " likte svara dine.", "$notification_likeReply_Mperson_1reply": " likte svaret ditt.", "$notification_likeReply_Mperson_Mreply": " likte svara dine.", "$notification_reply_1person_1reply": " svarte på posten din.", "$notification_reply_1person_Mreply": " svarte på postane dine.", "$notification_reply_2person_1reply": " svarte på posten din.", "$notification_reply_2person_Mreply": " svarte på postane dine.", "$notification_reply_Mperson_1reply": " svarte på posten din.", "$notification_reply_Mperson_Mreply": " svarte på postane dine.", "$notification_replyReply_1person_1reply": " svarte på ein tinga post.", "$notification_newMedia": "vart nyleg lagt til.", "$notification_airing": "Episode {0} av {1} sendt.", "$notification_message": " sende deg ei melding.", "$notification_mention": " nemde deg.", "$notification_forumCommentLike": " likte kommentaren din, i forumtråden ", "$notification_forumMention": " nemde deg, i forumtråden ", "$notification_follow": " fylgjer deg.", "$notifications_button_reset": "Merk alt som lese", "$notifications_showHoh": "Vis hoh-meldingsstraum", "$notifications_showDefault": "Vis vanleg meldingsstraum", "$notifications_comments": "svar", "$notifications_softBlock": "Mjukblokk", "$notifications_hideLike": "Skjul alle 'likte […]'", "$setting_CSSgreenManga": "Grøne mangatitlar", "$mediaStatus_reading": "les", "$mediaStatus_watching": "ser", "$mediaStatus_dropped": "droppa", "$mediaStatus_planning": "planlegg", "$mediaStatus_paused": "stogga", "$mediaStatus_completed": "ferdig", "$mediaStatus_completedWatching": "ferdig", "$mediaStatus_completedReading": "ferdig", "$mediaStatus_current": "på gang", "$mediaStatus_repeating": "på nytt", "$mediaStatus_rewatching": "ser oppatt", "$mediaStatus_rereading": "les oppatt", "$mediaStatus_planning_time": "planla {0}", "$listActivity_MreadChapter": "las kapittel {0} av ", "$listActivity_MwatchedEpisode": "såg episode {0} av ", "$listActivity_MrepeatingManga": "las oppatt kapittel {0} av ", "$listActivity_MrepeatingAnime": "såg oppatt episode {0} av ", "$listActivity_MreadChapter_known": "las kapittel {0}", "$listActivity_MwatchedEpisode_known": "såg episode {0}", "$listActivity_MrepeatingManga_known": "las oppatt kapittel {0}", "$listActivity_MrepeatingAnime_known": "såg oppatt episode {0}", "$listActivity_completedManga": "las ferdig ", "$listActivity_completedAnime": "såg ferdig ", "$listActivity_completedManga_known": "las ferdig", "$listActivity_completedAnime_known": "såg ferdig", "$listActivity_droppedManga": "droppa ", "$listActivity_droppedAnime": "droppa ", "$listActivity_droppedManga_known": "droppa", "$listActivity_droppedAnime_known": "droppa", "$listActivity_MdroppedManga": "droppa {0} av ", "$listActivity_MdroppedAnime": "droppa {0} av ", "$listActivity_MdroppedManga_known": "droppa {0}", "$listActivity_MdroppedAnime_known": "droppa {0}", "$listActivity_planningManga": "vil lesa ", "$listActivity_planningAnime": "vil sjå ", "$listActivity_planningManga_known": "vil lesa", "$listActivity_planningAnime_known": "vil sjå", "$listActivity_repeatedManga": "las oppatt ", "$listActivity_repeatedAnime": "såg oppatt ", "$listActivity_repeatedManga_known": "las oppatt", "$listActivity_repeatedAnime_known": "såg oppatt", "$listActivity_pausedManga": "stoppa lesa ", "$listActivity_pausedAnime": "stoppa sjå ", "$listActivity_pausedManga_known": "stoppa lesa", "$listActivity_pausedAnime_known": "stoppa sjå", "$preview_1behind": "1 episode bakpå", "$preview_Mbehind": "{0} episodar bakpå", "$preview_progress": "Framgang:", "$settings_pinnedActivity": "Fest ein post til profilstraumen din", "$settings_errorInvalidActivity": "må vera ei lenkje til posten, eller ein ID", "$settings_errorInvalidActivity2": "fann ikkje posten!", "$menu_home": "heim", "$menu_profile": "profil", "$menu_animelist": "animeliste", "$menu_mangalist": "mangaliste", "$menu_browse": "leit", "$menu_forum": "forum", "$submenu_social": "Sosialt", "$submenu_favourites": "Favorittar", "$submenu_submissions": "Database", "$submenu_staff": "Roller", "$submenu_reviews": "Omtalar", "$submenu_characters": "Karakterar", "$submenu_recommendations": "Tilrådingar", "$reviewLike_tooltip": "{0} av {1} likte omtalen", "$review_reviewTitle": "Omtale av {0} -\u00a0{1}", "$documentTitle_appSettings": "App & Automailinnstillingar · AniList", "$documentTitle_home": "Heim · AniList", "$documentTitle_notifications": "Meldingar · AniList", "$documentTitle_forum": "Forum - Anime- & Mangadiskusjon · AniList", "$documentTitle_forum_prefix": "Forum", "$404_private_or_noUser": "{0} finst ikkje eller har ein privat profil", "$404_private": "{0} har ein privat profil", "$404_noUser": "{0} finst ikkje", "$404_blocked": "{0} har blokka deg", "$preview_animeSection_title": "Anime på gang", "$preview_mangaSection_title": "Manga på gang", "$preview_airingSection_title": "På Lufta", "$forum_preview_reply": "svarte ", "$module_unicodifier_description": "Gjer om emojiar automatisk så dei fungerer på anilist", "$timeline_title": "Tidslinje", "$input_user_placeholder": "Namn", "$error_userNotFound": "Fann ikkje brukarnamnet", "$timeline_search_description": "Ser du etter ein anna person?", "$recs_forYou": "For Deg", "$recs_description": "Kvart par er noko du liker + noko du ikkje har sett enno\nBest fyrst", "$mobileFriendly_description": "Mobiljusteringar. Gjer naudsynte endringar for at skriptet skal virka greit på telefonar", "$ALbuttonReload_description": "Gjer at 'AL'-logoen lastar oppatt straumen på hovudsida", "$markdown_help_description": "Legg til formateringshjelp i nedre venstre hjørne", "$markdown_help_title": "Formateringshjelp", "$markdown_help_images_header": "Bilete", "$markdown_help_infixOr": "eller", "$navigation_profileLink": "Profilen til {0}", "$filter_replies": "Med svar", "$filter_following": "Fylgjer", "$staff_sort": "Sorter", "$staff_filter_placeholder": "Filtrer etter tittel, rolle, osb.", "$sort_alphabetical": "Alfabetisk", "$sort_newest": "Nytt", "$sort_oldest": "Gamalt", "$sort_myProgress": "Min Framgang", "$sort_length": "Lengd", "$sort_myScore": "Mi Vurdering", "$sort_score": "Vurderingar", "$sort_popularity": "Popularitet", "$download_banner_tooltip": "Last ned bakgrunnsbilete", "$piracy_message": "TEIT LENKJE, BORT MED HO! OwO (klikk på 'report'-knappen for å varsla moderatorane)", "$updates_noNewManga": "Fann ikkje noko nytt :(", "$twoColumnFeed_description": "Del heimestraumen i to kolonnar", "$compare_colourCell": "Farg heile ruta:", "$compare_default": "Sjå den vanlege samanlikninga", "$compare_hoh": "Sjå hoh-samanlikninga", "$colour_transparent": "Blank", "$colour_blue": "Blå", "$colour_white": "Kvit", "$colour_black": "Svart", "$colour_red": "Rau", "$colour_peach": "Pære", "$colour_orange": "Branngul", "$colour_yellow": "Gul", "$colour_green": "Grøn", "$terms_description": "Lag ein reservestraum for trege nettverk hjå https://anilist.co/terms", "$terms_privacyPolicy": "Vis personvernerklæringa", "$setting_CSSbannerShadow": "Fjern skuggen under bakgrunnsbileta", "$settings_button_export": "Last ned innstillingane", "$settings_export_description": "Kjekt å ha ein tryggingskopi. Viss du slettar cache/cookies kan Automailinnstillingane også bli borte", "$error_connection": "Koplingsfeil", "$terms_option_global": "Global", "$terms_option_text": "Tekst", "$terms_option_reviews": "Omtalar", "$terms_option_user": "Namn", "$terms_option_replies": "Med svar", "$terms_option_forum": "Forum", "$terms_option_media": "Media", "$noResults": "Ingen treff", "$query_firstActivity": "Fyrste post", "$query_autorecs": "Automattilråingar", "$query_autorecs_collecting": "Skaffar listedata...", "$query_autorecs_processing": "Reknar...", "$staff_animeRoles": "Animeroller", "$staff_mangaRoles": "Mangaroller", "$staff_voiceRoles": "Røyster", "$staff_hoursWatched": "timar sett: ", "$staff_chaptersRead": " kapittel lese: ", "$staff_volumesRead": " band lese: ", "$staff_meanScore": " snittvurdering: ", "$milestones_totalVolumes": "Band", "$milestones_totalEpisodes": "Episodar", "$milestones_daysWatched": "{0} dagar sett", "$milestones_chaptersRead": "{0} kapittel lese", "$characterBrowseTooltip": "Favorittar", "$make3x3": "Lag 3x3", "$make3x3_title": "Klikk knappen, og så 9 ting på lista", "$myThreads_link": "Mine Trådar", "$forumHeading_recentlyActive": "Aktive Trådar", "$forumHeading_newThreads": "Nye Trådar", "$forumHeading_releaseDiscussion": "Episodediskusjonar", "$footer_siteTheme": "Fargetema", "$theme_default": "Lyst", "$theme_dark": "Mørkt", "$theme_highContrast": "Kontrast", "$theme_highContrastDark": "Mørk Kontrast", "$home_reviewLink": "Omtalar", "$home_forumLink": "Forum", "$home_trendingAnime": "Populære Anime", "$home_trendingManga": " & Manga", "$home_newAnime": "Ny Anime", "$home_newManga": "Ny Manga", "$setting_CSSsmileyScore": "Fargelegg smilefjesvurderingar", "$feed_header": "Straum", "$feedSelect_all": "Alt", "$feedSelect_text": "Tekst", "$feedSelect_list": "Liste", "$feedSelect_status": "Tekst", "$feedSelect_message": "Meldingar", "$setting_tweets": "Ta med lenkja twitterlenkjer i postar", "$anisongs_openings": "Introar", "$anisongs_opening": "Intro", "$mediaFormat_TV" : "TV", "$mediaFormat_TV_SHORT" : "TV-snutt", "$mediaFormat_MOVIE" : "Film", "$mediaFormat_SPECIAL" : "Spesial", "$mediaFormat_OVA" : "OVA", "$mediaFormat_ONA" : "ONA", "$mediaFormat_MUSIC" : "Musikk", "$mediaFormat_MANGA" : "Manga", "$mediaFormat_NOVEL" : "Lettroman", "$mediaFormat_ONE_SHOT" : "Enkeltvis", "$forumCategory_1": "Anime", "$forumCategory_2": "Manga", "$forumCategory_3": "Lettromanar", "$forumCategory_4": "Animespel", "$forumCategory_5": "Slippdiskusjon", "$forumCategory_7": "Generelt", "$forumCategory_8": "Nyheiter", "$forumCategory_9": "Musikk", "$forumCategory_10": "Spel", "$forumCategory_11": "Tilbakemeldingar", "$forumCategory_12": "Feil", "$forumCategory_13": "Kunngjeringar", "$forumCategory_14": "Listetilpassing", "$forumCategory_15": "Tilrådingar", "$forumCategory_16": "Forumleik", "$forumCategory_17": "Diverse", "$forumCategory_18": "Program og Utvidingar", "$role_Original Creator": "Skapar", "$role_Creator": "Skapar", "$role_Music": "Musikk", "$role_Key Animation": "Teiknar", "$role_Key Animation Assistance": "Teiknehjelp", "$role_In-Between Animation": "Mellomteiknar", "$role_Animator": "Teiknar", "$role_Animation": "Teiknar", "$role_Main Animator": "Hovudteiknar", "$role_Opening Animation": "Opningsteiknar", "$role_Art": "Teiknar", "$role_Illustration": "Teikningar", "$role_End Card": "Sluttkort", "$role_End card": "Sluttkort", "$role_Original Concept": "Idé", "$role_Story Concept": "Idé", "$role_Original Story": "Skapar", "$role_Story": "Forfattar", "$role_Official Writer": "Forfattar", "$role_Story & Art": "Forfattar og Teiknar", "$role_Director": "Regi", "$role_CG Director": "CG Regi", "$role_Character Design": "Karakterutsjånad", "$role_Original Character Design": "Opphaveleg Karakterutsjånad", "$role_Animation Director": "Animasjonsregi", "$role_Assistant Episode Director": "Assisterande Episoderegi", "$role_Assistant Animation Director": "Assisterande Animasjonsregi", "$role_Assistant Director": "Assisterande Regi", "$role_Chief Animation Director": "Leiar Animasjonsregi", "$role_Episode Director": "Episoderegi", "$role_Sound Director": "Lydregi", "$role_Chief Director": "Hovudregi", "$role_Unit Director": "Einingsregi", "$role_Art Director": "Illustrasjonsregi", "$role_Art Design": "Illustrasjonsdesign", "$role_Chief Unit Director": "Leiar Einingsregi", "$role_Planning Producer": "Planprodusent", "$role_Producer": "Produsent", "$role_Co-Producer": "Produsent", "$role_Production Coordination": "Samkøyring", "$role_Production Generalization": "Samkøyring", "$role_Executive Director": "Ansvarleg Regi", "$role_Executive Producer": "Ansvarleg Produsent", "$role_Animation Producer": "Animasjonsprodusent", "$role_Creative Producer": "Kreativ Produsent", "$role_Production Assistant": "Produksjonshjelp", "$role_Production Assistance": "Produksjonshjelp", "$role_Photography Assistance": "Fotografihjelp", "$role_Director of Photography": "Fotoregi", "$role_Photography": "Foto", "$role_Camera": "Kamera", "$role_Advertising": "Reklame", "$role_Finishing": "Finpuss", "$role_Recording": "Lydopptak", "$role_Recording Assistant": "Lydopptaksassistent", "$role_Dialogue Recording": "Replikklydopptak", "$role_3D Works": "3D-arbeid", "$role_CG Animation": "Datagrafikk", "$role_Color Design": "Farge", "$role_Color Coordination": "Fargehandsaming", "$role_Insert Song Lyrics": "Songtekst", "$role_Theme Song Lyrics": "Songtekst", "$role_Theme Song Composition": "Songskriving", "$role_Theme Song Performance": "Song", "$role_Theme Song Arrangement": "Songarrangement", "$role_Music Piano Performance": "Piano", "$role_Conductor": "Dirigent", "$role_Special Thanks": "Takk", "$role_Material Texture": "Tekstur", "$role_Original Plan": "Plan", "$role_Editing": "Klipp", "$role_PV Production": "Førehandsvisning", "$role_Title Design": "Logo", "$role_Title Logo Design": "Logo", "$role_Visual Effects": "Spesialeffektar", "$role_Digital Effects": "Digitale effektar", "$role_Prop Design": "Våpendesign", "$role_Firearms Design": "Rekvisittdesign", "$role_ADR Script": "Dubbeskript", "$role_ADR Scriptwriter": "Dubbeskript", "$role_ADR Script Adaptation": "Dubbetilpassing", "$role_Layout": "Bladbunad", "$role_Layout Composition": "Bladbunad", "$role_Endcard": "Postkort", "$role_Scene Design": "Omgjevnad", "$role_Mechanical Design": "Mekanisk Design", "$role_Background Art": "Bakgrunn", "$role_In-Betweens Check": "Teiknesjekk", "$role_Animation Check": "Teiknesjekk", "$role_Series Composition": "Samansetjing", "$role_Animation Supervisor": "Teikneoversyn", "$role_Supervisor": "Oversyn", "$role_Supervision": "Oversyn", "$role_Planning": "Planlegging", "$role_Title": "Tittel", "$role_Script": "Skript", "$role_Screenplay": "Manus", "$role_Setting": "Sett", "$role_Storyboard": "Dreiebok", "$role_Translator": "Omsetjar", "$role_Assistant": "Assistent", "$role_Main": "Hovudrolle", "$role_Supporting": "Siderolle", "$role_Background": "Bakgrunnsrolle" } } , "Svenska": { "info": { "language": "Svenska", "language_english": "Swedish", "locale": "sv-SE", "fallback": ["Norsk","English"], "maintainer": "no maintainer", "maintainer_link": "", "discussion_link": "", "notes": "" }, "keys": { "$settings_homepage": "Hemesida: ", "$settings_repository": "Källkod: ", "$button_search": "Sök", "$language_English": "engelska", "$language_German": "tyska", "$language_Italian": "italienska", "$language_Spanish": "spanska", "$language_French": "franska", "$language_Korean": "koreanska", "$language_Portuguese": "portugisiska", "$language_Hebrew": "hebreiska", "$language_Hungarian": "ungerska", "$language_Chinese": "kinesiska", "$language_Japanese": "japanska", "$language_Arabic": "arabiska", "$language_Filipino": "filipino", "$language_Catalan": "katalanska", "$language_Polish": "polska", "$language_Norwegian": "norska", "$mediaFormat_NOVEL": "Lättroman" } } , "English (US)": { "info": { "language": "English (US)", "language_english": "English (US)", "variation_of": "English", "locale": "en-US", "fallback": ["English"], "maintainer": "hoh", "maintainer_link": "https://anilist.co/user/hoh/", "discussion_link": "", "notes": "There's in general no need to translate all the keys, since the default fallback is English." }, "keys": { "$setting_CSSsmileyScore": "Give smiley ratings distinct colors", "$profileBackground_help2": "Tip: Use a color with transparancy, to work better with both light and dark themes. Example:", "$compare_colourCell": "Color entire cell:", "$adjustColours_title": "Adjust Colors", "$settings_notificationDotColour": "Notification Dot Colors", "$statusBorder_description": "Color code the right border of activities by media status", "$submenu_favourites": "Favorites", "$characterBrowseTooltip": "Favorites", "$MAL_serialization": "Serialization", "$compare_normalizeRatings": "Normalize ratings:", "$setting_MALserial": "Add MAL serialization info to manga", "$forumCategory_14": "List Customization" } } , "English (short)": { "info": { "language": "English (short)", "language_english": "English (short)", "variation_of": "English", "locale": "en-UK", "fallback": [], "maintainer": "hoh", "maintainer_link": "https://anilist.co/user/hoh/", "discussion_link": "", "notes": "Less is more" }, "keys": { "$load_more": "More", "$time_now": "Now", "$time_1second": "1 second", "$time_Msecond": "{0} seconds", "$time_1minute": "1 minute", "$time_Mminute": "{0} minutes", "$time_1hour": "1 hour", "$time_Mhour": "{0} hours", "$time_1day": "1 day", "$time_Mday": "{0} days", "$time_1week": "1 week", "$time_Mweek": "{0} weeks", "$time_1month": "1 month", "$time_Mmonth": "{0} months", "$time_1year": "1 year", "$time_Myear": "{0} years", "$default_filename": "Anilist file", "$page": "{0}", "$dubMarker_notice": "{0} dub", "$button_next": "→", "$button_previous": "←", "$placeholder_status": "status", "$placeholder_reply": "reply", "$placeholder_message": "message", "$placeholder_forum": "forum post", "$forumMedia_backlink": "Link to media from forum category", "$notImplemented": "not implemented", "$settings_moreInfo_tooltip": "More", "$settings_category_Newly Added": "New", "$settings_export_description": " ", "$settings_CSSadd": "Custom CSS for rofile.", "$settings_CSSlinkTip": "(stylesheet links allowed)", "$settings_pinnedActivity": "Pin activity", "$setting_moreStats": "More stats", "$setting_compare": "Replace comparison feature", "$setting_CSSsmileyScore": "Smiley rating colours", "$setting_tweets": "Embed tweets", "$setting_CSSgreenManga": "Green manga", "$setting_CSSbannerShadow": "No banner shadows", "$setting_CSSmobileTags": "Mobile tags", "$setting_infoTable": "Two-column media info", "$setting_reinaDark": "High Contrast Dark [by Reina]", "$setting_MALserial": "MAL serialisation info", "$setting_MALscore": "AL scores", "$setting_MALrecs": "MAL recs", "$cssTooBig": "Custom CSS is over 1MB.", "$debug_tip": "(attach to bug reports)", "$profileBackground_help1": "Profile background:", "$profileBackground_help2": "Transparency:", "$profileBackground_help3": "More complex example:", "$listActivity_MreadChapter": "read {0} of ", "$listActivity_MwatchedEpisode": "watched {0} of ", "$listActivity_planningManga": "plans ", "$listActivity_planningAnime": "plans ", "$listActivity_MrepeatingManga": "reread {0} of ", "$listActivity_MrepeatingAnime": "rewatched {0} of ", "$notification_replyReply_1person_1reply": " replied to subscribed activity.", "$notification_newMedia": "added to the site.", "$notification_message": " sent a message.", "$notification_mention": " mentioned you.", "$notification_follow": " follows you.", "$notification_forumCommentLike": " liked your comment, in the thread ", "$notification_forumMention": " mentioned you, in the thread ", "$notifications_softBlock": "Soft block", "$notifications_hideLike": "Hide likes", "$notifications_button_reset": "Read all", "$preview_animeSection_title": "Anime", "$preview_mangaSection_title": "Manga", "$preview_progress": " ", "$mediaReleaseStatus_notYetReleased": "Not Released", "$publishingReply": "Publishing...", "$menu_animelist": "anime", "$menu_mangalist": "manga", "$timeline_search_description": "User search", "$noScrollPosts_description": "Display all status posts in full", "$compare_default": "default compare", "$compare_hoh": "hoh compare", "$download_banner_tooltip": "Download", "$reviewLike_tooltip": "{0} of {1}", "$updates_noNewManga": "None found :(", "$additionalTranslation_description": "Translate more of Anilist", "$twoColumnFeed_description": "Two column home feed", "$adjustColours_title": "Colours", "$stats_averageScore": "Average: ", "$stats_medianScore": "Median: ", "$stats_ratingEntropy": "Entropy: ", "$stats_mostCommonScore": "Most common: ", "$stats_timeWatched": "Time: ", "$stats_totalChapters": "Chapters: ", "$stats_totalVolumes": "Volumes: ", "$stats_TVEpisodesWatched": "TV episodes: ", "$stats_TVEpisodesRemaining": "TV episodes remaining: ", "$stats_firstLoggedAnime_note": " ", "$stats_ratingEntropy_comment": " bits/rating", "$stats_loadingAnime": "loading anime...", "$stats_loadingManga": "loading manga...", "$stats_longest_watching": "Watching.", "$make3x3": "3x3", "$staff_hoursWatched": "Hours: ", "$staff_chaptersRead": " Chapters: ", "$staff_volumesRead": " Volumes: ", "$milestones_totalVolumes": "Volumes", "$milestones_totalEpisodes": "Episodes", "$milestones_daysWatched": "{0} Days", "$milestones_chaptersRead": "{0} Chapters", "$terms_description": "Add a low bandwidth feed to https://anilist.co/terms", "$terms_privacyPolicy": "Privacy Policy", "$terms_option_text": "Text", "$terms_option_replies": "Replies", "$staff_animeRoles": "Anime Roles", "$staff_mangaRoles": "Manga Roles", "$staff_voiceRoles": "Voice Roles", "$forumHeading_recentlyActive": "Active Threads", "$forumHeading_releaseDiscussion": "Release Threads", "$forumHeading_newThreads": "New Threads", "$home_reviewLink": "Reviews", "$home_forumLink": "Forum", "$home_newAnime": "New Anime", "$home_newManga": "New Manga", "$footer_siteTheme": "Theme", "$theme_highContrast": "Contrast", "$theme_highContrastDark": "Contrast Dark", "$feedSelect_text": "Text", "$feedSelect_list": "List", "$forumCategory_5": "Release", "$forumCategory_11": "Feedback", "$forumCategory_12": "Bugs", "$forumCategory_13": "Announcements", "$forumCategory_18": "Apps" } } , "Español": { "info": { "language": "Español", "language_english": "Spanish", "locale": "es", "fallback": ["English"], "maintainer": "MrJako2001", "maintainer_link": "https://anilist.co/user/MrJaco/", "discussion_link": "https://github.com/hohMiyazawa/Automail/issues/69", "notes": "" }, "keys": { "$loading": "Cargando...", "$searching": "Buscando...", "$load_more": "Cargar más", "$time_now": "Ahora", "$time_1second": "Hace un segundo", "$time_Msecond": "Hace {0} segundos", "$time_1minute": "Hace un minuto", "$time_Mminute": "Hace {0} minutos", "$time_1hour": "Hace una hora", "$time_Mhour": "Hace {0} horas", "$time_1day": "Hace un día", "$time_Mday": "Hace {0} días", "$time_1week": "Hace una semana", "$time_Mweek": "Hace {0} semanas", "$time_1month": "Hace un mes", "$time_Mmonth": "Hace {0} meses", "$time_1year": "Hace un año", "$time_Myear": "Hace {0} años", "$time_medium_Mday": "días", "$time_short_second": "s", "$time_short_minute": "m", "$time_short_hour": "h", "$time_short_day": "d", "$time_short_week": "w", "$time_short_month": "m", "$time_short_year": "y", "$language_English": "Inglés", "$language_German": "German", "$language_Italian": "Italiano", "$language_Spanish": "Español", "$language_French": "Francés", "$language_Korean": "Koreano", "$language_Portuguese": "Portugués", "$language_Hebrew": "Hebreo", "$language_Hungarian": "Húngaro", "$language_Chinese": "Chino", "$language_Japanese": "Japonés", "$language_Arabic": "Árabe", "$language_Filipino": "Filipino", "$language_Catalan": "Catalán", "$language_Polish": "Polaco", "$language_Norwegian": "Noruego", "$default_filename": "Archivo de Anilist.co", "$generic_anime": "Anime", "$generic_manga": "Manga", "$page": "Página {0}", "$dubMarker_notice": "Existen {0} doblajes", "$button_submit": "Enviar", "$button_search": "Buscar", "$button_run": "Ejecutar", "$button_add": "Añadir", "$button_reset": "Restablecer", "$button_resetAll": "Restablecer todo", "$button_defaultSettings": "Configuración predeterminada", "$button_next": "Siguente →", "$button_previous": "← Anterior", "$button_refresh": "Actualizar", "$button_edit": "Editar", "$button_publish": "Publicar", "$button_cancel": "Cancelar", "$placeholder_status": "Escribe un estado...", "$placeholder_reply": "Escribe una respuesta...", "$placeholder_message": "Escribe un mensaje...", "$placeholder_forum": "Escribe un mensaje en el foro...", "$forumMedia_backlink": "Añadir un enlace a la página de la base de datos de una obra", "$settings_title": "Configuración de Automail", "$notImplemented": "Se implementará en el futuro", "$settings_version": "Versión: ", "$settings_homepage": "Inicio: ", "$settings_repository": "Repositorio: ", "$settings_moreInfo_tooltip": "Más información", "$settings_category_Notifications": "Notificaciones", "$settings_category_Feeds": "Feeds", "$settings_category_Forum": "Foro", "$settings_category_Lists": "Listas", "$settings_category_Profiles": "Perfiles", "$settings_category_Stats": "Estadísticas", "$settings_category_Media": "Media", "$settings_category_Navigation": "Navegación", "$settings_category_Browse": "Explorar", "$settings_category_Script": "Script", "$settings_category_Login": "Inicio de sesión", "$settings_category_Newly Added": "Recientemente añadido", "$settings_button_export": "Exportar configuraciones", "$settings_export_description": "Puede ser útil tener una copia de seguridad si haces cosas como borrar la caché/almacenamiento de tu navegador, que también borrará la configuración de Automail", "$settings_import": "Importar configuraciones:", "$settings_experimental_suffix": "[EXPERIMENTAL]", "$settings_partialLocalisationLanguage_description": "Lenguaje de Automail", "$settings_CSSadd": "Añade código CSS personalizado a tu perfil. Esto será visible para otros con el script.", "$settings_CSSlinkTip": "(También puede utilizar un enlace directo a una hoja de estilo)", "$settings_pinnedActivity": "Añadir una actividad anclada a su perfil", "$settings_notificationDotColour": "Colores de los puntos de notificación", "$setting_notifications": "Mejorar las notificaciones", "$setting_moreStats": "Mostrar una pestaña adicional en la página de estadísticas", "$setting_compare": "Sustituir la función de comparación nativa", "$setting_CSSsmileyScore": "Dar colores distintos a clasificaciones con \"smileys\"", "$setting_tweets": "Incrustar tuits enlazados", "$setting_CSSgreenManga": "Títulos verdes para manga", "$setting_CSSbannerShadow": "Eliminar sombras de los banners", "$setting_CSSmobileTags": "No ocultar las etiquetas de las páginas multimedia en dispositivos móviles", "$setting_infoTable": "Utilizar un diseño de tabla a dos columnas para la información en las páginas de medios", "$setting_reinaDark": "Añadir un tema oscuro de alto contraste [por Reina]", "$setting_MALserial": "Añadir información de MAL sobre la serialización al manga", "$setting_MALscore": "Añadir las puntuaciones de MAL a los medios", "$setting_MALrecs": "Agregar recomendaciones de MAL a los medios", "$cssTooBig": "El código CSS personalizado pesa más de 1MB. Hazlo más pequeño o utiliza un enlace en su lugar.", "$jsonTooBig": "El perfil JSON tiene más de 1 MB", "$debug_tip": "(Es muy útil que incluyas este archivo cuando reportes errores.)", "$profileBackground_help1": "Establecer un fondo de perfil, ejemplos:", "$profileBackground_help2": "Sugerencia: Utilice un color con transparencia, para que funcione mejor con temas claros y oscuros. Ejemplo:", "$profileBackground_help3": "Sugerencia 2: ¿Quieres una imagen difuminada, que permanezca fija en su sitio y que llene la pantalla? Así es como se hace:", "$mediaStatus_current": "actual", "$mediaStatus_watching": "viendo", "$mediaStatus_reading": "leyendo", "$mediaStatus_completed": "completado", "$mediaStatus_completedWatching": "visto", "$mediaStatus_completedReading": "leído", "$mediaStatus_repeating": "repitiendo", "$mediaStatus_rewatching": "reviendo", "$mediaStatus_rereading": "releyendo", "$mediaStatus_paused": "pausado", "$mediaStatus_dropped": "abandonado", "$mediaStatus_planning": "planeado", "$listActivity_MreadChapter": "{0} capítulos leídos de ", "$listActivity_MwatchedEpisode": "{0} episodios vistos de de ", "$listActivity_planningManga": "planeado ", "$listActivity_planningAnime": "planeado ", "$listActivity_completedManga": "completado ", "$listActivity_completedAnime": "completado ", "$listActivity_repeatedManga": "releído ", "$listActivity_repeatedAnime": "revisto ", "$listActivity_pausedManga": "pausado ", "$listActivity_pausedAnime": "pausado ", "$listActivity_MdroppedManga": "{0} abandonados de ", "$listActivity_MdroppedAnime": "{0} abandonados de ", "$listActivity_MrepeatingManga": "{0} capítulos releidos de ", "$listActivity_MrepeatingAnime": "{0} episodios revistos de ", "$notification_likeActivity_1person_1activity": " le ha dado me gusta a tu actividad.", "$notification_likeActivity_1person_Mactivity": " le ha dado me gusta a tus actividades.", "$notification_likeActivity_2person_1activity": " le ha dado me gusta a tu actividad.", "$notification_likeActivity_2person_Mactivity": " le ha dado me gusta a tus actividades.", "$notification_likeActivity_Mperson_1activity": " le ha dado me gusta a tu actividad.", "$notification_likeActivity_Mperson_Mactivity": " le ha dado me gusta a tus actividades.", "$notification_likeReply_1person_1reply": " le ha dado me gusta a tu respuesta.", "$notification_likeReply_1person_Mreply": " le ha dado me gusta a tus respuestas.", "$notification_likeReply_2person_1reply": " le ha dado me gusta a tu respuesta.", "$notification_likeReply_2person_Mreply": " le ha dado me gusta a tus respuestas.", "$notification_likeReply_Mperson_1reply": " le ha dado me gusta a tu respuesta.", "$notification_likeReply_Mperson_Mreply": " le ha dado me gusta a tus respuestas.", "$notification_reply_1person_1reply": " respondió a tu actividad.", "$notification_reply_1person_Mreply": " respondió a sus actividades", "$notification_reply_2person_1reply": " respondió a tu actividad.", "$notification_reply_2person_Mreply": " respondió a sus actividades", "$notification_reply_Mperson_1reply": " respondió a tu actividad.", "$notification_reply_Mperson_Mreply": " respondió a sus actividades", "$notification_replyReply_1person_1reply": " respondió a la actividad a la que estás suscrito.", "$notification_newMedia": "se ha añadido recientemente al sitio.", "$notification_message": " te envió un mensaje.", "$notification_mention": " te mencionó en su actividad", "$notification_follow": " comenzó a seguirte.", "$notification_forumCommentLike": " le gustó su comentario, en el hilo del foro ", "$notification_forumMention": " te mencionó, en el hilo del foro ", "$notifications_softBlock": "Bloquéo suave de usuarios", "$notifications_hideLike": "Ocultar notificaciones de \"Me gusta\"", "$notifications_showHoh": "Mostrar notificaciones de hoh", "$notifications_showDefault": "Mostrar notificaciones nativas", "$notifications_comments": "comentarios", "$notifications_button_reset": "Marcar todo como leído", "$documentTitle_notifications": "Notificaciones · AniList", "$documentTitle_home": "Inicio · AniList", "$documentTitle_forum": "Foro - Discusión de Anime y Manga · AniList", "$documentTitle_forum_prefix": "Foro", "$documentTitle_appSettings": "configuraciones de Apps y Automail · AniList", "$preview_animeSection_title": "Anime en progreso", "$preview_mangaSection_title": "Manga en progreso", "$preview_airingSection_title": "Emisión", "$preview_1behind": "1 episodio pendiente", "$preview_Mbehind": "{0} episodios pendientes", "$preview_progress": "Progreso:", "$publishingReply": "Publicando respuesta...", "$menu_home": "Inicio", "$menu_profile": "Perfil", "$menu_animelist": "Lista de Anime", "$menu_mangalist": "Lista de Manga", "$menu_browse": "Explorar", "$menu_forum": "Foro", "$submenu_stats": "Estadísticas", "$submenu_social": "Social", "$submenu_reviews": "Reseñas", "$submenu_favourites": "Favoritos", "$submenu_submissions": "Envíos", "$submenu_anime": "Anime", "$submenu_manga": "Manga", "$submenu_staff": "Personal", "$submenu_characters": "Personajes", "$submenu_recommendations": "Recomendaciones", "$mainMenu_notifications": "Notificaciones", "$mainMenu_profile": "Perfil", "$mainMenu_settings": "Configuraciones", "$timeline_search_description": "¿Buscas actividades de otra persona?", "$noScrollPosts_description": "Mostrar todos los mensajes de estado completos, independientemente de su longitud", "$timeline_title": "Cronología de actividad", "$filter_replies": "Ha respondido", "$filter_following": "Siguiendo", "$input_user_placeholder": "Usuario", "$error_userNotFound": "Usuario no encontrado", "$error_connection": "Error de conexión", "$myThreads_link": "Mis hilos", "$piracy_message": "ESTE ES UN ENLACE MALO, YA ESTÁ DESECHADO OwO (haz clic en el botón de reportar para llamar a los mods sobre este usuario travieso)", "$compare_default": "Mostrar comparación nativa", "$compare_hoh": "Mostrar comparación de hoh", "$compare_minRatings": "Calificaciones mínimas:", "$compare_individualRatings": "Sistemas de clasificación individuales:", "$compare_normalizeRatings": "Normalizar las calificaciones:", "$compare_colourCell": "Colorear toda la celda:", "$compare_listStatus": "cualquier estado de la lista\npulse para alternar", "$404_private_or_noUser": "{0} no existe o tiene un perfil privado", "$404_private": "{0} tiene un perfil privado", "$404_noUser": "{0} no existe", "$404_blocked": "{0} te ha bloqueado", "$recs_forYou": "Para ti", "$download_banner_tooltip": "Descargar banner", "$recs_description": "Cada par, es uno que te gusta + uno que no has empezado\nLa mejor combinación primero", "$module_unicodifier_description": "Convertir los emojis para que funcionen en anilist", "$module_unicodifier_extendedDescription": "Anilist no maneja correctamente algunos caracteres Unicode, dando lugar a mensajes truncados. Este módulo los convierte en códigos de escape de entidades HTML, que el sitio puede manejar\nIdea original del gran GoBusto: https://files.kiniro.uk/unicodifier.html", "$rewatch_suffix_1": "[rever]", "$rewatch_suffix_M": "[rever {0}]", "$reread_suffix_1": "[releer]", "$reread_suffix_M": "[releer {0}]", "$reviewLike_tooltip": "A {0} de {1} le gustó esta reseña", "$updates_noNewManga": "No se encontraron elementos nuevos (╥﹏╥)", "$staff_filter_placeholder": "Filtrar por título, función, etc.", "$relations_following_only": "Solo seguidos", "$relations_followers_only": "Solo seguidores", "$relations_mutuals": "Mutuo", "$relations_shared_following": "Seguidos compartidos", "$relations_shared_followers": "Seguidores compartidos", "$relations_description": "Añadir pestañas separadas en la página social para varios tipos de seguidores", "$additionalTranslation_description": "Traducir partes adicionales de la interfaz de usuario de Anilist", "$twoColumnFeed_description": "Dividir el feed de inicio en dos columnas", "$markdown_help_title": "Ayuda para Markdown", "$markdown_help_description": "Añadir un ayudante de markdown en la esquina inferior izquierda", "$markdown_help_images_header": "Imágenes", "$markdown_help_imageUpload": "(debes subirlo a otro sitio para obtener un enlace)", "$markdown_help_imageSize": "Ajuste de tamaño:", "$markdown_help_links_header": "Enlaces", "$markdown_help_formatting_header": "Formato", "$markdown_help_infixOr": "o", "$navigation_profileLink": "Perfil de {0}", "$MAL_score": "Puntuación de MAL", "$MAL_serialization": "Serialización", "$adjustColours_title": "Ajustar colores", "$button_newChapters": "Nuevos capítulos", "$scanning": "Escaneando...", "$noResults": "Sin resultados", "$filters": "Filtros", "$filters_lists": "Listas", "$filters_year": "Año", "$heading_anime": "Anime:", "$heading_manga": "Manga:", "$heading_similarFavs": "Fvoritos similares:", "$stats_animeOnList": "Anime listado: ", "$stats_mangaOnList": "Manga listado: ", "$stats_animeRated": "Anime calificado: ", "$stats_mangaRated": "Manga calificado: ", "$stats_averageScore": "Puntuación promedia: ", "$stats_onlyOne": "Sólo se ha dado una puntuación: ", "$stats_medianScore": "Puntuación media: ", "$stats_globalDifference": "Diferencia global: ", "$stats_globalDeviation": "Desviación global: ", "$stats_ratingEntropy": "Calificación de la entropía: ", "$stats_mostCommonScore": "Puntuación más común: ", "$stats_timeWatched": "Tiempo de observación: ", "$stats_totalChapters": "Total de capítulos: ", "$stats_totalVolumes": "Volúmenes totales: ", "$stats_TVEpisodesWatched": "Episodios de TV vistos: ", "$stats_TVEpisodesRemaining": "Episodios restantes de series en emisión: ", "$stats_firstLoggedAnime": "Primer anime registrado: ", "$stats_firstLoggedAnime_note": "(los usuarios pueden cambiar libremente las fechas de inicio)", "$stats_weightComment_duration": " (ponderado por la duración)", "$stats_weightComment_chapers": " (ponderado por el número de capítulos)", "$stats_globalDifference_comment": " (diferencia promedio con respecto al promedio global)", "$stats_globalDeviation_comment": " (desviación estándar del promedio global de cada entrada)", "$stats_ratingEntropy_comment": " bits/clasificación (número más alto = clasificaciones más precisas. Normalmente entre 1 y 6)", "$stats_moreStats_title": "Más estadísticas", "$stats_genresTags_title": "Géneros y etiquetas", "$stats_genre": "Género", "$stats_tag": "Etiqueta", "$stats_count": "Recuento", "$stats_name": "Título", "$stats_siteStats_title": "Estadísticas del sitio", "$stats_anime_heading": "Estadísticas de anime de {0}", "$stats_manga_heading": "Estadísticas de manga de {0}", "$stats_loadingAnime": "cargando lista de anime...", "$stats_loadingManga": "cargando lista de manga...", "$stats_instances": "({0} instancias)", "$stats_instances_unique": "no hay dos resultados iguales", "$stats_longestTime": "{0}% es {1}", "$stats_varousStats_heading": "Estadísticas varias", "$stats_longest_watching": "Actualmente viendo.", "$stats_longest_paused": "Pausado.", "$stats_longest_dropped": "Abandonado.", "$stats_longest_1rewatch": "Repetido una vez.", "$stats_longest_2rewatch": "Repetido dos veces.", "$stats_longest_Mrewatch": "Repetido {0} veces.", "$stats_longest_1rewatching": "Primera repetición en progreso.", "$stats_longest_2rewatching": "Segunda repetición en progreso.", "$stats_longest_Mrewatching": "Repetición número {0} en progreso.", "$stats_longest_1rewatchPaused": "Primera repetición en pausa.", "$stats_longest_2rewatchPaused": "Segunda repetición en pausa.", "$stats_longest_MrewatchPaused": "Repetición número {0} en pausa.", "$stats_longest_1rewatchDropped": "Abandonado en la primera repetición.", "$stats_longest_2rewatchDropped": "Abandonado en la segunda repetición.", "$stats_longest_MrewatchDropped": "Abandonado en la repetición número {0}.", "$characterBrowseTooltip": "Favoritos", "$make3x3": "Hacer 3x3", "$make3x3_title": "Haga clic en este botón y, a continuación, en 9 entradas de su lista", "$forum_preview_reply": "respondió ", "$staff_filterHelp": "Ayuda para el filtro", "$staff_hoursWatched": "Horas vistas: ", "$staff_chaptersRead": " Capítulos leídos: ", "$staff_volumesRead": " Volumenes leídos: ", "$staff_meanScore": " Puntuación media: ", "$staff_sort": "Ordenar", "$sort_alphabetical": "Alfabéticamente", "$sort_newest": "Más reciente:", "$sort_oldest": "Más antiguo", "$sort_length": "Duración", "$sort_popularity": "Popularidad", "$sort_score": "Puntuación", "$sort_myScore": "Mi puntuación", "$sort_myProgress": "Mi progreso", "$milestones_totalVolumes": "Volúmenes totales", "$milestones_totalEpisodes": "Episodios totales", "$milestones_daysWatched": "{0} Días vistos", "$milestones_chaptersRead": "{0} Capítulos leídos", "$colour_transparent": "Transparencia", "$colour_blue": "Azul", "$colour_white": "Blanco", "$colour_black": "Negro", "$colour_red": "Rojo", "$colour_peach": "Durazno", "$colour_orange": "Naranja", "$colour_yellow": "Amarillo", "$colour_green": "Verde", "$terms_description": "Añade un feed para redes lentas debajo de https://anilist.co/terms", "$terms_privacyPolicy": "Ver política de privacidad", "$terms_privacyPolicy_title": "Esta página muestra normalmente la política de privacidad de Anilist. Haga clic para obtener la vista por defecto", "$terms_signin": "Este módulo no funciona sin iniciar sesión en Automail", "$terms_signin_link": "Iniciar sesión con el script", "$terms_option_global": "Global", "$terms_option_text": "Publicaciones de texto", "$terms_option_replies": "Tiene respuestas", "$terms_option_forum": "Foro", "$terms_option_reviews": "Reseñas", "$terms_option_user": "Usuario", "$terms_option_media": "Media", "$mediaStaff_filter": "Filtro", "$socialTab_tooManyChapters": "Lo más probable es que el total de la base de datos se haya actualizado", "$query_firstActivity": "Primera actividad", "$query_autorecs": "Autorrecomendaciones", "$query_autorecs_collecting": "Recopilación de datos de listas...", "$query_autorecs_processing": "Procesando...", "$query_autorecs_info": "Las mejores selecciones, basadas en tus valoraciones, las de otros usuarios y la base de datos de recomendaciones. Las mejores coincidencias están en la parte superior", "$mobileFriendly_description": "Modo amigable para dispositivos móviles. Desactiva algunos módulos que no funcionan correctamente y ajusta otros", "$hideLikes_description": "Ocultar notificaciones de \"Me gusta\". No afectará el recuento de notificaciones", "$settingsTip_description": "Mostrar un aviso en la página de notificaciones para saber dónde se puede encontrar la configuración del script", "$settings_errorInvalidJSON": "Perfil JSON no válido", "$settings_errorInvalidActivity": "debe ser un enlace directo a una actividad o un ID de actividad", "$settings_errorInvalidActivity2": "actividad no encontrada", "$dismissDot_description": "Mostrar una especificación para descartar las notificaciones cuando se ha iniciado la sesión", "$socialTab_description": "Ficha social de medios, puntuación media, progreso y notas", "$socialTabFeed_description": "Filtros de la ficha social de medios", "$forumMedia_description": "Añadir los medios etiquetados a la vista previa del foro en la página de inicio", "$mangaBrowse_description": "Hacer que la navegación sea por defecto en manga", "$dblclickZoom_description": "Haga doble clic en las actividades para ampliarlas", "$dblclickZoom_extendedDescription": "Es probable que haya mejores complementos de accesibilidad en el navegador.", "$staff_animeRoles": "Roles del personal de Anime", "$staff_mangaRoles": "Roles del personal de Manga", "$staff_voiceRoles": "Roles de voz de los personajes", "$forumHeading_recentlyActive": "Hilos de conversación activos recientemente", "$forumHeading_releaseDiscussion": "Hilos de debate sobre la publicación", "$forumHeading_newThreads": "Hilos recién creados", "$home_reviewLink": "Reseñas recientes", "$home_forumLink": "Actividad del Foro", "$home_trendingAnime": "Tendencia en Anime", "$home_trendingManga": " y Manga", "$home_newAnime": "Anime recién añadido", "$home_newManga": "Manga recién añadido", "$footer_siteTheme": "Tema del sitio", "$theme_default": "Por defecto", "$theme_dark": "Oscuro", "$theme_highContrast": "Alto contraste", "$theme_highContrastDark": "Alto Contraste Oscuro", "$feed_header": "Actividad", "$feedSelect_all": "Todo", "$feedSelect_text": "Estado del texto", "$feedSelect_list": "Progreso de la lista", "$feedSelect_status": "Estado", "$feedSelect_message": "Mensajes", "$mediaFormat_TV" : "TV", "$mediaFormat_TV_SHORT" : "Corto de TV", "$mediaFormat_MOVIE" : "Película", "$mediaFormat_SPECIAL" : "Especial", "$mediaFormat_OVA" : "OVA", "$mediaFormat_ONA" : "ONA", "$mediaFormat_MUSIC" : "Música", "$mediaFormat_MANGA" : "Manga", "$mediaFormat_NOVEL" : "Novela ligera", "$mediaFormat_ONE_SHOT" : "One Shot", "$forumCategory_1": "Anime", "$forumCategory_2": "Manga", "$forumCategory_3": "Novelas ligeras", "$forumCategory_4": "Novelas visuales", "$forumCategory_5": "Discusión sobre el lanzamiento", "$forumCategory_7": "General", "$forumCategory_8": "Novedades", "$forumCategory_9": "Música", "$forumCategory_10": "Gaming", "$forumCategory_11": "Comentarios del sitio", "$forumCategory_12": "Informes de errores", "$forumCategory_13": "Anuncios del sitio", "$forumCategory_14": "Personalización de listas", "$forumCategory_15": "Recomendaciones", "$forumCategory_16": "Juegos en el foro", "$forumCategory_17": "Otros", "$forumCategory_18": "Aplicaciones", "$role_Original Creator": "Creador original", "$role_Creator": "Creador", "$role_Music": "Música", "$role_Key Animation": "Animación clave", "$role_Key Animation Assistance": "Asistencia de animación", "$role_In-Between Animation": "Animación intermedia", "$role_Animator": "Animador", "$role_Animation": "Animación", "$role_Main Animator": "Animador principal", "$role_Opening Animation": "Animación de apertura", "$role_Art": "Arte", "$role_Illustration": "Ilustración", "$role_End Card": "Tarjeta de finalización", "$role_Original Concept": "Concepto original", "$role_Story Concept": "Concepto de la historia", "$role_Original Story": "Historia original", "$role_Story": "Historia", "$role_Official Writer": "Escritor oficial", "$role_Story & Art": "Historia y arte", "$role_CG Director": "Director de CG", "$role_Character Design": "Diseño de personajes", "$role_Original Character Design": "Diseño de personajes", "$role_Animation Director": "Director de animación", "$role_Assistant Episode Director": "Asistente de dirección del episodio", "$role_Assistant Animation Director": "Asistente del director de animación", "$role_Assistant Director": "Asistente del director", "$role_Chief Animation Director": "Director de animación en jefe", "$role_Episode Director": "Director del episodio", "$role_Sound Director": "Director de sonido", "$role_Chief Director": "Director General", "$role_Unit Director": "Director de unidad", "$role_Art Director": "Director de arte", "$role_Art Design": "Diseño artístico", "$role_Chief Unit Director": "Director de unidad en jefe", "$role_Planning Producer": "Productor de planificación", "$role_Producer": "Productor", "$role_Co-Producer": "Co-productor", "$role_Production Coordination": "Coordinación de producción", "$role_Production Generalization": "Generalización de la producción", "$role_Executive Director": "Director ejecutivo", "$role_Executive Producer": "Productor ejecutivo", "$role_Animation Producer": "Productor de animación", "$role_Creative Producer": "Productor creativo", "$role_Production Assistant": "Asistente de producción", "$role_Production Assistance": "Asistencia en la producción", "$role_Photography Assistance": "Asistencia de fotografía", "$role_Director of Photography": "Director de fotografía", "$role_Photography": "Fotografía", "$role_Camera": "Cámara", "$role_Advertising": "Publicidad", "$role_Finishing": "Acabado", "$role_Recording": "Grabación", "$role_Recording Assistant": "Asistente de grabación", "$role_Dialogue Recording": "Grabación de diálogos", "$role_3D Works": "Trabajos 3D", "$role_CG Animation": "Animación CG", "$role_Color Design": "Diseño de color", "$role_Color Coordination": "Coordinación de color", "$role_Insert Song Lyrics": "Insertar la letra de la canción", "$role_Theme Song Lyrics": "Letra del tema principal", "$role_Theme Song Composition": "Composición de la canción principal", "$role_Theme Song Performance": "Interpretación de la canción principal", "$role_Theme Song Arrangement": "Arreglo de la canción principal", "$role_Music Piano Performance": "Piano", "$role_Conductor": "Director de orquesta", "$role_Special Thanks": "Agradecimientos especiales", "$role_Material Texture": "Textura de materiales", "$role_Original Plan": "Plan original", "$role_Editing": "Edición", "$role_PV Production": "Producción de PV", "$role_Title Design": "Diseño del título", "$role_Title Logo Design": "Diseño del logotipo del título", "$role_Visual Effects": "Efectos visuales", "$role_Digital Effects": "Efectos digitales", "$role_Prop Design": "Diseño de utilería", "$role_Firearms Design": "Diseño de armas", "$role_ADR Script": "Guión de ADR", "$role_ADR Scriptwriter": "Guionista de ADR", "$role_ADR Script Adaptation": "Adaptación de guiones de ADR", "$role_Layout": "Diseño", "$role_Layout Composition": "Composición del diseño", "$role_Scene Design": "Diseño de escenas", "$role_Mechanical Design": "Diseño mecánico", "$role_Background Art": "Arte de fondo", "$role_In-Betweens Check": "Comprobación de intermedios", "$role_Animation Check": "Comprobación de animación", "$role_Series Composition": "Composición de la serie", "$role_Animation Supervisor": "Supervisor de animación", "$role_Supervision": "Supervisión", "$role_Planning": "Planificación", "$role_Title": "Título", "$role_Script": "Guión", "$role_Screenplay": "Libreto", "$role_Setting": "Escenario", "$role_Translator": "Traductor", "$role_Assistant": "Asistente", "$role_Main": "Principal", "$role_Supporting": "Apoyo", "$role_Background": "Fondo" } } } function translate(key,subs,fallback){ if(key[0] !== "$"){ return key } let immediate = languageFiles[useScripts.partialLocalisationLanguage].keys[key]; if(!immediate){ for(let i=0;i { immediate = immediate.replace("{" + i + "}",sub) }) } else{ immediate = immediate.replace("{0}",subs) } } return immediate } if(!languageFiles[useScripts.partialLocalisationLanguage]){ let candidates = [] Object.keys(languageFiles).forEach(key => { if(key.includes(useScripts.partialLocalisationLanguage)){ candidates.push(key) } }) if(candidates.length){ alert("No \"" + useScripts.partialLocalisationLanguage +"\" language file for Automail found. Setting language to \"English\"\nPossible candidates: " + candidates.map(a => "\"" + a + "\"").join(",") +"\nYou can change this in the settings") } else{ alert("No \"" + useScripts.partialLocalisationLanguage +"\" language file for Automail found. Setting language to \"English\"\nYou can change this in the settings") } useScripts.partialLocalisationLanguage = "English"; useScripts.save() } //end "localisation.js" //begin "utilities.js" /* create() This is the main framework code of Automail. It shortens the otherwise verbose procedure of creating a new HTML element and inserting it into the DOM. Instead of: let element = document.createElement("p"); element.innerText = "lorem ipsum"; element.classList.add("hohParagraph"); pageParentElement.append(element); You would do: create("p","hohParagraph","lorem ipsum"); All arguments except for the HTML tag are optional. */ function create( HTMLtag,//: The kind of DOM element to create classes,//(optional) : The css class to give the element OR []: A list of multiple class names //(the first string of the list could optionally start with a "#", in which case it will be an id instead) text,//(optional) : The innerText to give the element appendLocation,//(optional) DOMnode: a node to immediately append the created element to cssText//(optional) : Inline CSS to appy to the element ){ let element = document.createElement(HTMLtag); if(Array.isArray(classes)){ element.classList.add(...classes); if(classes.includes("newTab")){ element.setAttribute("target","_blank") } } else if(classes){ if(classes[0] === "#"){ element.id = classes.substring(1) } else{ element.classList.add(classes); if(classes === "newTab"){ element.setAttribute("target","_blank") } } }; if(text || text === 0){ element.innerText = text }; if(appendLocation && appendLocation.appendChild){ appendLocation.appendChild(element) }; if(cssText){ element.style.cssText = cssText }; return element } function safeURL(URL){ /* NOTE: DO NOT USE THIS FOR ANYTHING 'UNSAFE'! This is a cosmetic utility, not a security feature consider using "purify.js" if you have to deal with naughty user input, or better, please stop what you are doing */ let compo = encodeURIComponent((URL || "") .replace(/\s|\/|:|★|☆/g,"-") .replace(/\((\d+)\)/g,(string,year) => year) .replace(/(\.|\)|\\|\?|#|!|,|%|’)/g,"") .replace(/ä/g,"a") .replace(/×/g,"x") ); if(useScripts.SFWmode){ if(badWords.some( word => compo.includes(word) )){ return "" } } return compo } function fuzzyDateCompare(first,second){//returns an INDEX, not to be used for sorting. That is, "-1" means they are equal. if(!first.year || !second.year){ return -1 } if(first.year > second.year){ return 0 } else if(first.year < second.year){ return 1 } if(!first.month || !second.month){ return -1 } if(first.month > second.month){ return 0 } else if(first.month < second.month){ return 1 } if(!first.day || !second.day){ return -1 } if(first.day > second.day){ return 0 } else if(first.day < second.day){ return 1 } return -1 } //time in seconds, not milliseconds function formatTime(diff,type){ let magRound = function(num){ if(num < 1){ return Math.round(num); } else{ if( Math.log(Math.ceil(num)) < 2*Math.log(num) - Math.log(Math.floor(num)) ){ return Math.ceil(num) } else{ return Math.floor(num) } } }; let times = [ {name: "year",short: translate("$time_short_year"),medium: translate("$time_medium_year"),Mmedium: translate("$time_medium_Myear"),value: 60*60*24*365}, {name: "month",short: translate("$time_short_month"),medium: translate("$time_medium_month"),Mmedium: translate("$time_medium_Mmonth"),value: 60*60*24*30}, {name: "week",short: translate("$time_short_week"),medium: translate("$time_medium_week"),Mmedium: translate("$time_medium_Mweek"),value: 60*60*24*7}, {name: "day",short: translate("$time_short_day"),medium: translate("$time_medium_day"),Mmedium: translate("$time_medium_Mday"),value: 60*60*24}, {name: "hour",short: translate("$time_short_hour"),medium: translate("$time_medium_hour"),Mmedium: translate("$time_medium_Mhour"),value: 60*60}, {name: "minute",short: translate("$time_short_minute"),medium: translate("$time_medium_minute"),Mmedium: translate("$time_medium_Mminute"),value: 60}, {name: "second",short: translate("$time_short_second"),medium: translate("$time_medium_second"),Mmedium: translate("$time_medium_Msecond"),value: 1} ]; let timeIndex = 0; let significantValue = 0; let reminder = 0; do{ significantValue = diff/times[timeIndex].value; reminder = (diff - Math.floor(significantValue) * times[timeIndex].value)/times[timeIndex + 1].value; timeIndex++; }while(!Math.floor(significantValue) && timeIndex < (times.length - 1)); timeIndex--; if(!Math.floor(significantValue)){ if(type === "short"){ return magRound(diff) + translate("$time_short_second") }; if(magRound(diff) === 1){ return magRound(diff) + " " + translate("$time_medium_second") }; return magRound(diff) + " " + translate("$time_medium_Msecond"); } if(Math.floor(significantValue) > 1){ if(type === "short"){ return magRound(significantValue) + times[timeIndex].short }; return magRound(significantValue) + " " + times[timeIndex].Mmedium; } if(magRound(reminder) > 1){ if(type === "short"){ return "1" + times[timeIndex].short + " " + magRound(reminder) + times[timeIndex + 1].short } return "1 " + times[timeIndex].medium + " " + magRound(reminder) + " " + times[timeIndex + 1].Mmedium } if(magRound(reminder) === 1){ if(type === "short"){ return "1" + times[timeIndex].short + " 1" + times[timeIndex + 1].short } return "1 " + times[timeIndex].medium + " 1 " + times[timeIndex + 1].medium; } if(type === "short"){ return "1" + times[timeIndex].short } return "1 " + times[timeIndex].medium; } function nativeTimeElement(timestamp){//time in seconds let dateObj = new Date(timestamp*1000); let elem = create("time","hohTimeGeneric"); elem.setAttribute("datetime",dateObj); let locale = languageFiles[useScripts.partialLocalisationLanguage].info.locale || "en-UK"; elem.title = dateObj.toLocaleDateString(locale,{weekday: undefined, year: "numeric", month: "numeric", day: "numeric"}) + ", " + dateObj.toLocaleTimeString(locale); let calculateTime = function(){ let now = new Date(); let diff = Math.round(now.valueOf()/1000) - Math.round(dateObj.valueOf()/1000); if(diff === 0){ elem.innerText = translate("$time_now") } if(diff === 1){ elem.innerText = translate("$time_1second") } else if(diff < 60){ elem.innerText = translate("$time_Msecond",diff) } else{ diff = Math.floor(diff/60); if(diff === 1){ elem.innerText = translate("$time_1minute") } else if(diff < 60){ elem.innerText = translate("$time_Mminute",diff) } else{ diff = Math.floor(diff/60); if(diff === 1){ elem.innerText = translate("$time_1hour") } else if(diff < 24){ elem.innerText = translate("$time_Mhour",diff) } else{ diff = Math.floor(diff/24); if(diff === 1){ elem.innerText = translate("$time_1day") } else if(diff < 7){ elem.innerText = translate("$time_Mday",diff) } else if(diff < 14){ elem.innerText = translate("$time_1week") } else if(diff < 30){ elem.innerText = translate("$time_Mweek",Math.floor(diff/7)) } else if(diff < 365){ if(Math.floor(diff/30) === 1){ elem.innerText = translate("$time_1month") } else{ elem.innerText = translate("$time_Mmonth",Math.floor(diff/30)) } } else{ diff = Math.floor(diff/365); if(diff === 1){ elem.innerText = translate("$time_1year") } else{ elem.innerText = translate("$time_Myear",diff) } } } } }; setTimeout(function(){ if(!document.body.contains(elem)){ return } calculateTime() },20*1000) };calculateTime(); return elem } let wilson = function(positiveScore,total){ if(total === 0){ return { left: 0, right: 0 } } // phat is the proportion of successes // in a Bernoulli trial process let phat = positiveScore / total; // z is 1-alpha/2 percentile of a standard // normal distribution for error alpha=5% const z = 1.959963984540; // implement the algorithm https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval let a = phat + z * z / (2 * total); let b = z * Math.sqrt((phat * (1 - phat) + z * z / (4 * total)) / total); let c = 1 + z * z / total; return { left: (a - b) / c, right: Math.min(1,(a + b) / c) } }; //consider getting rid of this one Number.prototype.roundPlaces = function(places){ return +( Math.round( this * Math.pow(10,places) ) / Math.pow(10,places) ) } function capitalize(string){ return (string + "").charAt(0).toUpperCase() + (string + "").slice(1) } function csvEscape(string){ return "\"" + (string || "").replace(/"/g,"\"\"") + "\"" } function entityUnescape(string){ return string.replace(/</g,"<") .replace(/>/g,">") .replace(/"/g,"\"") .replace(/'/g,"'") .replace(/\n?/g,"\n") .replace(/ /g," ")//not a nbsp, but close enough in most cases. Better than the raw entity at least .replace(/&/g,"&") } //https://stackoverflow.com/a/7616484/5697837 function hashCode(string){//non-cryptographic hash var hash = 0, i, chr; if(string.length === 0){ return hash } for(i = 0; i < string.length; i++) { chr = string.charCodeAt(i); hash = ((hash << 5) - hash) + chr; hash |= 0; // Convert to 32bit integer } return hash } //piracy links begone setInterval(function(){ document.querySelectorAll(`a[rel="noopener noreferrer"]`).forEach(link => { if(!link || !link.href){ return } let linker; try{ linker = (new URL(link.href)).host; } catch(e){ console.log("invalid URL:", link.href); return } if(linker && linker.split(".").length >= 2){ linker = linker.split(".")[linker.split(".").length - 2]; if( [556415734,1724824539,-779421562,-1111399772,-93654449,1120312799,-781704176,-1550515495,3396395,567115318,-307082983,1954992241,-307211474,-307390044,1222804306,-795095039,-1014860289,403785740,547002932,128627683] .includes(hashCode(linker)) ){ link.href = "https://anilist.co/forum/thread/14"; link.innerText = translate("$piracy_message") } } }) document.querySelectorAll(".sense-wrap").forEach(link => { link.style.display = "none" }) },2000); const svgns = "http://www.w3.org/2000/svg"; const svgShape = function(shape,target,attributes,children,content){ shape = shape || "g"; let obj = document.createElementNS(svgns,shape); Object.keys(attributes || {}).forEach(key => { obj.setAttributeNS(null,key,attributes[key]) }); if(content){ obj.appendChild(document.createTextNode(content)) } if(target){ target.appendChild(obj) } (children || []).forEach( child => { if(child.element){ svgShape(child.element,obj,child.attributes,child.children,child.content) } else{ obj.appendChild(child) } } ) return obj } const VALUE = ((a,b) => a - b);//Used for sorting functions const VALUE_DESC = ((b,a) => a - b); const TRUTHY = (a => a);//filtering const ACCUMULATE = (a,b) => (a || 0) + (b || 0); const ALPHABETICAL = function(valueFunction){ if(valueFunction){ return (a,b) => ("" + valueFunction(a)).localeCompare("" + valueFunction(b)) } return (a,b) => ("" + a).localeCompare("" + b) } const NOW = () => (new Date()).valueOf(); const Stats = { average: function(list){ return list.reduce((a,b) => (a || 0) + (b || 0))/list.length }, median: function(list){ let temp = [...list].sort((a,b) => a - b); return ( temp[Math.floor((temp.length - 1)/2)] + temp[Math.ceil((temp.length - 1)/2)] )/2; }, mode: function(list){ return [...list].sort( (b,a) => list.filter( e => e === a ).length - list.filter( e => e === b ).length )[0]; } } const evalBackslash = function(text){ let output = ""; let special = false; Array.from(text).forEach(char => { if(char === "\\"){ if(special){ output += "\\" } special = !special; } else{ output += char; } }); return output } //this function is for removing duplicates in a sorted list. //the twist is that it also provides a way to merge the duplicates with a custom function const removeGroupedDuplicates = function( list, uniquenessFunction, modificationFunction ){//both functions optional if(!uniquenessFunction){ uniquenessFunction = e => e }; list = list.sort( (a,b) => uniquenessFunction(a) - uniquenessFunction(b) ); let returnList = []; list.forEach((element,index) => { if(index === list.length - 1){ returnList.push(element); return; } if(uniquenessFunction(element) === uniquenessFunction(list[index + 1])){ if(modificationFunction){ modificationFunction(element,list[index + 1]) } } else{ returnList.push(element) } }); return returnList }; //for the school/workplace methods let badWords = ["hentai","loli","nsfw","ecchi","sex","gore","porn","violence","lewd","fuck","waifu","nigger",];//woooo so bad. const badTags = ["gore","nudity","ahegao","irrumatio","sex toys","ashikoki","defloration","paizuri","tekoki","nakadashi","large breasts","facial","futanari","public sex","flat chest","voyeur","fellatio","incest","threesome","anal sex","bondage","cunnilingus","harem","masturbation","slavery","gyaru","rape","netori","milf","handjob","blackmail","sumata","watersports","boobjob","femdom","exhibitionism","human pet","virginity","group sex"]; badWords = badWords.concat(badTags); function createCheckbox(target,id,checked){//target[,id] let hohCheckbox = create("label",["hohCheckbox","el-checkbox__input"],false,target); let checkbox = create("input",false,false,hohCheckbox); if(id){ checkbox.id = id } checkbox.type = "checkbox"; checkbox.checked = !!checked; create("span","el-checkbox__inner",false,hohCheckbox); return checkbox } function createDisplayBox(cssProperties,windowTitle){ let displayBox = create("div","hohDisplayBox",false,document.querySelector("#app") || document.querySelector(".termsFeed") || document.body,cssProperties); if(windowTitle){ create("span","hohDisplayBoxTitle",windowTitle,displayBox) } let mousePosition; let offset = [0,0]; let isDown = false; let isDownResize = false; let displayBoxClose = create("span","hohDisplayBoxClose",svgAssets.cross,displayBox); displayBoxClose.onclick = function(){ displayBox.remove(); }; let resizePearl = create("span","hohResizePearl",false,displayBox); displayBox.addEventListener("mousedown",function(e){ if(!["P","PRE"].includes(e.target.tagName)){//don't annoy people trying to copy-paste isDown = true; offset = [ displayBox.offsetLeft - e.clientX, displayBox.offsetTop - e.clientY ]; } },true); resizePearl.addEventListener("mousedown",function(event){ event.stopPropagation(); event.preventDefault(); isDownResize = true; offset = [ displayBox.offsetLeft, displayBox.offsetTop ]; },true); document.addEventListener("mouseup",function(){ isDown = false; isDownResize = false; },true); document.addEventListener("mousemove",function(event){ if(isDownResize){ mousePosition = { x : event.clientX, y : event.clientY }; displayBox.style.width = (mousePosition.x - offset[0] + 5) + "px"; displayBox.style.height = (mousePosition.y - offset[1] + 5) + "px"; return; } if(isDown){ mousePosition = { x : event.clientX, y : event.clientY }; displayBox.style.left = (mousePosition.x + offset[0]) + "px"; displayBox.style.top = (mousePosition.y + offset[1]) + "px"; } },true); let innerSpace = create("div","scrollableContent",false,displayBox); return innerSpace; } function removeChildren(node){ if(node){ while(node.childElementCount){ node.lastChild.remove() } } } const svgAssets = { envelope : "✉", cross : "✕", check: "✓", loading: "…", like : "♥" }; const svgAssets2 = {}; [ { "name": "likeNative", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "heart", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-heart fa-w-16 fa-sm" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z" } } ] } }, { "name": "reply", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "comments", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 576 512", "class": "svg-inline--fa fa-comments fa-w-18 fa-sm" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z" } } ] } }, { "name": "angleDown", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "angle-down", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 310 512", "class": "svg-inline--fa fa-angle-down fa-w-10" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z" } } ] } }, { "name": "smile", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "smile", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 496 512", "class": "svg-inline--fa fa-smile fa-w-16 fa-lg" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm84-143.4c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.6-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.2-8.4-25.3-7.1-33.8 3.1zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z" } } ] } }, { "name": "meh", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "meh", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 496 512", "class": "svg-inline--fa fa-meh fa-w-16 fa-lg" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm8 144H160c-13.2 0-24 10.8-24 24s10.8 24 24 24h176c13.2 0 24-10.8 24-24s-10.8-24-24-24z" } } ] } }, { "name": "frown", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "frown", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 496 512", "class": "svg-inline--fa fa-frown fa-w-16 fa-lg" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.5 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c4.8 5.7 11.6 8.6 18.5 8.6 5.4 0 10.9-1.8 15.4-5.6 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z" } } ] } }, { "name": "star", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "star", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 576 512", "class": "icon svg-inline--fa fa-star fa-w-18" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z" } } ] } }, { "name": "notes", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "notes", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-redo-alt fa-w-16" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z" } } ] } }, { "name": "notesTags", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "notesTags", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-redo-alt fa-w-16" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z" } }, { "element": "text", "content": "#", "attributes": { "fill": "grey", "x": 110, "y": 395, "font-size": 400 } } ] } }, { "name": "repeat", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "redo-alt", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-redo-alt fa-w-16 repeat" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M256.455 8c66.269.119 126.437 26.233 170.859 68.685l35.715-35.715C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.75c-30.864-28.899-70.801-44.907-113.23-45.273-92.398-.798-170.283 73.977-169.484 169.442C88.764 348.009 162.184 424 256 424c41.127 0 79.997-14.678 110.629-41.556 4.743-4.161 11.906-3.908 16.368.553l39.662 39.662c4.872 4.872 4.631 12.815-.482 17.433C378.202 479.813 319.926 504 256 504 119.034 504 8.001 392.967 8 256.002 7.999 119.193 119.646 7.755 256.455 8z" } } ] } }, { "name": "listView", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "th-large", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "icon svg-inline--fa fa-th-large fa-w-16" }, "children": [ { "element": "g", "attributes": { "fill": "currentColor" }, "children": [ { "element": "circle", "attributes": { "cx": 48, "cy": 96, "r": 48 } }, { "element": "circle", "attributes": { "cx": 48, "cy": 256, "r": 48 } }, { "element": "circle", "attributes": { "cx": 48, "cy": 416, "r": 48 } }, { "element": "rect", "attributes": { "x": 128, "y": 60, "width": 384, "height": 72, "rx": 16 } }, { "element": "rect", "attributes": { "x": 128, "y": 220, "width": 384, "height": 72, "rx": 16 } }, { "element": "rect", "attributes": { "x": 128, "y": 380, "width": 384, "height": 72, "rx": 16 } } ] } ] } }, { "name": "simpleListView", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "th-large", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "icon svg-inline--fa fa-th-large fa-w-16" }, "children": [ { "element": "g", "attributes": { "fill": "currentColor" }, "children": [ { "element": "rect", "attributes": { "x": 0, "y": 60, "width": 384, "height": 72, "rx": 16 } }, { "element": "rect", "attributes": { "x": 0, "y": 220, "width": 384, "height": 72, "rx": 16 } }, { "element": "rect", "attributes": { "x": 0, "y": 380, "width": 384, "height": 72, "rx": 16 } } ] } ] } }, { "name": "bigListView", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "th-large", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "icon svg-inline--fa fa-th-large fa-w-16" }, "children": [ { "element": "g", "attributes": { "fill": "currentColor" }, "children": [ { "element": "rect", "attributes": { "x": 0, "y": 32, "width": 149, "height": 128, "rx": 24 } }, { "element": "rect", "attributes": { "x": 0, "y": 192, "width": 149, "height": 128, "rx": 24 } }, { "element": "rect", "attributes": { "x": 0, "y": 352, "width": 149, "height": 128, "rx": 24 } }, { "element": "rect", "attributes": { "x": 181, "y": 32, "width": 331, "height": 128, "rx": 24 } }, { "element": "rect", "attributes": { "x": 181, "y": 192, "width": 331, "height": 128, "rx": 24 } }, { "element": "rect", "attributes": { "x": 181, "y": 352, "width": 331, "height": 128, "rx": 24 } } ] } ] } }, { "name": "compactView", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "th-large", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "icon svg-inline--fa fa-th-large fa-w-16" }, "children": [ { "element": "g", "attributes": { "fill": "currentColor" }, "children": [ { "element": "rect", "attributes": { "x": 0, "y": 32, "width": 155, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 0, "y": 272, "width": 155, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 178, "y": 32, "width": 155, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 178, "y": 272, "width": 155, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 356, "y": 32, "width": 155, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 356, "y": 272, "width": 155, "height": 208, "rx": 24 } } ] } ] } }, { "name": "cardView", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "th-large", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "icon svg-inline--fa fa-th-large fa-w-16" }, "children": [ { "element": "g", "attributes": { "fill": "currentColor" }, "children": [ { "element": "rect", "attributes": { "x": 0, "y": 32, "width": 240, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 0, "y": 272, "width": 240, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 272, "y": 32, "width": 240, "height": 208, "rx": 24 } }, { "element": "rect", "attributes": { "x": 272, "y": 272, "width": 240, "height": 208, "rx": 24 } } ] } ] } }, { "name": "link", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "data-prefix": "fas", "data-icon": "link", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-link fa-w-16 fa-sm" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" } } ] } }, { "name": "eye", "shape": { "element": "svg", "attributes": { "aria-hidden": "true", "focusable": "false", "data-prefix": "fas", "data-icon": "eye", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 576 512", "class": "svg-inline--fa fa-eye fa-w-18 fa-sm" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z" } } ] } }, { "name": "thumbsUp", "shape": { "element": "svg", "attributes": { "focusable": "false", "data-prefix": "fas", "data-icon": "thumbs-up", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-thumbs-up fa-w-16" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M104 224H24c-13.255 0-24 10.745-24 24v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V248c0-13.255-10.745-24-24-24zM64 472c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zM384 81.452c0 42.416-25.97 66.208-33.277 94.548h101.723c33.397 0 59.397 27.746 59.553 58.098.084 17.938-7.546 37.249-19.439 49.197l-.11.11c9.836 23.337 8.237 56.037-9.308 79.469 8.681 25.895-.069 57.704-16.382 74.757 4.298 17.598 2.244 32.575-6.148 44.632C440.202 511.587 389.616 512 346.839 512l-2.845-.001c-48.287-.017-87.806-17.598-119.56-31.725-15.957-7.099-36.821-15.887-52.651-16.178-6.54-.12-11.783-5.457-11.783-11.998v-213.77c0-3.2 1.282-6.271 3.558-8.521 39.614-39.144 56.648-80.587 89.117-113.111 14.804-14.832 20.188-37.236 25.393-58.902C282.515 39.293 291.817 0 312 0c24 0 72 8 72 81.452z" } } ] } }, { "name": "thumbsDown", "shape": { "element": "svg", "attributes": { "focusable": "false", "data-prefix": "fas", "data-icon": "thumbs-down", "role": "img", "xmls": "http://www.w3.org/2000/svg", "viewBox": "0 0 512 512", "class": "svg-inline--fa fa-thumbs-down fa-w-16" }, "children": [ { "element": "path", "attributes": { "fill": "currentColor", "d": "M0 56v240c0 13.255 10.745 24 24 24h80c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24H24C10.745 32 0 42.745 0 56zm40 200c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24zm272 256c-20.183 0-29.485-39.293-33.931-57.795-5.206-21.666-10.589-44.07-25.393-58.902-32.469-32.524-49.503-73.967-89.117-113.111a11.98 11.98 0 0 1-3.558-8.521V59.901c0-6.541 5.243-11.878 11.783-11.998 15.831-.29 36.694-9.079 52.651-16.178C256.189 17.598 295.709.017 343.995 0h2.844c42.777 0 93.363.413 113.774 29.737 8.392 12.057 10.446 27.034 6.148 44.632 16.312 17.053 25.063 48.863 16.382 74.757 17.544 23.432 19.143 56.132 9.308 79.469l.11.11c11.893 11.949 19.523 31.259 19.439 49.197-.156 30.352-26.157 58.098-59.553 58.098H350.723C358.03 364.34 384 388.132 384 430.548 384 504 336 512 312 512z" } } ] } } ] .forEach(inlineSVG => { svgAssets2[inlineSVG.name] = svgShape(inlineSVG.shape.element,false,inlineSVG.shape.attributes,inlineSVG.shape.children,inlineSVG.shape.content) }) const statusTypes = { "COMPLETED" : translate("$mediaStatus_completed"), "CURRENT" : translate("$mediaStatus_current"), "PAUSED" : translate("$mediaStatus_paused"), "DROPPED" : translate("$mediaStatus_dropped"), "PLANNING" : translate("$mediaStatus_planning"), "REPEATING" : translate("$mediaStatus_repeating") }; //semantic order, from "very positive", completed, to "very negative", dropped. //planning is a neutral in the middle. //repeating is kinda like a middle ground between current and completed const semmanticStatusOrder = ["COMPLETED","REPEATING","CURRENT","PLANNING","PAUSED","DROPPED"]; const distributionColours = { "COMPLETED" : "rgb(104, 214, 57)", "CURRENT" : "rgb( 2, 169, 255)", "PAUSED" : "rgb(247, 121, 164)", "DROPPED" : "rgb(232, 93, 117)", "PLANNING" : "rgb(247, 154, 99)", "REPEATING" : "violet" }; const distributionFormats = { "TV" : translate("$mediaFormat_TV"), "TV_SHORT" : translate("$mediaFormat_TV_SHORT"), "MOVIE" : translate("$mediaFormat_MOVIE"), "SPECIAL" : translate("$mediaFormat_SPECIAL"), "OVA" : translate("$mediaFormat_OVA"), "ONA" : translate("$mediaFormat_ONA"), "MUSIC" : translate("$mediaFormat_MUSIC"), "MANGA" : translate("$mediaFormat_MANGA"), "NOVEL" : translate("$mediaFormat_NOVEL"), "ONE_SHOT" : translate("$mediaFormat_ONE_SHOT") }; const distributionStatus = { "FINISHED" : translate("$mediaReleaseStatus_finished",null,"Finished"), "RELEASING" : translate("$mediaReleaseStatus_releasing",null,"Releasing"), "NOT_YET_RELEASED" : translate("$mediaReleaseStatus_notYetReleased",null,"Not Yet Released"), "CANCELLED" : translate("$mediaReleaseStatus_cancelled",null,"Cancelled"), "HIATUS" : translate("$mediaReleaseStatus_hiatus",null,"Hiatus"), anime: { "FINISHED" : translate("$mediaReleaseStatusAnime_finished",null,"Finished"), "RELEASING" : translate("$mediaReleaseStatusAnime_releasing",null,"Releasing"), "NOT_YET_RELEASED" : translate("$mediaReleaseStatusAnime_notYetReleased",null,"Not Yet Released"), "CANCELLED" : translate("$mediaReleaseStatusAnime_cancelled",null,"Cancelled"), "HIATUS" : translate("$mediaReleaseStatusAnime_hiatus",null,"Hiatus"), }, manga: { "FINISHED" : translate("$mediaReleaseStatusManga_finished",null,"Finished"), "RELEASING" : translate("$mediaReleaseStatusManga_releasing",null,"Releasing"), "NOT_YET_RELEASED" : translate("$mediaReleaseStatusManga_notYetReleased",null,"Not Yet Released"), "CANCELLED" : translate("$mediaReleaseStatusManga_cancelled",null,"Cancelled"), "HIATUS" : translate("$mediaReleaseStatusManga_hiatus",null,"Hiatus"), } }; const categoryColours = new Map([ [1,"rgb(0, 170, 255)"], [2,"rgb(76, 175, 80)"], [3,"rgb(75, 179, 185)"], [4,"rgb(75, 179, 185)"], [5,"rgb(103, 58, 183)"], [7,"rgb(78, 163, 230)"], [8,"rgb(0, 150, 136)"], [9,"rgb(96, 125, 139)"], [10,"rgb(36, 36, 169)"], [11,"rgb(251, 71, 30)"], [12,"rgb(239, 48, 81)"], [13,"rgb(233, 30, 99)"], [15,"rgb(184, 90, 199)"], [16,"rgb(255, 152, 0)"], [17,"rgb(121, 85, 72)"], [18,"rgb(43, 76, 105)"] ]); if(useScripts.colourPicker && (!useScripts.mobileFriendly)){ let colourStyle = create("style"); colourStyle.id = "colour-picker-styles"; colourStyle.type = "text/css"; documentHead.appendChild(colourStyle); const basicStyles = ` .footer .links{ margin-left: calc(0px + 1%); transform: translate(0px,10px); } .hohColourPicker .hohCheckbox{ margin-left: 10px; } `; if(Array.isArray(useScripts.colourSettings)){//legacy styles let newObjectStyle = {}; useScripts.colourSettings.forEach( colour => newObjectStyle[colour.colour] = { initial: colour.initial, dark: colour.dark, contrast: colour.contrast } ); useScripts.colourSettings = newObjectStyle; useScripts.save() } let applyColourStyles = function(){ colourStyle.textContent = basicStyles;//eh, fix later. Object.keys(useScripts.colourSettings).forEach(key => { let colour = useScripts.colourSettings[key]; let hexToRgb = function(hex){ let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return result ? [ parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16) ] : null; } if(colour.initial){ colourStyle.textContent += `:root{${key}:${hexToRgb(colour.initial).join(",")};}` }; if(colour.dark){ colourStyle.textContent += `.site-theme-dark{${key}:${hexToRgb(colour.dark).join(",")};}` }; if(colour.contrast){ colourStyle.textContent += `.site-theme-contrast{${key}:${hexToRgb(colour.contrast).join(",")};}` } }) };applyColourStyles(); let adder = function(){ let colourPickerLocation = document.querySelector("#app > .wrap > .footer > .container"); if(colourPickerLocation){ const supportedColours = [ "--color-background", "--color-foreground", "--color-foreground-grey", "--color-foreground-grey-dark", "--color-foreground-blue", "--color-foreground-blue-dark", "--color-background-blue-dark", "--color-overlay", "--color-shadow", "--color-shadow-dark", "--color-text", "--color-text-light", "--color-text-lighter", "--color-text-bright", "--color-blue", "--color-blue-dim", "--color-white", "--color-black", "--color-red", "--color-peach", "--color-orange", "--color-yellow", "--color-green" ]; let colourChanger = function(){ useScripts.colourSettings[cpSelector.value] = { "initial" : (cpInitialBox.checked ? cpInput.value : false), "dark" : (cpDarkBox.checked ? cpInput.value : false), "contrast" : (cpContrastBox.checked ? cpInput.value : false) } applyColourStyles(); useScripts.save() }; let cpContainer = create("div","hohColourPicker",false,colourPickerLocation); let cpTitle = create("h2",false,translate("$adjustColours_title"),cpContainer); let cpInput = create("input",false,false,cpContainer); cpInput.type = "color"; let cpSelector = create("select",false,false,cpContainer); supportedColours.forEach(colour => { let option = create("option",false,colour,cpSelector); option.value = colour; }); let cpDomain = create("p",false,false,cpContainer); let cpInitialBox = createCheckbox(cpDomain); create("span",false,translate("$theme_default"),cpDomain); let cpDarkBox = createCheckbox(cpDomain); create("span",false,translate("$theme_dark"),cpDomain); let cpContrastBox = createCheckbox(cpDomain); create("span",false,translate("$theme_highContrast"),cpDomain); let cpSelectorChanger = function(){ if(useScripts.colourSettings[cpSelector.value]){ cpInitialBox.checked = !!useScripts.colourSettings[cpSelector.value].initial; cpDarkBox.checked = !!useScripts.colourSettings[cpSelector.value].dark; cpContrastBox.checked = !!useScripts.colourSettings[cpSelector.value].contrast; cpInput.value = useScripts.colourSettings[cpSelector.value].initial } cpInitialBox.checked = false; cpDarkBox.checked = false; cpContrastBox.checked = false; }; cpSelector.onchange = cpSelectorChanger; cpInput.onchange = colourChanger; cpInitialBox.onchange = colourChanger; cpDarkBox.onchange = colourChanger; cpContrastBox.onchange = colourChanger; cpSelectorChanger() } else{ setTimeout(adder,1000) } }; adder() } function scoreFormatter(score,format){ let scoreElement = create("span","hohScore"); if(format === "POINT_100"){ scoreElement.innerText = score + "/100" } else if( format === "POINT_10_DECIMAL" || format === "POINT_10" ){ scoreElement.innerText = score + "/10" } else if(format === "POINT_3"){ scoreElement.classList.add("hohSmiley"); if(score === 3){ scoreElement.appendChild(svgAssets2.smile.cloneNode(true)); } else if(score === 2){ scoreElement.appendChild(svgAssets2.meh.cloneNode(true)); } else if(score === 1){ scoreElement.appendChild(svgAssets2.frown.cloneNode(true)); } } else if(format === "POINT_5"){ scoreElement.innerText = score; scoreElement.appendChild(svgAssets2.star.cloneNode(true)); } else{//future types. Just gambling that they look okay in plain text scoreElement.innerText = score } return scoreElement } function convertScore(score,format){ if(format === "POINT_100"){ return score } else if( format === "POINT_10_DECIMAL" || format === "POINT_10" ){ return score*10 } else if(format === "POINT_3"){ if(score === 3){ return 85 } else if(score === 2){ return 60 } else if(score === 1){ return 35 } return 0 } else if(format === "POINT_5"){ if(score === 0){ return 0 }; return score*20 - 10 } } function saveAs(data,fileName,pureText){ let link = create("a"); document.body.appendChild(link); let json = pureText ? data : JSON.stringify(data); let blob = new Blob([json],{type: "octet/stream"}); let url = window.URL.createObjectURL(blob); link.href = url; link.download = fileName || translate("$default_filename"); link.click(); window.URL.revokeObjectURL(url); document.body.removeChild(link) } function levDist(s,t){//https://stackoverflow.com/a/11958496/5697837 // Step 1 s = s.replace("’", "'") t = t.replace("’", "'") let n = s.length; let m = t.length; if(!n){ return m } if(!m){ return n } let d = []; //2d matrix for(var i = n; i >= 0; i--) d[i] = []; // Step 2 for(var i = n; i >= 0; i--) d[i][0] = i; for(var j = m; j >= 0; j--) d[0][j] = j; // Step 3 for(var i = 1; i <= n; i++){ let s_i = s.charAt(i - 1); // Step 4 for(var j = 1; j <= m; j++){ //Check the jagged ld total so far if(i === j && d[i][j] > 4){ return n } let t_j = t.charAt(j - 1); let cost = (s_i === t_j) ? 0 : 1; // Step 5 //Calculate the minimum let mi = d[i - 1][j] + 1; let b = d[i][j - 1] + 1; let c = d[i - 1][j - 1] + cost; if(b < mi){ mi = b } if(c < mi){ mi = c; } d[i][j] = mi; // Step 6 //Damerau transposition /*if (i > 1 && j > 1 && s_i === t.charAt(j - 2) && s.charAt(i - 2) === t_j) { d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost); }*/ } } return d[n][m] } // Copyright (c) 2013 Pieroxy // This work is free. You can redistribute it and/or modify it // under the terms of the WTFPL, Version 2 // For more information see LICENSE.txt or http://www.wtfpl.net/ // // For more information, the home page: // http://pieroxy.net/blog/pages/lz-string/testing.html // // LZ-based compression algorithm, version 1.4.4 var LZString = (function() { // private property var f = String.fromCharCode; var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"; var baseReverseDic = {}; function getBaseValue(alphabet, character) { if (!baseReverseDic[alphabet]) { baseReverseDic[alphabet] = {}; for (var i=0 ; i>> 8; buf[i*2+1] = current_value % 256; } return buf; }, //decompress from uint8array (UCS-2 big endian format) decompressFromUint8Array:function (compressed) { if (compressed===null || compressed===undefined){ return LZString.decompress(compressed); } else { var buf=new Array(compressed.length/2); // 2 bytes per character for (var i=0, TotalLen=buf.length; i> 1; } } else { value = 1; for (i=0 ; i> 1; } } context_enlargeIn--; if (context_enlargeIn == 0) { context_enlargeIn = Math.pow(2, context_numBits); context_numBits++; } delete context_dictionaryToCreate[context_w]; } else { value = context_dictionary[context_w]; for (i=0 ; i> 1; } } context_enlargeIn--; if (context_enlargeIn == 0) { context_enlargeIn = Math.pow(2, context_numBits); context_numBits++; } // Add wc to the dictionary. context_dictionary[context_wc] = context_dictSize++; context_w = String(context_c); } } // Output the code for w. if (context_w !== "") { if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) { if (context_w.charCodeAt(0)<256) { for (i=0 ; i> 1; } } else { value = 1; for (i=0 ; i> 1; } } context_enlargeIn--; if (context_enlargeIn == 0) { context_enlargeIn = Math.pow(2, context_numBits); context_numBits++; } delete context_dictionaryToCreate[context_w]; } else { value = context_dictionary[context_w]; for (i=0 ; i> 1; } } context_enlargeIn--; if (context_enlargeIn == 0) { context_enlargeIn = Math.pow(2, context_numBits); context_numBits++; } } // Mark the end of the stream value = 2; for (i=0 ; i> 1; } // Flush the last char while (true) { context_data_val = (context_data_val << 1); if (context_data_position == bitsPerChar-1) { context_data.push(getCharFromInt(context_data_val)); break; } else context_data_position++; } return context_data.join(''); }, decompress: function (compressed) { if (compressed == null) return ""; if (compressed == "") return null; return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); }); }, _decompress: function (length, resetValue, getNextValue) { var dictionary = [], next, enlargeIn = 4, dictSize = 4, numBits = 3, entry = "", result = [], i, w, bits, resb, maxpower, power, c, data = {val:getNextValue(0), position:resetValue, index:1}; for (i = 0; i < 3; i += 1) { dictionary[i] = i; } bits = 0; maxpower = Math.pow(2,2); power=1; while (power!=maxpower) { resb = data.val & data.position; data.position >>= 1; if (data.position == 0) { data.position = resetValue; data.val = getNextValue(data.index++); } bits |= (resb>0 ? 1 : 0) * power; power <<= 1; } switch (next = bits) { case 0: bits = 0; maxpower = Math.pow(2,8); power=1; while (power!=maxpower) { resb = data.val & data.position; data.position >>= 1; if (data.position == 0) { data.position = resetValue; data.val = getNextValue(data.index++); } bits |= (resb>0 ? 1 : 0) * power; power <<= 1; } c = f(bits); break; case 1: bits = 0; maxpower = Math.pow(2,16); power=1; while (power!=maxpower) { resb = data.val & data.position; data.position >>= 1; if (data.position == 0) { data.position = resetValue; data.val = getNextValue(data.index++); } bits |= (resb>0 ? 1 : 0) * power; power <<= 1; } c = f(bits); break; case 2: return ""; } dictionary[3] = c; w = c; result.push(c); while (true) { if (data.index > length) { return ""; } bits = 0; maxpower = Math.pow(2,numBits); power=1; while (power!=maxpower) { resb = data.val & data.position; data.position >>= 1; if (data.position == 0) { data.position = resetValue; data.val = getNextValue(data.index++); } bits |= (resb>0 ? 1 : 0) * power; power <<= 1; } switch (c = bits) { case 0: bits = 0; maxpower = Math.pow(2,8); power=1; while (power!=maxpower) { resb = data.val & data.position; data.position >>= 1; if (data.position == 0) { data.position = resetValue; data.val = getNextValue(data.index++); } bits |= (resb>0 ? 1 : 0) * power; power <<= 1; } dictionary[dictSize++] = f(bits); c = dictSize-1; enlargeIn--; break; case 1: bits = 0; maxpower = Math.pow(2,16); power=1; while (power!=maxpower) { resb = data.val & data.position; data.position >>= 1; if (data.position == 0) { data.position = resetValue; data.val = getNextValue(data.index++); } bits |= (resb>0 ? 1 : 0) * power; power <<= 1; } dictionary[dictSize++] = f(bits); c = dictSize-1; enlargeIn--; break; case 2: return result.join(''); } if (enlargeIn == 0) { enlargeIn = Math.pow(2, numBits); numBits++; } if (dictionary[c]) { entry = dictionary[c]; } else { if (c === dictSize) { entry = w + w.charAt(0); } else { return null; } } result.push(entry); // Add w+entry[0] to the dictionary. dictionary[dictSize++] = w + entry.charAt(0); enlargeIn--; w = entry; if (enlargeIn == 0) { enlargeIn = Math.pow(2, numBits); numBits++; } } } }; return LZString; })(); if (typeof define === 'function' && define.amd) { define(function () { return LZString; }); } else if( typeof module !== 'undefined' && module != null ) { module.exports = LZString } /*! localForage -- Offline Storage, Improved Version 1.9.0 https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw (f.code="MODULE_NOT_FOUND", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o element; its readystatechange event will be fired asynchronously once it is inserted // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. var scriptEl = global.document.createElement('script'); scriptEl.onreadystatechange = function () { nextTick(); scriptEl.onreadystatechange = null; scriptEl.parentNode.removeChild(scriptEl); scriptEl = null; }; global.document.documentElement.appendChild(scriptEl); }; } else { scheduleDrain = function () { setTimeout(nextTick, 0); }; } } var draining; var queue = []; //named nextTick for less confusing stack traces function nextTick() { draining = true; var i, oldQueue; var len = queue.length; while (len) { oldQueue = queue; queue = []; i = -1; while (++i < len) { oldQueue[i](); } len = queue.length; } draining = false; } module.exports = immediate; function immediate(task) { if (queue.push(task) === 1 && !draining) { scheduleDrain(); } } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}],2:[function(_dereq_,module,exports){ 'use strict'; var immediate = _dereq_(1); /* istanbul ignore next */ function INTERNAL() {} var handlers = {}; var REJECTED = ['REJECTED']; var FULFILLED = ['FULFILLED']; var PENDING = ['PENDING']; module.exports = Promise; function Promise(resolver) { if (typeof resolver !== 'function') { throw new TypeError('resolver must be a function'); } this.state = PENDING; this.queue = []; this.outcome = void 0; if (resolver !== INTERNAL) { safelyResolveThenable(this, resolver); } } Promise.prototype["catch"] = function (onRejected) { return this.then(null, onRejected); }; Promise.prototype.then = function (onFulfilled, onRejected) { if (typeof onFulfilled !== 'function' && this.state === FULFILLED || typeof onRejected !== 'function' && this.state === REJECTED) { return this; } var promise = new this.constructor(INTERNAL); if (this.state !== PENDING) { var resolver = this.state === FULFILLED ? onFulfilled : onRejected; unwrap(promise, resolver, this.outcome); } else { this.queue.push(new QueueItem(promise, onFulfilled, onRejected)); } return promise; }; function QueueItem(promise, onFulfilled, onRejected) { this.promise = promise; if (typeof onFulfilled === 'function') { this.onFulfilled = onFulfilled; this.callFulfilled = this.otherCallFulfilled; } if (typeof onRejected === 'function') { this.onRejected = onRejected; this.callRejected = this.otherCallRejected; } } QueueItem.prototype.callFulfilled = function (value) { handlers.resolve(this.promise, value); }; QueueItem.prototype.otherCallFulfilled = function (value) { unwrap(this.promise, this.onFulfilled, value); }; QueueItem.prototype.callRejected = function (value) { handlers.reject(this.promise, value); }; QueueItem.prototype.otherCallRejected = function (value) { unwrap(this.promise, this.onRejected, value); }; function unwrap(promise, func, value) { immediate(function () { var returnValue; try { returnValue = func(value); } catch (e) { return handlers.reject(promise, e); } if (returnValue === promise) { handlers.reject(promise, new TypeError('Cannot resolve promise with itself')); } else { handlers.resolve(promise, returnValue); } }); } handlers.resolve = function (self, value) { var result = tryCatch(getThen, value); if (result.status === 'error') { return handlers.reject(self, result.value); } var thenable = result.value; if (thenable) { safelyResolveThenable(self, thenable); } else { self.state = FULFILLED; self.outcome = value; var i = -1; var len = self.queue.length; while (++i < len) { self.queue[i].callFulfilled(value); } } return self; }; handlers.reject = function (self, error) { self.state = REJECTED; self.outcome = error; var i = -1; var len = self.queue.length; while (++i < len) { self.queue[i].callRejected(error); } return self; }; function getThen(obj) { // Make sure we only access the accessor once as required by the spec var then = obj && obj.then; if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') { return function appyThen() { then.apply(obj, arguments); }; } } function safelyResolveThenable(self, thenable) { // Either fulfill, reject or reject with error var called = false; function onError(value) { if (called) { return; } called = true; handlers.reject(self, value); } function onSuccess(value) { if (called) { return; } called = true; handlers.resolve(self, value); } function tryToUnwrap() { thenable(onSuccess, onError); } var result = tryCatch(tryToUnwrap); if (result.status === 'error') { onError(result.value); } } function tryCatch(func, value) { var out = {}; try { out.value = func(value); out.status = 'success'; } catch (e) { out.status = 'error'; out.value = e; } return out; } Promise.resolve = resolve; function resolve(value) { if (value instanceof this) { return value; } return handlers.resolve(new this(INTERNAL), value); } Promise.reject = reject; function reject(reason) { var promise = new this(INTERNAL); return handlers.reject(promise, reason); } Promise.all = all; function all(iterable) { var self = this; if (Object.prototype.toString.call(iterable) !== '[object Array]') { return this.reject(new TypeError('must be an array')); } var len = iterable.length; var called = false; if (!len) { return this.resolve([]); } var values = new Array(len); var resolved = 0; var i = -1; var promise = new this(INTERNAL); while (++i < len) { allResolver(iterable[i], i); } return promise; function allResolver(value, i) { self.resolve(value).then(resolveFromAll, function (error) { if (!called) { called = true; handlers.reject(promise, error); } }); function resolveFromAll(outValue) { values[i] = outValue; if (++resolved === len && !called) { called = true; handlers.resolve(promise, values); } } } } Promise.race = race; function race(iterable) { var self = this; if (Object.prototype.toString.call(iterable) !== '[object Array]') { return this.reject(new TypeError('must be an array')); } var len = iterable.length; var called = false; if (!len) { return this.resolve([]); } var i = -1; var promise = new this(INTERNAL); while (++i < len) { resolver(iterable[i]); } return promise; function resolver(value) { self.resolve(value).then(function (response) { if (!called) { called = true; handlers.resolve(promise, response); } }, function (error) { if (!called) { called = true; handlers.reject(promise, error); } }); } } },{"1":1}],3:[function(_dereq_,module,exports){ (function (global){ 'use strict'; if (typeof global.Promise !== 'function') { global.Promise = _dereq_(2); } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"2":2}],4:[function(_dereq_,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function getIDB() { /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */ try { if (typeof indexedDB !== 'undefined') { return indexedDB; } if (typeof webkitIndexedDB !== 'undefined') { return webkitIndexedDB; } if (typeof mozIndexedDB !== 'undefined') { return mozIndexedDB; } if (typeof OIndexedDB !== 'undefined') { return OIndexedDB; } if (typeof msIndexedDB !== 'undefined') { return msIndexedDB; } } catch (e) { return; } } var idb = getIDB(); function isIndexedDBValid() { try { // Initialize IndexedDB; fall back to vendor-prefixed versions // if needed. if (!idb || !idb.open) { return false; } // We mimic PouchDB here; // // We test for openDatabase because IE Mobile identifies itself // as Safari. Oh the lulz... var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform); var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1; // Safari <10.1 does not meet our requirements for IDB support // (see: https://github.com/pouchdb/pouchdb/issues/5572). // Safari 10.1 shipped with fetch, we can use that to detect it. // Note: this creates issues with `window.fetch` polyfills and // overrides; see: // https://github.com/localForage/localForage/issues/856 return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' && // some outdated implementations of IDB that appear on Samsung // and HTC Android devices <4.4 are missing IDBKeyRange // See: https://github.com/mozilla/localForage/issues/128 // See: https://github.com/mozilla/localForage/issues/272 typeof IDBKeyRange !== 'undefined'; } catch (e) { return false; } } // Abstracts constructing a Blob object, so it also works in older // browsers that don't support the native Blob constructor. (i.e. // old QtWebKit versions, at least). // Abstracts constructing a Blob object, so it also works in older // browsers that don't support the native Blob constructor. (i.e. // old QtWebKit versions, at least). function createBlob(parts, properties) { /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */ parts = parts || []; properties = properties || {}; try { return new Blob(parts, properties); } catch (e) { if (e.name !== 'TypeError') { throw e; } var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder; var builder = new Builder(); for (var i = 0; i < parts.length; i += 1) { builder.append(parts[i]); } return builder.getBlob(properties.type); } } // This is CommonJS because lie is an external dependency, so Rollup // can just ignore it. if (typeof Promise === 'undefined') { // In the "nopromises" build this will just throw if you don't have // a global promise object, but it would throw anyway later. _dereq_(3); } var Promise$1 = Promise; function executeCallback(promise, callback) { if (callback) { promise.then(function (result) { callback(null, result); }, function (error) { callback(error); }); } } function executeTwoCallbacks(promise, callback, errorCallback) { if (typeof callback === 'function') { promise.then(callback); } if (typeof errorCallback === 'function') { promise["catch"](errorCallback); } } function normalizeKey(key) { // Cast the key to a string, as that's all we can set as a key. if (typeof key !== 'string') { console.warn(key + ' used as a key, but it is not a string.'); key = String(key); } return key; } function getCallback() { if (arguments.length && typeof arguments[arguments.length - 1] === 'function') { return arguments[arguments.length - 1]; } } // Some code originally from async_storage.js in // [Gaia](https://github.com/mozilla-b2g/gaia). var DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support'; var supportsBlobs = void 0; var dbContexts = {}; var toString = Object.prototype.toString; // Transaction Modes var READ_ONLY = 'readonly'; var READ_WRITE = 'readwrite'; // Transform a binary string to an array buffer, because otherwise // weird stuff happens when you try to work with the binary string directly. // It is known. // From http://stackoverflow.com/questions/14967647/ (continues on next line) // encode-decode-image-with-base64-breaks-image (2013-04-21) function _binStringToArrayBuffer(bin) { var length = bin.length; var buf = new ArrayBuffer(length); var arr = new Uint8Array(buf); for (var i = 0; i < length; i++) { arr[i] = bin.charCodeAt(i); } return buf; } // // Blobs are not supported in all versions of IndexedDB, notably // Chrome <37 and Android <5. In those versions, storing a blob will throw. // // Various other blob bugs exist in Chrome v37-42 (inclusive). // Detecting them is expensive and confusing to users, and Chrome 37-42 // is at very low usage worldwide, so we do a hacky userAgent check instead. // // content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120 // 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916 // FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836 // // Code borrowed from PouchDB. See: // https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js // function _checkBlobSupportWithoutCaching(idb) { return new Promise$1(function (resolve) { var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE); var blob = createBlob(['']); txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key'); txn.onabort = function (e) { // If the transaction aborts now its due to not being able to // write to the database, likely due to the disk being full e.preventDefault(); e.stopPropagation(); resolve(false); }; txn.oncomplete = function () { var matchedChrome = navigator.userAgent.match(/Chrome\/(\d+)/); var matchedEdge = navigator.userAgent.match(/Edge\//); // MS Edge pretends to be Chrome 42: // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43); }; })["catch"](function () { return false; // error, so assume unsupported }); } function _checkBlobSupport(idb) { if (typeof supportsBlobs === 'boolean') { return Promise$1.resolve(supportsBlobs); } return _checkBlobSupportWithoutCaching(idb).then(function (value) { supportsBlobs = value; return supportsBlobs; }); } function _deferReadiness(dbInfo) { var dbContext = dbContexts[dbInfo.name]; // Create a deferred object representing the current database operation. var deferredOperation = {}; deferredOperation.promise = new Promise$1(function (resolve, reject) { deferredOperation.resolve = resolve; deferredOperation.reject = reject; }); // Enqueue the deferred operation. dbContext.deferredOperations.push(deferredOperation); // Chain its promise to the database readiness. if (!dbContext.dbReady) { dbContext.dbReady = deferredOperation.promise; } else { dbContext.dbReady = dbContext.dbReady.then(function () { return deferredOperation.promise; }); } } function _advanceReadiness(dbInfo) { var dbContext = dbContexts[dbInfo.name]; // Dequeue a deferred operation. var deferredOperation = dbContext.deferredOperations.pop(); // Resolve its promise (which is part of the database readiness // chain of promises). if (deferredOperation) { deferredOperation.resolve(); return deferredOperation.promise; } } function _rejectReadiness(dbInfo, err) { var dbContext = dbContexts[dbInfo.name]; // Dequeue a deferred operation. var deferredOperation = dbContext.deferredOperations.pop(); // Reject its promise (which is part of the database readiness // chain of promises). if (deferredOperation) { deferredOperation.reject(err); return deferredOperation.promise; } } function _getConnection(dbInfo, upgradeNeeded) { return new Promise$1(function (resolve, reject) { dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext(); if (dbInfo.db) { if (upgradeNeeded) { _deferReadiness(dbInfo); dbInfo.db.close(); } else { return resolve(dbInfo.db); } } var dbArgs = [dbInfo.name]; if (upgradeNeeded) { dbArgs.push(dbInfo.version); } var openreq = idb.open.apply(idb, dbArgs); if (upgradeNeeded) { openreq.onupgradeneeded = function (e) { var db = openreq.result; try { db.createObjectStore(dbInfo.storeName); if (e.oldVersion <= 1) { // Added when support for blob shims was added db.createObjectStore(DETECT_BLOB_SUPPORT_STORE); } } catch (ex) { if (ex.name === 'ConstraintError') { console.warn('The database "' + dbInfo.name + '"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage "' + dbInfo.storeName + '" already exists.'); } else { throw ex; } } }; } openreq.onerror = function (e) { e.preventDefault(); reject(openreq.error); }; openreq.onsuccess = function () { resolve(openreq.result); _advanceReadiness(dbInfo); }; }); } function _getOriginalConnection(dbInfo) { return _getConnection(dbInfo, false); } function _getUpgradedConnection(dbInfo) { return _getConnection(dbInfo, true); } function _isUpgradeNeeded(dbInfo, defaultVersion) { if (!dbInfo.db) { return true; } var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName); var isDowngrade = dbInfo.version < dbInfo.db.version; var isUpgrade = dbInfo.version > dbInfo.db.version; if (isDowngrade) { // If the version is not the default one // then warn for impossible downgrade. if (dbInfo.version !== defaultVersion) { console.warn('The database "' + dbInfo.name + '"' + " can't be downgraded from version " + dbInfo.db.version + ' to version ' + dbInfo.version + '.'); } // Align the versions to prevent errors. dbInfo.version = dbInfo.db.version; } if (isUpgrade || isNewStore) { // If the store is new then increment the version (if needed). // This will trigger an "upgradeneeded" event which is required // for creating a store. if (isNewStore) { var incVersion = dbInfo.db.version + 1; if (incVersion > dbInfo.version) { dbInfo.version = incVersion; } } return true; } return false; } // encode a blob for indexeddb engines that don't support blobs function _encodeBlob(blob) { return new Promise$1(function (resolve, reject) { var reader = new FileReader(); reader.onerror = reject; reader.onloadend = function (e) { var base64 = btoa(e.target.result || ''); resolve({ __local_forage_encoded_blob: true, data: base64, type: blob.type }); }; reader.readAsBinaryString(blob); }); } // decode an encoded blob function _decodeBlob(encodedBlob) { var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data)); return createBlob([arrayBuff], { type: encodedBlob.type }); } // is this one of our fancy encoded blobs? function _isEncodedBlob(value) { return value && value.__local_forage_encoded_blob; } // Specialize the default `ready()` function by making it dependent // on the current database operations. Thus, the driver will be actually // ready when it's been initialized (default) *and* there are no pending // operations on the database (initiated by some other instances). function _fullyReady(callback) { var self = this; var promise = self._initReady().then(function () { var dbContext = dbContexts[self._dbInfo.name]; if (dbContext && dbContext.dbReady) { return dbContext.dbReady; } }); executeTwoCallbacks(promise, callback, callback); return promise; } // Try to establish a new db connection to replace the // current one which is broken (i.e. experiencing // InvalidStateError while creating a transaction). function _tryReconnect(dbInfo) { _deferReadiness(dbInfo); var dbContext = dbContexts[dbInfo.name]; var forages = dbContext.forages; for (var i = 0; i < forages.length; i++) { var forage = forages[i]; if (forage._dbInfo.db) { forage._dbInfo.db.close(); forage._dbInfo.db = null; } } dbInfo.db = null; return _getOriginalConnection(dbInfo).then(function (db) { dbInfo.db = db; if (_isUpgradeNeeded(dbInfo)) { // Reopen the database for upgrading. return _getUpgradedConnection(dbInfo); } return db; }).then(function (db) { // store the latest db reference // in case the db was upgraded dbInfo.db = dbContext.db = db; for (var i = 0; i < forages.length; i++) { forages[i]._dbInfo.db = db; } })["catch"](function (err) { _rejectReadiness(dbInfo, err); throw err; }); } // FF doesn't like Promises (micro-tasks) and IDDB store operations, // so we have to do it with callbacks function createTransaction(dbInfo, mode, callback, retries) { if (retries === undefined) { retries = 1; } try { var tx = dbInfo.db.transaction(dbInfo.storeName, mode); callback(null, tx); } catch (err) { if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) { return Promise$1.resolve().then(function () { if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) { // increase the db version, to create the new ObjectStore if (dbInfo.db) { dbInfo.version = dbInfo.db.version + 1; } // Reopen the database for upgrading. return _getUpgradedConnection(dbInfo); } }).then(function () { return _tryReconnect(dbInfo).then(function () { createTransaction(dbInfo, mode, callback, retries - 1); }); })["catch"](callback); } callback(err); } } function createDbContext() { return { // Running localForages sharing a database. forages: [], // Shared database. db: null, // Database readiness (promise). dbReady: null, // Deferred operations on the database. deferredOperations: [] }; } // Open the IndexedDB database (automatically creates one if one didn't // previously exist), using any options set in the config. function _initStorage(options) { var self = this; var dbInfo = { db: null }; if (options) { for (var i in options) { dbInfo[i] = options[i]; } } // Get the current context of the database; var dbContext = dbContexts[dbInfo.name]; // ...or create a new context. if (!dbContext) { dbContext = createDbContext(); // Register the new context in the global container. dbContexts[dbInfo.name] = dbContext; } // Register itself as a running localForage in the current context. dbContext.forages.push(self); // Replace the default `ready()` function with the specialized one. if (!self._initReady) { self._initReady = self.ready; self.ready = _fullyReady; } // Create an array of initialization states of the related localForages. var initPromises = []; function ignoreErrors() { // Don't handle errors here, // just makes sure related localForages aren't pending. return Promise$1.resolve(); } for (var j = 0; j < dbContext.forages.length; j++) { var forage = dbContext.forages[j]; if (forage !== self) { // Don't wait for itself... initPromises.push(forage._initReady()["catch"](ignoreErrors)); } } // Take a snapshot of the related localForages. var forages = dbContext.forages.slice(0); // Initialize the connection process only when // all the related localForages aren't pending. return Promise$1.all(initPromises).then(function () { dbInfo.db = dbContext.db; // Get the connection or open a new one without upgrade. return _getOriginalConnection(dbInfo); }).then(function (db) { dbInfo.db = db; if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) { // Reopen the database for upgrading. return _getUpgradedConnection(dbInfo); } return db; }).then(function (db) { dbInfo.db = dbContext.db = db; self._dbInfo = dbInfo; // Share the final connection amongst related localForages. for (var k = 0; k < forages.length; k++) { var forage = forages[k]; if (forage !== self) { // Self is already up-to-date. forage._dbInfo.db = dbInfo.db; forage._dbInfo.version = dbInfo.version; } } }); } function getItem(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.get(key); req.onsuccess = function () { var value = req.result; if (value === undefined) { value = null; } if (_isEncodedBlob(value)) { value = _decodeBlob(value); } resolve(value); }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Iterate over all items stored in database. function iterate(iterator, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.openCursor(); var iterationNumber = 1; req.onsuccess = function () { var cursor = req.result; if (cursor) { var value = cursor.value; if (_isEncodedBlob(value)) { value = _decodeBlob(value); } var result = iterator(value, cursor.key, iterationNumber++); // when the iterator callback returns any // (non-`undefined`) value, then we stop // the iteration immediately if (result !== void 0) { resolve(result); } else { cursor["continue"](); } } else { resolve(); } }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function setItem(key, value, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { var dbInfo; self.ready().then(function () { dbInfo = self._dbInfo; if (toString.call(value) === '[object Blob]') { return _checkBlobSupport(dbInfo.db).then(function (blobSupport) { if (blobSupport) { return value; } return _encodeBlob(value); }); } return value; }).then(function (value) { createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); // The reason we don't _save_ null is because IE 10 does // not support saving the `null` type in IndexedDB. How // ironic, given the bug below! // See: https://github.com/mozilla/localForage/issues/161 if (value === null) { value = undefined; } var req = store.put(value, key); transaction.oncomplete = function () { // Cast to undefined so the value passed to // callback/promise is the same as what one would get out // of `getItem()` later. This leads to some weirdness // (setItem('foo', undefined) will return `null`), but // it's not my fault localStorage is our baseline and that // it's weird. if (value === undefined) { value = null; } resolve(value); }; transaction.onabort = transaction.onerror = function () { var err = req.error ? req.error : req.transaction.error; reject(err); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function removeItem(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); // We use a Grunt task to make this safe for IE and some // versions of Android (including those used by Cordova). // Normally IE won't like `.delete()` and will insist on // using `['delete']()`, but we have a build step that // fixes this for us now. var req = store["delete"](key); transaction.oncomplete = function () { resolve(); }; transaction.onerror = function () { reject(req.error); }; // The request will be also be aborted if we've exceeded our storage // space. transaction.onabort = function () { var err = req.error ? req.error : req.transaction.error; reject(err); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function clear(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.clear(); transaction.oncomplete = function () { resolve(); }; transaction.onabort = transaction.onerror = function () { var err = req.error ? req.error : req.transaction.error; reject(err); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function length(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.count(); req.onsuccess = function () { resolve(req.result); }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function key(n, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { if (n < 0) { resolve(null); return; } self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var advanced = false; var req = store.openKeyCursor(); req.onsuccess = function () { var cursor = req.result; if (!cursor) { // this means there weren't enough keys resolve(null); return; } if (n === 0) { // We have the first key, return it if that's what they // wanted. resolve(cursor.key); } else { if (!advanced) { // Otherwise, ask the cursor to skip ahead n // records. advanced = true; cursor.advance(n); } else { // When we get here, we've got the nth key. resolve(cursor.key); } } }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function keys(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) { if (err) { return reject(err); } try { var store = transaction.objectStore(self._dbInfo.storeName); var req = store.openKeyCursor(); var keys = []; req.onsuccess = function () { var cursor = req.result; if (!cursor) { resolve(keys); return; } keys.push(cursor.key); cursor["continue"](); }; req.onerror = function () { reject(req.error); }; } catch (e) { reject(e); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function dropInstance(options, callback) { callback = getCallback.apply(this, arguments); var currentConfig = this.config(); options = typeof options !== 'function' && options || {}; if (!options.name) { options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self = this; var promise; if (!options.name) { promise = Promise$1.reject('Invalid arguments'); } else { var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db; var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) { var dbContext = dbContexts[options.name]; var forages = dbContext.forages; dbContext.db = db; for (var i = 0; i < forages.length; i++) { forages[i]._dbInfo.db = db; } return db; }); if (!options.storeName) { promise = dbPromise.then(function (db) { _deferReadiness(options); var dbContext = dbContexts[options.name]; var forages = dbContext.forages; db.close(); for (var i = 0; i < forages.length; i++) { var forage = forages[i]; forage._dbInfo.db = null; } var dropDBPromise = new Promise$1(function (resolve, reject) { var req = idb.deleteDatabase(options.name); req.onerror = req.onblocked = function (err) { var db = req.result; if (db) { db.close(); } reject(err); }; req.onsuccess = function () { var db = req.result; if (db) { db.close(); } resolve(db); }; }); return dropDBPromise.then(function (db) { dbContext.db = db; for (var i = 0; i < forages.length; i++) { var _forage = forages[i]; _advanceReadiness(_forage._dbInfo); } })["catch"](function (err) { (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function () {}); throw err; }); }); } else { promise = dbPromise.then(function (db) { if (!db.objectStoreNames.contains(options.storeName)) { return; } var newVersion = db.version + 1; _deferReadiness(options); var dbContext = dbContexts[options.name]; var forages = dbContext.forages; db.close(); for (var i = 0; i < forages.length; i++) { var forage = forages[i]; forage._dbInfo.db = null; forage._dbInfo.version = newVersion; } var dropObjectPromise = new Promise$1(function (resolve, reject) { var req = idb.open(options.name, newVersion); req.onerror = function (err) { var db = req.result; db.close(); reject(err); }; req.onupgradeneeded = function () { var db = req.result; db.deleteObjectStore(options.storeName); }; req.onsuccess = function () { var db = req.result; db.close(); resolve(db); }; }); return dropObjectPromise.then(function (db) { dbContext.db = db; for (var j = 0; j < forages.length; j++) { var _forage2 = forages[j]; _forage2._dbInfo.db = db; _advanceReadiness(_forage2._dbInfo); } })["catch"](function (err) { (_rejectReadiness(options, err) || Promise$1.resolve())["catch"](function () {}); throw err; }); }); } } executeCallback(promise, callback); return promise; } var asyncStorage = { _driver: 'asyncStorage', _initStorage: _initStorage, _support: isIndexedDBValid(), iterate: iterate, getItem: getItem, setItem: setItem, removeItem: removeItem, clear: clear, length: length, key: key, keys: keys, dropInstance: dropInstance }; function isWebSQLValid() { return typeof openDatabase === 'function'; } // Sadly, the best way to save binary data in WebSQL/localStorage is serializing // it to Base64, so this is how we store it to prevent very strange errors with less // verbose ways of binary <-> string data storage. var BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var BLOB_TYPE_PREFIX = '~~local_forage_type~'; var BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/; var SERIALIZED_MARKER = '__lfsc__:'; var SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length; // OMG the serializations! var TYPE_ARRAYBUFFER = 'arbf'; var TYPE_BLOB = 'blob'; var TYPE_INT8ARRAY = 'si08'; var TYPE_UINT8ARRAY = 'ui08'; var TYPE_UINT8CLAMPEDARRAY = 'uic8'; var TYPE_INT16ARRAY = 'si16'; var TYPE_INT32ARRAY = 'si32'; var TYPE_UINT16ARRAY = 'ur16'; var TYPE_UINT32ARRAY = 'ui32'; var TYPE_FLOAT32ARRAY = 'fl32'; var TYPE_FLOAT64ARRAY = 'fl64'; var TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length; var toString$1 = Object.prototype.toString; function stringToBuffer(serializedString) { // Fill the string into a ArrayBuffer. var bufferLength = serializedString.length * 0.75; var len = serializedString.length; var i; var p = 0; var encoded1, encoded2, encoded3, encoded4; if (serializedString[serializedString.length - 1] === '=') { bufferLength--; if (serializedString[serializedString.length - 2] === '=') { bufferLength--; } } var buffer = new ArrayBuffer(bufferLength); var bytes = new Uint8Array(buffer); for (i = 0; i < len; i += 4) { encoded1 = BASE_CHARS.indexOf(serializedString[i]); encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]); encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]); encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]); /*jslint bitwise: true */ bytes[p++] = encoded1 << 2 | encoded2 >> 4; bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2; bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; } return buffer; } // Converts a buffer to a string to store, serialized, in the backend // storage library. function bufferToString(buffer) { // base64-arraybuffer var bytes = new Uint8Array(buffer); var base64String = ''; var i; for (i = 0; i < bytes.length; i += 3) { /*jslint bitwise: true */ base64String += BASE_CHARS[bytes[i] >> 2]; base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4]; base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6]; base64String += BASE_CHARS[bytes[i + 2] & 63]; } if (bytes.length % 3 === 2) { base64String = base64String.substring(0, base64String.length - 1) + '='; } else if (bytes.length % 3 === 1) { base64String = base64String.substring(0, base64String.length - 2) + '=='; } return base64String; } // Serialize a value, afterwards executing a callback (which usually // instructs the `setItem()` callback/promise to be executed). This is how // we store binary data with localStorage. function serialize(value, callback) { var valueType = ''; if (value) { valueType = toString$1.call(value); } // Cannot use `value instanceof ArrayBuffer` or such here, as these // checks fail when running the tests using casper.js... // // TODO: See why those tests fail and use a better solution. if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) { // Convert binary arrays to a string and prefix the string with // a special marker. var buffer; var marker = SERIALIZED_MARKER; if (value instanceof ArrayBuffer) { buffer = value; marker += TYPE_ARRAYBUFFER; } else { buffer = value.buffer; if (valueType === '[object Int8Array]') { marker += TYPE_INT8ARRAY; } else if (valueType === '[object Uint8Array]') { marker += TYPE_UINT8ARRAY; } else if (valueType === '[object Uint8ClampedArray]') { marker += TYPE_UINT8CLAMPEDARRAY; } else if (valueType === '[object Int16Array]') { marker += TYPE_INT16ARRAY; } else if (valueType === '[object Uint16Array]') { marker += TYPE_UINT16ARRAY; } else if (valueType === '[object Int32Array]') { marker += TYPE_INT32ARRAY; } else if (valueType === '[object Uint32Array]') { marker += TYPE_UINT32ARRAY; } else if (valueType === '[object Float32Array]') { marker += TYPE_FLOAT32ARRAY; } else if (valueType === '[object Float64Array]') { marker += TYPE_FLOAT64ARRAY; } else { callback(new Error('Failed to get type for BinaryArray')); } } callback(marker + bufferToString(buffer)); } else if (valueType === '[object Blob]') { // Conver the blob to a binaryArray and then to a string. var fileReader = new FileReader(); fileReader.onload = function () { // Backwards-compatible prefix for the blob type. var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result); callback(SERIALIZED_MARKER + TYPE_BLOB + str); }; fileReader.readAsArrayBuffer(value); } else { try { callback(JSON.stringify(value)); } catch (e) { console.error("Couldn't convert value into a JSON string: ", value); callback(null, e); } } } // Deserialize data we've inserted into a value column/field. We place // special markers into our strings to mark them as encoded; this isn't // as nice as a meta field, but it's the only sane thing we can do whilst // keeping localStorage support intact. // // Oftentimes this will just deserialize JSON content, but if we have a // special marker (SERIALIZED_MARKER, defined above), we will extract // some kind of arraybuffer/binary data/typed array out of the string. function deserialize(value) { // If we haven't marked this string as being specially serialized (i.e. // something other than serialized JSON), we can just return it and be // done with it. if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) { return JSON.parse(value); } // The following code deals with deserializing some kind of Blob or // TypedArray. First we separate out the type of data we're dealing // with from the data itself. var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH); var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH); var blobType; // Backwards-compatible blob type serialization strategy. // DBs created with older versions of localForage will simply not have the blob type. if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) { var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX); blobType = matcher[1]; serializedString = serializedString.substring(matcher[0].length); } var buffer = stringToBuffer(serializedString); // Return the right type based on the code/type set during // serialization. switch (type) { case TYPE_ARRAYBUFFER: return buffer; case TYPE_BLOB: return createBlob([buffer], { type: blobType }); case TYPE_INT8ARRAY: return new Int8Array(buffer); case TYPE_UINT8ARRAY: return new Uint8Array(buffer); case TYPE_UINT8CLAMPEDARRAY: return new Uint8ClampedArray(buffer); case TYPE_INT16ARRAY: return new Int16Array(buffer); case TYPE_UINT16ARRAY: return new Uint16Array(buffer); case TYPE_INT32ARRAY: return new Int32Array(buffer); case TYPE_UINT32ARRAY: return new Uint32Array(buffer); case TYPE_FLOAT32ARRAY: return new Float32Array(buffer); case TYPE_FLOAT64ARRAY: return new Float64Array(buffer); default: throw new Error('Unkown type: ' + type); } } var localforageSerializer = { serialize: serialize, deserialize: deserialize, stringToBuffer: stringToBuffer, bufferToString: bufferToString }; /* * Includes code from: * * base64-arraybuffer * https://github.com/niklasvh/base64-arraybuffer * * Copyright (c) 2012 Niklas von Hertzen * Licensed under the MIT license. */ function createDbTable(t, dbInfo, callback, errorCallback) { t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback); } // Open the WebSQL database (automatically creates one if one didn't // previously exist), using any options set in the config. function _initStorage$1(options) { var self = this; var dbInfo = { db: null }; if (options) { for (var i in options) { dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i]; } } var dbInfoPromise = new Promise$1(function (resolve, reject) { // Open the database; the openDatabase API will automatically // create it for us if it doesn't exist. try { dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size); } catch (e) { return reject(e); } // Create our key/value table if it doesn't exist. dbInfo.db.transaction(function (t) { createDbTable(t, dbInfo, function () { self._dbInfo = dbInfo; resolve(); }, function (t, error) { reject(error); }); }, reject); }); dbInfo.serializer = localforageSerializer; return dbInfoPromise; } function tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) { t.executeSql(sqlStatement, args, callback, function (t, error) { if (error.code === error.SYNTAX_ERR) { t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name = ?", [dbInfo.storeName], function (t, results) { if (!results.rows.length) { // if the table is missing (was deleted) // re-create it table and retry createDbTable(t, dbInfo, function () { t.executeSql(sqlStatement, args, callback, errorCallback); }, errorCallback); } else { errorCallback(t, error); } }, errorCallback); } else { errorCallback(t, error); } }, errorCallback); } function getItem$1(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) { var result = results.rows.length ? results.rows.item(0).value : null; // Check to see if this is serialized content we need to // unpack. if (result) { result = dbInfo.serializer.deserialize(result); } resolve(result); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function iterate$1(iterator, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) { var rows = results.rows; var length = rows.length; for (var i = 0; i < length; i++) { var item = rows.item(i); var result = item.value; // Check to see if this is serialized content // we need to unpack. if (result) { result = dbInfo.serializer.deserialize(result); } result = iterator(result, item.key, i + 1); // void(0) prevents problems with redefinition // of `undefined`. if (result !== void 0) { resolve(result); return; } } resolve(); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function _setItem(key, value, callback, retriesLeft) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { // The localStorage API doesn't return undefined values in an // "expected" way, so undefined is always cast to null in all // drivers. See: https://github.com/mozilla/localForage/pull/42 if (value === undefined) { value = null; } // Save the original value to pass to the callback. var originalValue = value; var dbInfo = self._dbInfo; dbInfo.serializer.serialize(value, function (value, error) { if (error) { reject(error); } else { dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () { resolve(originalValue); }, function (t, error) { reject(error); }); }, function (sqlError) { // The transaction failed; check // to see if it's a quota error. if (sqlError.code === sqlError.QUOTA_ERR) { // We reject the callback outright for now, but // it's worth trying to re-run the transaction. // Even if the user accepts the prompt to use // more storage on Safari, this error will // be called. // // Try to re-run the transaction. if (retriesLeft > 0) { resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1])); return; } reject(sqlError); } }); } }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function setItem$1(key, value, callback) { return _setItem.apply(this, [key, value, callback, 1]); } function removeItem$1(key, callback) { var self = this; key = normalizeKey(key); var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () { resolve(); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Deletes every item in the table. // TODO: Find out if this resets the AUTO_INCREMENT number. function clear$1(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () { resolve(); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Does a simple `COUNT(key)` to get the number of items stored in // localForage. function length$1(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { // Ahhh, SQL makes this one soooooo easy. tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) { var result = results.rows.item(0).c; resolve(result); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // Return the key located at key index X; essentially gets the key from a // `WHERE id = ?`. This is the most efficient way I can think to implement // this rarely-used (in my experience) part of the API, but it can seem // inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so // the ID of each key will change every time it's updated. Perhaps a stored // procedure for the `setItem()` SQL would solve this problem? // TODO: Don't change ID on `setItem()`. function key$1(n, callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) { var result = results.rows.length ? results.rows.item(0).key : null; resolve(result); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } function keys$1(callback) { var self = this; var promise = new Promise$1(function (resolve, reject) { self.ready().then(function () { var dbInfo = self._dbInfo; dbInfo.db.transaction(function (t) { tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) { var keys = []; for (var i = 0; i < results.rows.length; i++) { keys.push(results.rows.item(i).key); } resolve(keys); }, function (t, error) { reject(error); }); }); })["catch"](reject); }); executeCallback(promise, callback); return promise; } // https://www.w3.org/TR/webdatabase/#databases // > There is no way to enumerate or delete the databases available for an origin from this API. function getAllStoreNames(db) { return new Promise$1(function (resolve, reject) { db.transaction(function (t) { t.executeSql('SELECT name FROM sqlite_master ' + "WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function (t, results) { var storeNames = []; for (var i = 0; i < results.rows.length; i++) { storeNames.push(results.rows.item(i).name); } resolve({ db: db, storeNames: storeNames }); }, function (t, error) { reject(error); }); }, function (sqlError) { reject(sqlError); }); }); } function dropInstance$1(options, callback) { callback = getCallback.apply(this, arguments); var currentConfig = this.config(); options = typeof options !== 'function' && options || {}; if (!options.name) { options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self = this; var promise; if (!options.name) { promise = Promise$1.reject('Invalid arguments'); } else { promise = new Promise$1(function (resolve) { var db; if (options.name === currentConfig.name) { // use the db reference of the current instance db = self._dbInfo.db; } else { db = openDatabase(options.name, '', '', 0); } if (!options.storeName) { // drop all database tables resolve(getAllStoreNames(db)); } else { resolve({ db: db, storeNames: [options.storeName] }); } }).then(function (operationInfo) { return new Promise$1(function (resolve, reject) { operationInfo.db.transaction(function (t) { function dropTable(storeName) { return new Promise$1(function (resolve, reject) { t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () { resolve(); }, function (t, error) { reject(error); }); }); } var operations = []; for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) { operations.push(dropTable(operationInfo.storeNames[i])); } Promise$1.all(operations).then(function () { resolve(); })["catch"](function (e) { reject(e); }); }, function (sqlError) { reject(sqlError); }); }); }); } executeCallback(promise, callback); return promise; } var webSQLStorage = { _driver: 'webSQLStorage', _initStorage: _initStorage$1, _support: isWebSQLValid(), iterate: iterate$1, getItem: getItem$1, setItem: setItem$1, removeItem: removeItem$1, clear: clear$1, length: length$1, key: key$1, keys: keys$1, dropInstance: dropInstance$1 }; function isLocalStorageValid() { try { return typeof localStorage !== 'undefined' && 'setItem' in localStorage && // in IE8 typeof localStorage.setItem === 'object' !!localStorage.setItem; } catch (e) { return false; } } function _getKeyPrefix(options, defaultConfig) { var keyPrefix = options.name + '/'; if (options.storeName !== defaultConfig.storeName) { keyPrefix += options.storeName + '/'; } return keyPrefix; } // Check if localStorage throws when saving an item function checkIfLocalStorageThrows() { var localStorageTestKey = '_localforage_support_test'; try { localStorage.setItem(localStorageTestKey, true); localStorage.removeItem(localStorageTestKey); return false; } catch (e) { return true; } } // Check if localStorage is usable and allows to save an item // This method checks if localStorage is usable in Safari Private Browsing // mode, or in any other case where the available quota for localStorage // is 0 and there wasn't any saved items yet. function _isLocalStorageUsable() { return !checkIfLocalStorageThrows() || localStorage.length > 0; } // Config the localStorage backend, using options set in the config. function _initStorage$2(options) { var self = this; var dbInfo = {}; if (options) { for (var i in options) { dbInfo[i] = options[i]; } } dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig); if (!_isLocalStorageUsable()) { return Promise$1.reject(); } self._dbInfo = dbInfo; dbInfo.serializer = localforageSerializer; return Promise$1.resolve(); } // Remove all keys from the datastore, effectively destroying all data in // the app's key/value store! function clear$2(callback) { var self = this; var promise = self.ready().then(function () { var keyPrefix = self._dbInfo.keyPrefix; for (var i = localStorage.length - 1; i >= 0; i--) { var key = localStorage.key(i); if (key.indexOf(keyPrefix) === 0) { localStorage.removeItem(key); } } }); executeCallback(promise, callback); return promise; } // Retrieve an item from the store. Unlike the original async_storage // library in Gaia, we don't modify return values at all. If a key's value // is `undefined`, we pass that value to the callback function. function getItem$2(key, callback) { var self = this; key = normalizeKey(key); var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var result = localStorage.getItem(dbInfo.keyPrefix + key); // If a result was found, parse it from the serialized // string into a JS object. If result isn't truthy, the key // is likely undefined and we'll pass it straight to the // callback. if (result) { result = dbInfo.serializer.deserialize(result); } return result; }); executeCallback(promise, callback); return promise; } // Iterate over all items in the store. function iterate$2(iterator, callback) { var self = this; var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var keyPrefix = dbInfo.keyPrefix; var keyPrefixLength = keyPrefix.length; var length = localStorage.length; // We use a dedicated iterator instead of the `i` variable below // so other keys we fetch in localStorage aren't counted in // the `iterationNumber` argument passed to the `iterate()` // callback. // // See: github.com/mozilla/localForage/pull/435#discussion_r38061530 var iterationNumber = 1; for (var i = 0; i < length; i++) { var key = localStorage.key(i); if (key.indexOf(keyPrefix) !== 0) { continue; } var value = localStorage.getItem(key); // If a result was found, parse it from the serialized // string into a JS object. If result isn't truthy, the // key is likely undefined and we'll pass it straight // to the iterator. if (value) { value = dbInfo.serializer.deserialize(value); } value = iterator(value, key.substring(keyPrefixLength), iterationNumber++); if (value !== void 0) { return value; } } }); executeCallback(promise, callback); return promise; } // Same as localStorage's key() method, except takes a callback. function key$2(n, callback) { var self = this; var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var result; try { result = localStorage.key(n); } catch (error) { result = null; } // Remove the prefix from the key, if a key is found. if (result) { result = result.substring(dbInfo.keyPrefix.length); } return result; }); executeCallback(promise, callback); return promise; } function keys$2(callback) { var self = this; var promise = self.ready().then(function () { var dbInfo = self._dbInfo; var length = localStorage.length; var keys = []; for (var i = 0; i < length; i++) { var itemKey = localStorage.key(i); if (itemKey.indexOf(dbInfo.keyPrefix) === 0) { keys.push(itemKey.substring(dbInfo.keyPrefix.length)); } } return keys; }); executeCallback(promise, callback); return promise; } // Supply the number of keys in the datastore to the callback function. function length$2(callback) { var self = this; var promise = self.keys().then(function (keys) { return keys.length; }); executeCallback(promise, callback); return promise; } // Remove an item from the store, nice and simple. function removeItem$2(key, callback) { var self = this; key = normalizeKey(key); var promise = self.ready().then(function () { var dbInfo = self._dbInfo; localStorage.removeItem(dbInfo.keyPrefix + key); }); executeCallback(promise, callback); return promise; } // Set a key's value and run an optional callback once the value is set. // Unlike Gaia's implementation, the callback function is passed the value, // in case you want to operate on that value only after you're sure it // saved, or something like that. function setItem$2(key, value, callback) { var self = this; key = normalizeKey(key); var promise = self.ready().then(function () { // Convert undefined values to null. // https://github.com/mozilla/localForage/pull/42 if (value === undefined) { value = null; } // Save the original value to pass to the callback. var originalValue = value; return new Promise$1(function (resolve, reject) { var dbInfo = self._dbInfo; dbInfo.serializer.serialize(value, function (value, error) { if (error) { reject(error); } else { try { localStorage.setItem(dbInfo.keyPrefix + key, value); resolve(originalValue); } catch (e) { // localStorage capacity exceeded. // TODO: Make this a specific error/event. if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') { reject(e); } reject(e); } } }); }); }); executeCallback(promise, callback); return promise; } function dropInstance$2(options, callback) { callback = getCallback.apply(this, arguments); options = typeof options !== 'function' && options || {}; if (!options.name) { var currentConfig = this.config(); options.name = options.name || currentConfig.name; options.storeName = options.storeName || currentConfig.storeName; } var self = this; var promise; if (!options.name) { promise = Promise$1.reject('Invalid arguments'); } else { promise = new Promise$1(function (resolve) { if (!options.storeName) { resolve(options.name + '/'); } else { resolve(_getKeyPrefix(options, self._defaultConfig)); } }).then(function (keyPrefix) { for (var i = localStorage.length - 1; i >= 0; i--) { var key = localStorage.key(i); if (key.indexOf(keyPrefix) === 0) { localStorage.removeItem(key); } } }); } executeCallback(promise, callback); return promise; } var localStorageWrapper = { _driver: 'localStorageWrapper', _initStorage: _initStorage$2, _support: isLocalStorageValid(), iterate: iterate$2, getItem: getItem$2, setItem: setItem$2, removeItem: removeItem$2, clear: clear$2, length: length$2, key: key$2, keys: keys$2, dropInstance: dropInstance$2 }; var sameValue = function sameValue(x, y) { return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); }; var includes = function includes(array, searchElement) { var len = array.length; var i = 0; while (i < len) { if (sameValue(array[i], searchElement)) { return true; } i++; } return false; }; var isArray = Array.isArray || function (arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; // Drivers are stored here when `defineDriver()` is called. // They are shared across all instances of localForage. var DefinedDrivers = {}; var DriverSupport = {}; var DefaultDrivers = { INDEXEDDB: asyncStorage, WEBSQL: webSQLStorage, LOCALSTORAGE: localStorageWrapper }; var DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver]; var OptionalDriverMethods = ['dropInstance']; var LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods); var DefaultConfig = { description: '', driver: DefaultDriverOrder.slice(), name: 'localforage', // Default DB size is _JUST UNDER_ 5MB, as it's the highest size // we can use without a prompt. size: 4980736, storeName: 'keyvaluepairs', version: 1.0 }; function callWhenReady(localForageInstance, libraryMethod) { localForageInstance[libraryMethod] = function () { var _args = arguments; return localForageInstance.ready().then(function () { return localForageInstance[libraryMethod].apply(localForageInstance, _args); }); }; } function extend() { for (var i = 1; i < arguments.length; i++) { var arg = arguments[i]; if (arg) { for (var _key in arg) { if (arg.hasOwnProperty(_key)) { if (isArray(arg[_key])) { arguments[0][_key] = arg[_key].slice(); } else { arguments[0][_key] = arg[_key]; } } } } } return arguments[0]; } var LocalForage = function () { function LocalForage(options) { _classCallCheck(this, LocalForage); for (var driverTypeKey in DefaultDrivers) { if (DefaultDrivers.hasOwnProperty(driverTypeKey)) { var driver = DefaultDrivers[driverTypeKey]; var driverName = driver._driver; this[driverTypeKey] = driverName; if (!DefinedDrivers[driverName]) { // we don't need to wait for the promise, // since the default drivers can be defined // in a blocking manner this.defineDriver(driver); } } } this._defaultConfig = extend({}, DefaultConfig); this._config = extend({}, this._defaultConfig, options); this._driverSet = null; this._initDriver = null; this._ready = false; this._dbInfo = null; this._wrapLibraryMethodsWithReady(); this.setDriver(this._config.driver)["catch"](function () {}); } // Set any config values for localForage; can be called anytime before // the first API call (e.g. `getItem`, `setItem`). // We loop through options so we don't overwrite existing config // values. LocalForage.prototype.config = function config(options) { // If the options argument is an object, we use it to set values. // Otherwise, we return either a specified config value or all // config values. if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') { // If localforage is ready and fully initialized, we can't set // any new configuration values. Instead, we return an error. if (this._ready) { return new Error("Can't call config() after localforage " + 'has been used.'); } for (var i in options) { if (i === 'storeName') { options[i] = options[i].replace(/\W/g, '_'); } if (i === 'version' && typeof options[i] !== 'number') { return new Error('Database version must be a number.'); } this._config[i] = options[i]; } // after all config options are set and // the driver option is used, try setting it if ('driver' in options && options.driver) { return this.setDriver(this._config.driver); } return true; } else if (typeof options === 'string') { return this._config[options]; } else { return this._config; } }; // Used to define a custom driver, shared across all instances of // localForage. LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) { var promise = new Promise$1(function (resolve, reject) { try { var driverName = driverObject._driver; var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver'); // A driver name should be defined and not overlap with the // library-defined, default drivers. if (!driverObject._driver) { reject(complianceError); return; } var driverMethods = LibraryMethods.concat('_initStorage'); for (var i = 0, len = driverMethods.length; i < len; i++) { var driverMethodName = driverMethods[i]; // when the property is there, // it should be a method even when optional var isRequired = !includes(OptionalDriverMethods, driverMethodName); if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') { reject(complianceError); return; } } var configureMissingMethods = function configureMissingMethods() { var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) { return function () { var error = new Error('Method ' + methodName + ' is not implemented by the current driver'); var promise = Promise$1.reject(error); executeCallback(promise, arguments[arguments.length - 1]); return promise; }; }; for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) { var optionalDriverMethod = OptionalDriverMethods[_i]; if (!driverObject[optionalDriverMethod]) { driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod); } } }; configureMissingMethods(); var setDriverSupport = function setDriverSupport(support) { if (DefinedDrivers[driverName]) { console.info('Redefining LocalForage driver: ' + driverName); } DefinedDrivers[driverName] = driverObject; DriverSupport[driverName] = support; // don't use a then, so that we can define // drivers that have simple _support methods // in a blocking manner resolve(); }; if ('_support' in driverObject) { if (driverObject._support && typeof driverObject._support === 'function') { driverObject._support().then(setDriverSupport, reject); } else { setDriverSupport(!!driverObject._support); } } else { setDriverSupport(true); } } catch (e) { reject(e); } }); executeTwoCallbacks(promise, callback, errorCallback); return promise; }; LocalForage.prototype.driver = function driver() { return this._driver || null; }; LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) { var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.')); executeTwoCallbacks(getDriverPromise, callback, errorCallback); return getDriverPromise; }; LocalForage.prototype.getSerializer = function getSerializer(callback) { var serializerPromise = Promise$1.resolve(localforageSerializer); executeTwoCallbacks(serializerPromise, callback); return serializerPromise; }; LocalForage.prototype.ready = function ready(callback) { var self = this; var promise = self._driverSet.then(function () { if (self._ready === null) { self._ready = self._initDriver(); } return self._ready; }); executeTwoCallbacks(promise, callback, callback); return promise; }; LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) { var self = this; if (!isArray(drivers)) { drivers = [drivers]; } var supportedDrivers = this._getSupportedDrivers(drivers); function setDriverToConfig() { self._config.driver = self.driver(); } function extendSelfWithDriver(driver) { self._extend(driver); setDriverToConfig(); self._ready = self._initStorage(self._config); return self._ready; } function initDriver(supportedDrivers) { return function () { var currentDriverIndex = 0; function driverPromiseLoop() { while (currentDriverIndex < supportedDrivers.length) { var driverName = supportedDrivers[currentDriverIndex]; currentDriverIndex++; self._dbInfo = null; self._ready = null; return self.getDriver(driverName).then(extendSelfWithDriver)["catch"](driverPromiseLoop); } setDriverToConfig(); var error = new Error('No available storage method found.'); self._driverSet = Promise$1.reject(error); return self._driverSet; } return driverPromiseLoop(); }; } // There might be a driver initialization in progress // so wait for it to finish in order to avoid a possible // race condition to set _dbInfo var oldDriverSetDone = this._driverSet !== null ? this._driverSet["catch"](function () { return Promise$1.resolve(); }) : Promise$1.resolve(); this._driverSet = oldDriverSetDone.then(function () { var driverName = supportedDrivers[0]; self._dbInfo = null; self._ready = null; return self.getDriver(driverName).then(function (driver) { self._driver = driver._driver; setDriverToConfig(); self._wrapLibraryMethodsWithReady(); self._initDriver = initDriver(supportedDrivers); }); })["catch"](function () { setDriverToConfig(); var error = new Error('No available storage method found.'); self._driverSet = Promise$1.reject(error); return self._driverSet; }); executeTwoCallbacks(this._driverSet, callback, errorCallback); return this._driverSet; }; LocalForage.prototype.supports = function supports(driverName) { return !!DriverSupport[driverName]; }; LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) { extend(this, libraryMethodsAndProperties); }; LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) { var supportedDrivers = []; for (var i = 0, len = drivers.length; i < len; i++) { var driverName = drivers[i]; if (this.supports(driverName)) { supportedDrivers.push(driverName); } } return supportedDrivers; }; LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() { // Add a stub for each driver API method that delays the call to the // corresponding driver method until localForage is ready. These stubs // will be replaced by the driver methods as soon as the driver is // loaded, so there is no performance impact. for (var i = 0, len = LibraryMethods.length; i < len; i++) { callWhenReady(this, LibraryMethods[i]); } }; LocalForage.prototype.createInstance = function createInstance(options) { return new LocalForage(options); }; return LocalForage; }(); // The actual localForage object that we expose as a module or via a // global. It's extended by pulling in one of our other libraries. var localforage_js = new LocalForage(); module.exports = localforage_js; },{"3":3}]},{},[4])(4) }); ;/*! showdown v 1.9.1 - 02-11-2019 */ (function(){ /** * Created by Tivie on 13-07-2015. */ function getDefaultOpts (simple) { 'use strict'; var defaultOptions = { omitExtraWLInCodeBlocks: { defaultValue: false, describe: 'Omit the default extra whiteline added to code blocks', type: 'boolean' }, noHeaderId: { defaultValue: false, describe: 'Turn on/off generated header id', type: 'boolean' }, prefixHeaderId: { defaultValue: false, describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \'section-\' prefix', type: 'string' }, rawPrefixHeaderId: { defaultValue: false, describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)', type: 'boolean' }, ghCompatibleHeaderId: { defaultValue: false, describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)', type: 'boolean' }, rawHeaderId: { defaultValue: false, describe: 'Remove only spaces, \' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids', type: 'boolean' }, headerLevelStart: { defaultValue: false, describe: 'The header blocks level start', type: 'integer' }, parseImgDimensions: { defaultValue: false, describe: 'Turn on/off image dimension parsing', type: 'boolean' }, simplifiedAutoLink: { defaultValue: false, describe: 'Turn on/off GFM autolink style', type: 'boolean' }, excludeTrailingPunctuationFromURLs: { defaultValue: false, describe: 'Excludes trailing punctuation from links generated with autoLinking', type: 'boolean' }, literalMidWordUnderscores: { defaultValue: false, describe: 'Parse midword underscores as literal underscores', type: 'boolean' }, literalMidWordAsterisks: { defaultValue: false, describe: 'Parse midword asterisks as literal asterisks', type: 'boolean' }, strikethrough: { defaultValue: false, describe: 'Turn on/off strikethrough support', type: 'boolean' }, tables: { defaultValue: false, describe: 'Turn on/off tables support', type: 'boolean' }, tablesHeaderId: { defaultValue: false, describe: 'Add an id to table headers', type: 'boolean' }, ghCodeBlocks: { defaultValue: true, describe: 'Turn on/off GFM fenced code blocks support', type: 'boolean' }, tasklists: { defaultValue: false, describe: 'Turn on/off GFM tasklist support', type: 'boolean' }, smoothLivePreview: { defaultValue: false, describe: 'Prevents weird effects in live previews due to incomplete input', type: 'boolean' }, smartIndentationFix: { defaultValue: false, description: 'Tries to smartly fix indentation in es6 strings', type: 'boolean' }, disableForced4SpacesIndentedSublists: { defaultValue: false, description: 'Disables the requirement of indenting nested sublists by 4 spaces', type: 'boolean' }, simpleLineBreaks: { defaultValue: false, description: 'Parses simple line breaks as
(GFM Style)', type: 'boolean' }, requireSpaceBeforeHeadingText: { defaultValue: false, description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)', type: 'boolean' }, ghMentions: { defaultValue: false, description: 'Enables github @mentions', type: 'boolean' }, ghMentionsLink: { defaultValue: 'https://github.com/{u}', description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.', type: 'string' }, encodeEmails: { defaultValue: true, description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities', type: 'boolean' }, openLinksInNewWindow: { defaultValue: false, description: 'Open all links in new windows', type: 'boolean' }, backslashEscapesHTMLTags: { defaultValue: false, description: 'Support for HTML Tag escaping. ex: \
foo\
', type: 'boolean' }, emoji: { defaultValue: false, description: 'Enable emoji support. Ex: `this is a :smile: emoji`', type: 'boolean' }, underline: { defaultValue: false, description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``', type: 'boolean' }, completeHTMLDocument: { defaultValue: false, description: 'Outputs a complete html document, including ``, `` and `` tags', type: 'boolean' }, metadata: { defaultValue: false, description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).', type: 'boolean' }, splitAdjacentBlockquotes: { defaultValue: false, description: 'Split adjacent blockquote blocks', type: 'boolean' } }; if (simple === false) { return JSON.parse(JSON.stringify(defaultOptions)); } var ret = {}; for (var opt in defaultOptions) { if (defaultOptions.hasOwnProperty(opt)) { ret[opt] = defaultOptions[opt].defaultValue; } } return ret; } function allOptionsOn () { 'use strict'; var options = getDefaultOpts(true), ret = {}; for (var opt in options) { if (options.hasOwnProperty(opt)) { ret[opt] = true; } } return ret; } /** * Created by Tivie on 06-01-2015. */ // Private properties var showdown = {}, parsers = {}, extensions = {}, globalOptions = getDefaultOpts(true), setFlavor = 'vanilla', flavor = { github: { omitExtraWLInCodeBlocks: true, simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true, literalMidWordUnderscores: true, strikethrough: true, tables: true, tablesHeaderId: true, ghCodeBlocks: true, tasklists: true, disableForced4SpacesIndentedSublists: true, simpleLineBreaks: true, requireSpaceBeforeHeadingText: true, ghCompatibleHeaderId: true, ghMentions: true, backslashEscapesHTMLTags: true, emoji: true, splitAdjacentBlockquotes: true }, original: { noHeaderId: true, ghCodeBlocks: false }, ghost: { omitExtraWLInCodeBlocks: true, parseImgDimensions: true, simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true, literalMidWordUnderscores: true, strikethrough: true, tables: true, tablesHeaderId: true, ghCodeBlocks: true, tasklists: true, smoothLivePreview: true, simpleLineBreaks: true, requireSpaceBeforeHeadingText: true, ghMentions: false, encodeEmails: true }, vanilla: getDefaultOpts(true), allOn: allOptionsOn() }; /** * helper namespace * @type {{}} */ showdown.helper = {}; /** * TODO LEGACY SUPPORT CODE * @type {{}} */ showdown.extensions = {}; /** * Set a global option * @static * @param {string} key * @param {*} value * @returns {showdown} */ showdown.setOption = function (key, value) { 'use strict'; globalOptions[key] = value; return this; }; /** * Get a global option * @static * @param {string} key * @returns {*} */ showdown.getOption = function (key) { 'use strict'; return globalOptions[key]; }; /** * Get the global options * @static * @returns {{}} */ showdown.getOptions = function () { 'use strict'; return globalOptions; }; /** * Reset global options to the default values * @static */ showdown.resetOptions = function () { 'use strict'; globalOptions = getDefaultOpts(true); }; /** * Set the flavor showdown should use as default * @param {string} name */ showdown.setFlavor = function (name) { 'use strict'; if (!flavor.hasOwnProperty(name)) { throw Error(name + ' flavor was not found'); } showdown.resetOptions(); var preset = flavor[name]; setFlavor = name; for (var option in preset) { if (preset.hasOwnProperty(option)) { globalOptions[option] = preset[option]; } } }; /** * Get the currently set flavor * @returns {string} */ showdown.getFlavor = function () { 'use strict'; return setFlavor; }; /** * Get the options of a specified flavor. Returns undefined if the flavor was not found * @param {string} name Name of the flavor * @returns {{}|undefined} */ showdown.getFlavorOptions = function (name) { 'use strict'; if (flavor.hasOwnProperty(name)) { return flavor[name]; } }; /** * Get the default options * @static * @param {boolean} [simple=true] * @returns {{}} */ showdown.getDefaultOptions = function (simple) { 'use strict'; return getDefaultOpts(simple); }; /** * Get or set a subParser * * subParser(name) - Get a registered subParser * subParser(name, func) - Register a subParser * @static * @param {string} name * @param {function} [func] * @returns {*} */ showdown.subParser = function (name, func) { 'use strict'; if (showdown.helper.isString(name)) { if (typeof func !== 'undefined') { parsers[name] = func; } else { if (parsers.hasOwnProperty(name)) { return parsers[name]; } else { throw Error('SubParser named ' + name + ' not registered!'); } } } }; /** * Gets or registers an extension * @static * @param {string} name * @param {object|function=} ext * @returns {*} */ showdown.extension = function (name, ext) { 'use strict'; if (!showdown.helper.isString(name)) { throw Error('Extension \'name\' must be a string'); } name = showdown.helper.stdExtName(name); // Getter if (showdown.helper.isUndefined(ext)) { if (!extensions.hasOwnProperty(name)) { throw Error('Extension named ' + name + ' is not registered!'); } return extensions[name]; // Setter } else { // Expand extension if it's wrapped in a function if (typeof ext === 'function') { ext = ext(); } // Ensure extension is an array if (!showdown.helper.isArray(ext)) { ext = [ext]; } var validExtension = validate(ext, name); if (validExtension.valid) { extensions[name] = ext; } else { throw Error(validExtension.error); } } }; /** * Gets all extensions registered * @returns {{}} */ showdown.getAllExtensions = function () { 'use strict'; return extensions; }; /** * Remove an extension * @param {string} name */ showdown.removeExtension = function (name) { 'use strict'; delete extensions[name]; }; /** * Removes all extensions */ showdown.resetExtensions = function () { 'use strict'; extensions = {}; }; /** * Validate extension * @param {array} extension * @param {string} name * @returns {{valid: boolean, error: string}} */ function validate (extension, name) { 'use strict'; var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension', ret = { valid: true, error: '' }; if (!showdown.helper.isArray(extension)) { extension = [extension]; } for (var i = 0; i < extension.length; ++i) { var baseMsg = errMsg + ' sub-extension ' + i + ': ', ext = extension[i]; if (typeof ext !== 'object') { ret.valid = false; ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given'; return ret; } if (!showdown.helper.isString(ext.type)) { ret.valid = false; ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given'; return ret; } var type = ext.type = ext.type.toLowerCase(); // normalize extension type if (type === 'language') { type = ext.type = 'lang'; } if (type === 'html') { type = ext.type = 'output'; } if (type !== 'lang' && type !== 'output' && type !== 'listener') { ret.valid = false; ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"'; return ret; } if (type === 'listener') { if (showdown.helper.isUndefined(ext.listeners)) { ret.valid = false; ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"'; return ret; } } else { if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) { ret.valid = false; ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method'; return ret; } } if (ext.listeners) { if (typeof ext.listeners !== 'object') { ret.valid = false; ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + ' given'; return ret; } for (var ln in ext.listeners) { if (ext.listeners.hasOwnProperty(ln)) { if (typeof ext.listeners[ln] !== 'function') { ret.valid = false; ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln + ' must be a function but ' + typeof ext.listeners[ln] + ' given'; return ret; } } } } if (ext.filter) { if (typeof ext.filter !== 'function') { ret.valid = false; ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + ' given'; return ret; } } else if (ext.regex) { if (showdown.helper.isString(ext.regex)) { ext.regex = new RegExp(ext.regex, 'g'); } if (!(ext.regex instanceof RegExp)) { ret.valid = false; ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given'; return ret; } if (showdown.helper.isUndefined(ext.replace)) { ret.valid = false; ret.error = baseMsg + '"regex" extensions must implement a replace string or function'; return ret; } } } return ret; } /** * Validate extension * @param {object} ext * @returns {boolean} */ showdown.validateExtension = function (ext) { 'use strict'; var validateExtension = validate(ext, null); if (!validateExtension.valid) { console.warn(validateExtension.error); return false; } return true; }; /** * showdownjs helper functions */ if (!showdown.hasOwnProperty('helper')) { showdown.helper = {}; } /** * Check if var is string * @static * @param {string} a * @returns {boolean} */ showdown.helper.isString = function (a) { 'use strict'; return (typeof a === 'string' || a instanceof String); }; /** * Check if var is a function * @static * @param {*} a * @returns {boolean} */ showdown.helper.isFunction = function (a) { 'use strict'; var getType = {}; return a && getType.toString.call(a) === '[object Function]'; }; /** * isArray helper function * @static * @param {*} a * @returns {boolean} */ showdown.helper.isArray = function (a) { 'use strict'; return Array.isArray(a); }; /** * Check if value is undefined * @static * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. */ showdown.helper.isUndefined = function (value) { 'use strict'; return typeof value === 'undefined'; }; /** * ForEach helper function * Iterates over Arrays and Objects (own properties only) * @static * @param {*} obj * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object */ showdown.helper.forEach = function (obj, callback) { 'use strict'; // check if obj is defined if (showdown.helper.isUndefined(obj)) { throw new Error('obj param is required'); } if (showdown.helper.isUndefined(callback)) { throw new Error('callback param is required'); } if (!showdown.helper.isFunction(callback)) { throw new Error('callback param must be a function/closure'); } if (typeof obj.forEach === 'function') { obj.forEach(callback); } else if (showdown.helper.isArray(obj)) { for (var i = 0; i < obj.length; i++) { callback(obj[i], i, obj); } } else if (typeof (obj) === 'object') { for (var prop in obj) { if (obj.hasOwnProperty(prop)) { callback(obj[prop], prop, obj); } } } else { throw new Error('obj does not seem to be an array or an iterable object'); } }; /** * Standardidize extension name * @static * @param {string} s extension name * @returns {string} */ showdown.helper.stdExtName = function (s) { 'use strict'; return s.replace(/[_?*+\/\\.^-]/g, '').replace(/\s/g, '').toLowerCase(); }; function escapeCharactersCallback (wholeMatch, m1) { 'use strict'; var charCodeToEscape = m1.charCodeAt(0); return '¨E' + charCodeToEscape + 'E'; } /** * Callback used to escape characters when passing through String.replace * @static * @param {string} wholeMatch * @param {string} m1 * @returns {string} */ showdown.helper.escapeCharactersCallback = escapeCharactersCallback; /** * Escape characters in a string * @static * @param {string} text * @param {string} charsToEscape * @param {boolean} afterBackslash * @returns {XML|string|void|*} */ showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) { 'use strict'; // First we have to escape the escape characters so that // we can build a character class out of them var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])'; if (afterBackslash) { regexString = '\\\\' + regexString; } var regex = new RegExp(regexString, 'g'); text = text.replace(regex, escapeCharactersCallback); return text; }; /** * Unescape HTML entities * @param txt * @returns {string} */ showdown.helper.unescapeHTMLEntities = function (txt) { 'use strict'; return txt .replace(/"/g, '"') .replace(/</g, '<') .replace(/>/g, '>') .replace(/&/g, '&'); }; var rgxFindMatchPos = function (str, left, right, flags) { 'use strict'; var f = flags || '', g = f.indexOf('g') > -1, x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')), l = new RegExp(left, f.replace(/g/g, '')), pos = [], t, s, m, start, end; do { t = 0; while ((m = x.exec(str))) { if (l.test(m[0])) { if (!(t++)) { s = x.lastIndex; start = s - m[0].length; } } else if (t) { if (!--t) { end = m.index + m[0].length; var obj = { left: {start: start, end: s}, match: {start: s, end: m.index}, right: {start: m.index, end: end}, wholeMatch: {start: start, end: end} }; pos.push(obj); if (!g) { return pos; } } } } } while (t && (x.lastIndex = s)); return pos; }; /** * matchRecursiveRegExp * * (c) 2007 Steven Levithan * MIT License * * Accepts a string to search, a left and right format delimiter * as regex patterns, and optional regex flags. Returns an array * of matches, allowing nested instances of left/right delimiters. * Use the "g" flag to return all matches, otherwise only the * first is returned. Be careful to ensure that the left and * right format delimiters produce mutually exclusive matches. * Backreferences are not supported within the right delimiter * due to how it is internally combined with the left delimiter. * When matching strings whose format delimiters are unbalanced * to the left or right, the output is intentionally as a * conventional regex library with recursion support would * produce, e.g. "<" and ">" both produce ["x"] when using * "<" and ">" as the delimiters (both strings contain a single, * balanced instance of ""). * * examples: * matchRecursiveRegExp("test", "\\(", "\\)") * returns: [] * matchRecursiveRegExp(">>t<>", "<", ">", "g") * returns: ["t<>", ""] * matchRecursiveRegExp("
test
", "]*>", "", "gi") * returns: ["test"] */ showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) { 'use strict'; var matchPos = rgxFindMatchPos (str, left, right, flags), results = []; for (var i = 0; i < matchPos.length; ++i) { results.push([ str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), str.slice(matchPos[i].match.start, matchPos[i].match.end), str.slice(matchPos[i].left.start, matchPos[i].left.end), str.slice(matchPos[i].right.start, matchPos[i].right.end) ]); } return results; }; /** * * @param {string} str * @param {string|function} replacement * @param {string} left * @param {string} right * @param {string} flags * @returns {string} */ showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) { 'use strict'; if (!showdown.helper.isFunction(replacement)) { var repStr = replacement; replacement = function () { return repStr; }; } var matchPos = rgxFindMatchPos(str, left, right, flags), finalStr = str, lng = matchPos.length; if (lng > 0) { var bits = []; if (matchPos[0].wholeMatch.start !== 0) { bits.push(str.slice(0, matchPos[0].wholeMatch.start)); } for (var i = 0; i < lng; ++i) { bits.push( replacement( str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), str.slice(matchPos[i].match.start, matchPos[i].match.end), str.slice(matchPos[i].left.start, matchPos[i].left.end), str.slice(matchPos[i].right.start, matchPos[i].right.end) ) ); if (i < lng - 1) { bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start)); } } if (matchPos[lng - 1].wholeMatch.end < str.length) { bits.push(str.slice(matchPos[lng - 1].wholeMatch.end)); } finalStr = bits.join(''); } return finalStr; }; /** * Returns the index within the passed String object of the first occurrence of the specified regex, * starting the search at fromIndex. Returns -1 if the value is not found. * * @param {string} str string to search * @param {RegExp} regex Regular expression to search * @param {int} [fromIndex = 0] Index to start the search * @returns {Number} * @throws InvalidArgumentError */ showdown.helper.regexIndexOf = function (str, regex, fromIndex) { 'use strict'; if (!showdown.helper.isString(str)) { throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string'; } if (regex instanceof RegExp === false) { throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp'; } var indexOf = str.substring(fromIndex || 0).search(regex); return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf; }; /** * Splits the passed string object at the defined index, and returns an array composed of the two substrings * @param {string} str string to split * @param {int} index index to split string at * @returns {[string,string]} * @throws InvalidArgumentError */ showdown.helper.splitAtIndex = function (str, index) { 'use strict'; if (!showdown.helper.isString(str)) { throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string'; } return [str.substring(0, index), str.substring(index)]; }; /** * Obfuscate an e-mail address through the use of Character Entities, * transforming ASCII characters into their equivalent decimal or hex entities. * * Since it has a random component, subsequent calls to this function produce different results * * @param {string} mail * @returns {string} */ showdown.helper.encodeEmailAddress = function (mail) { 'use strict'; var encode = [ function (ch) { return '&#' + ch.charCodeAt(0) + ';'; }, function (ch) { return '&#x' + ch.charCodeAt(0).toString(16) + ';'; }, function (ch) { return ch; } ]; mail = mail.replace(/./g, function (ch) { if (ch === '@') { // this *must* be encoded. I insist. ch = encode[Math.floor(Math.random() * 2)](ch); } else { var r = Math.random(); // roughly 10% raw, 45% hex, 45% dec ch = ( r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch) ); } return ch; }); return mail; }; /** * * @param str * @param targetLength * @param padString * @returns {string} */ showdown.helper.padEnd = function padEnd (str, targetLength, padString) { 'use strict'; /*jshint bitwise: false*/ // eslint-disable-next-line space-infix-ops targetLength = targetLength>>0; //floor if number or convert non-number to 0; /*jshint bitwise: true*/ padString = String(padString || ' '); if (str.length > targetLength) { return String(str); } else { targetLength = targetLength - str.length; if (targetLength > padString.length) { padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed } return String(str) + padString.slice(0,targetLength); } }; /** * POLYFILLS */ // use this instead of builtin is undefined for IE8 compatibility if (typeof console === 'undefined') { console = { warn: function (msg) { 'use strict'; alert(msg); }, log: function (msg) { 'use strict'; alert(msg); }, error: function (msg) { 'use strict'; throw msg; } }; } /** * Common regexes. * We declare some common regexes to improve performance */ showdown.helper.regexes = { asteriskDashAndColon: /([*_:~])/g }; /** * EMOJIS LIST */ showdown.helper.emojis = { '+1':'\ud83d\udc4d', '-1':'\ud83d\udc4e', '100':'\ud83d\udcaf', '1234':'\ud83d\udd22', '1st_place_medal':'\ud83e\udd47', '2nd_place_medal':'\ud83e\udd48', '3rd_place_medal':'\ud83e\udd49', '8ball':'\ud83c\udfb1', 'a':'\ud83c\udd70\ufe0f', 'ab':'\ud83c\udd8e', 'abc':'\ud83d\udd24', 'abcd':'\ud83d\udd21', 'accept':'\ud83c\ude51', 'aerial_tramway':'\ud83d\udea1', 'airplane':'\u2708\ufe0f', 'alarm_clock':'\u23f0', 'alembic':'\u2697\ufe0f', 'alien':'\ud83d\udc7d', 'ambulance':'\ud83d\ude91', 'amphora':'\ud83c\udffa', 'anchor':'\u2693\ufe0f', 'angel':'\ud83d\udc7c', 'anger':'\ud83d\udca2', 'angry':'\ud83d\ude20', 'anguished':'\ud83d\ude27', 'ant':'\ud83d\udc1c', 'apple':'\ud83c\udf4e', 'aquarius':'\u2652\ufe0f', 'aries':'\u2648\ufe0f', 'arrow_backward':'\u25c0\ufe0f', 'arrow_double_down':'\u23ec', 'arrow_double_up':'\u23eb', 'arrow_down':'\u2b07\ufe0f', 'arrow_down_small':'\ud83d\udd3d', 'arrow_forward':'\u25b6\ufe0f', 'arrow_heading_down':'\u2935\ufe0f', 'arrow_heading_up':'\u2934\ufe0f', 'arrow_left':'\u2b05\ufe0f', 'arrow_lower_left':'\u2199\ufe0f', 'arrow_lower_right':'\u2198\ufe0f', 'arrow_right':'\u27a1\ufe0f', 'arrow_right_hook':'\u21aa\ufe0f', 'arrow_up':'\u2b06\ufe0f', 'arrow_up_down':'\u2195\ufe0f', 'arrow_up_small':'\ud83d\udd3c', 'arrow_upper_left':'\u2196\ufe0f', 'arrow_upper_right':'\u2197\ufe0f', 'arrows_clockwise':'\ud83d\udd03', 'arrows_counterclockwise':'\ud83d\udd04', 'art':'\ud83c\udfa8', 'articulated_lorry':'\ud83d\ude9b', 'artificial_satellite':'\ud83d\udef0', 'astonished':'\ud83d\ude32', 'athletic_shoe':'\ud83d\udc5f', 'atm':'\ud83c\udfe7', 'atom_symbol':'\u269b\ufe0f', 'avocado':'\ud83e\udd51', 'b':'\ud83c\udd71\ufe0f', 'baby':'\ud83d\udc76', 'baby_bottle':'\ud83c\udf7c', 'baby_chick':'\ud83d\udc24', 'baby_symbol':'\ud83d\udebc', 'back':'\ud83d\udd19', 'bacon':'\ud83e\udd53', 'badminton':'\ud83c\udff8', 'baggage_claim':'\ud83d\udec4', 'baguette_bread':'\ud83e\udd56', 'balance_scale':'\u2696\ufe0f', 'balloon':'\ud83c\udf88', 'ballot_box':'\ud83d\uddf3', 'ballot_box_with_check':'\u2611\ufe0f', 'bamboo':'\ud83c\udf8d', 'banana':'\ud83c\udf4c', 'bangbang':'\u203c\ufe0f', 'bank':'\ud83c\udfe6', 'bar_chart':'\ud83d\udcca', 'barber':'\ud83d\udc88', 'baseball':'\u26be\ufe0f', 'basketball':'\ud83c\udfc0', 'basketball_man':'\u26f9\ufe0f', 'basketball_woman':'\u26f9\ufe0f‍\u2640\ufe0f', 'bat':'\ud83e\udd87', 'bath':'\ud83d\udec0', 'bathtub':'\ud83d\udec1', 'battery':'\ud83d\udd0b', 'beach_umbrella':'\ud83c\udfd6', 'bear':'\ud83d\udc3b', 'bed':'\ud83d\udecf', 'bee':'\ud83d\udc1d', 'beer':'\ud83c\udf7a', 'beers':'\ud83c\udf7b', 'beetle':'\ud83d\udc1e', 'beginner':'\ud83d\udd30', 'bell':'\ud83d\udd14', 'bellhop_bell':'\ud83d\udece', 'bento':'\ud83c\udf71', 'biking_man':'\ud83d\udeb4', 'bike':'\ud83d\udeb2', 'biking_woman':'\ud83d\udeb4‍\u2640\ufe0f', 'bikini':'\ud83d\udc59', 'biohazard':'\u2623\ufe0f', 'bird':'\ud83d\udc26', 'birthday':'\ud83c\udf82', 'black_circle':'\u26ab\ufe0f', 'black_flag':'\ud83c\udff4', 'black_heart':'\ud83d\udda4', 'black_joker':'\ud83c\udccf', 'black_large_square':'\u2b1b\ufe0f', 'black_medium_small_square':'\u25fe\ufe0f', 'black_medium_square':'\u25fc\ufe0f', 'black_nib':'\u2712\ufe0f', 'black_small_square':'\u25aa\ufe0f', 'black_square_button':'\ud83d\udd32', 'blonde_man':'\ud83d\udc71', 'blonde_woman':'\ud83d\udc71‍\u2640\ufe0f', 'blossom':'\ud83c\udf3c', 'blowfish':'\ud83d\udc21', 'blue_book':'\ud83d\udcd8', 'blue_car':'\ud83d\ude99', 'blue_heart':'\ud83d\udc99', 'blush':'\ud83d\ude0a', 'boar':'\ud83d\udc17', 'boat':'\u26f5\ufe0f', 'bomb':'\ud83d\udca3', 'book':'\ud83d\udcd6', 'bookmark':'\ud83d\udd16', 'bookmark_tabs':'\ud83d\udcd1', 'books':'\ud83d\udcda', 'boom':'\ud83d\udca5', 'boot':'\ud83d\udc62', 'bouquet':'\ud83d\udc90', 'bowing_man':'\ud83d\ude47', 'bow_and_arrow':'\ud83c\udff9', 'bowing_woman':'\ud83d\ude47‍\u2640\ufe0f', 'bowling':'\ud83c\udfb3', 'boxing_glove':'\ud83e\udd4a', 'boy':'\ud83d\udc66', 'bread':'\ud83c\udf5e', 'bride_with_veil':'\ud83d\udc70', 'bridge_at_night':'\ud83c\udf09', 'briefcase':'\ud83d\udcbc', 'broken_heart':'\ud83d\udc94', 'bug':'\ud83d\udc1b', 'building_construction':'\ud83c\udfd7', 'bulb':'\ud83d\udca1', 'bullettrain_front':'\ud83d\ude85', 'bullettrain_side':'\ud83d\ude84', 'burrito':'\ud83c\udf2f', 'bus':'\ud83d\ude8c', 'business_suit_levitating':'\ud83d\udd74', 'busstop':'\ud83d\ude8f', 'bust_in_silhouette':'\ud83d\udc64', 'busts_in_silhouette':'\ud83d\udc65', 'butterfly':'\ud83e\udd8b', 'cactus':'\ud83c\udf35', 'cake':'\ud83c\udf70', 'calendar':'\ud83d\udcc6', 'call_me_hand':'\ud83e\udd19', 'calling':'\ud83d\udcf2', 'camel':'\ud83d\udc2b', 'camera':'\ud83d\udcf7', 'camera_flash':'\ud83d\udcf8', 'camping':'\ud83c\udfd5', 'cancer':'\u264b\ufe0f', 'candle':'\ud83d\udd6f', 'candy':'\ud83c\udf6c', 'canoe':'\ud83d\udef6', 'capital_abcd':'\ud83d\udd20', 'capricorn':'\u2651\ufe0f', 'car':'\ud83d\ude97', 'card_file_box':'\ud83d\uddc3', 'card_index':'\ud83d\udcc7', 'card_index_dividers':'\ud83d\uddc2', 'carousel_horse':'\ud83c\udfa0', 'carrot':'\ud83e\udd55', 'cat':'\ud83d\udc31', 'cat2':'\ud83d\udc08', 'cd':'\ud83d\udcbf', 'chains':'\u26d3', 'champagne':'\ud83c\udf7e', 'chart':'\ud83d\udcb9', 'chart_with_downwards_trend':'\ud83d\udcc9', 'chart_with_upwards_trend':'\ud83d\udcc8', 'checkered_flag':'\ud83c\udfc1', 'cheese':'\ud83e\uddc0', 'cherries':'\ud83c\udf52', 'cherry_blossom':'\ud83c\udf38', 'chestnut':'\ud83c\udf30', 'chicken':'\ud83d\udc14', 'children_crossing':'\ud83d\udeb8', 'chipmunk':'\ud83d\udc3f', 'chocolate_bar':'\ud83c\udf6b', 'christmas_tree':'\ud83c\udf84', 'church':'\u26ea\ufe0f', 'cinema':'\ud83c\udfa6', 'circus_tent':'\ud83c\udfaa', 'city_sunrise':'\ud83c\udf07', 'city_sunset':'\ud83c\udf06', 'cityscape':'\ud83c\udfd9', 'cl':'\ud83c\udd91', 'clamp':'\ud83d\udddc', 'clap':'\ud83d\udc4f', 'clapper':'\ud83c\udfac', 'classical_building':'\ud83c\udfdb', 'clinking_glasses':'\ud83e\udd42', 'clipboard':'\ud83d\udccb', 'clock1':'\ud83d\udd50', 'clock10':'\ud83d\udd59', 'clock1030':'\ud83d\udd65', 'clock11':'\ud83d\udd5a', 'clock1130':'\ud83d\udd66', 'clock12':'\ud83d\udd5b', 'clock1230':'\ud83d\udd67', 'clock130':'\ud83d\udd5c', 'clock2':'\ud83d\udd51', 'clock230':'\ud83d\udd5d', 'clock3':'\ud83d\udd52', 'clock330':'\ud83d\udd5e', 'clock4':'\ud83d\udd53', 'clock430':'\ud83d\udd5f', 'clock5':'\ud83d\udd54', 'clock530':'\ud83d\udd60', 'clock6':'\ud83d\udd55', 'clock630':'\ud83d\udd61', 'clock7':'\ud83d\udd56', 'clock730':'\ud83d\udd62', 'clock8':'\ud83d\udd57', 'clock830':'\ud83d\udd63', 'clock9':'\ud83d\udd58', 'clock930':'\ud83d\udd64', 'closed_book':'\ud83d\udcd5', 'closed_lock_with_key':'\ud83d\udd10', 'closed_umbrella':'\ud83c\udf02', 'cloud':'\u2601\ufe0f', 'cloud_with_lightning':'\ud83c\udf29', 'cloud_with_lightning_and_rain':'\u26c8', 'cloud_with_rain':'\ud83c\udf27', 'cloud_with_snow':'\ud83c\udf28', 'clown_face':'\ud83e\udd21', 'clubs':'\u2663\ufe0f', 'cocktail':'\ud83c\udf78', 'coffee':'\u2615\ufe0f', 'coffin':'\u26b0\ufe0f', 'cold_sweat':'\ud83d\ude30', 'comet':'\u2604\ufe0f', 'computer':'\ud83d\udcbb', 'computer_mouse':'\ud83d\uddb1', 'confetti_ball':'\ud83c\udf8a', 'confounded':'\ud83d\ude16', 'confused':'\ud83d\ude15', 'congratulations':'\u3297\ufe0f', 'construction':'\ud83d\udea7', 'construction_worker_man':'\ud83d\udc77', 'construction_worker_woman':'\ud83d\udc77‍\u2640\ufe0f', 'control_knobs':'\ud83c\udf9b', 'convenience_store':'\ud83c\udfea', 'cookie':'\ud83c\udf6a', 'cool':'\ud83c\udd92', 'policeman':'\ud83d\udc6e', 'copyright':'\u00a9\ufe0f', 'corn':'\ud83c\udf3d', 'couch_and_lamp':'\ud83d\udecb', 'couple':'\ud83d\udc6b', 'couple_with_heart_woman_man':'\ud83d\udc91', 'couple_with_heart_man_man':'\ud83d\udc68‍\u2764\ufe0f‍\ud83d\udc68', 'couple_with_heart_woman_woman':'\ud83d\udc69‍\u2764\ufe0f‍\ud83d\udc69', 'couplekiss_man_man':'\ud83d\udc68‍\u2764\ufe0f‍\ud83d\udc8b‍\ud83d\udc68', 'couplekiss_man_woman':'\ud83d\udc8f', 'couplekiss_woman_woman':'\ud83d\udc69‍\u2764\ufe0f‍\ud83d\udc8b‍\ud83d\udc69', 'cow':'\ud83d\udc2e', 'cow2':'\ud83d\udc04', 'cowboy_hat_face':'\ud83e\udd20', 'crab':'\ud83e\udd80', 'crayon':'\ud83d\udd8d', 'credit_card':'\ud83d\udcb3', 'crescent_moon':'\ud83c\udf19', 'cricket':'\ud83c\udfcf', 'crocodile':'\ud83d\udc0a', 'croissant':'\ud83e\udd50', 'crossed_fingers':'\ud83e\udd1e', 'crossed_flags':'\ud83c\udf8c', 'crossed_swords':'\u2694\ufe0f', 'crown':'\ud83d\udc51', 'cry':'\ud83d\ude22', 'crying_cat_face':'\ud83d\ude3f', 'crystal_ball':'\ud83d\udd2e', 'cucumber':'\ud83e\udd52', 'cupid':'\ud83d\udc98', 'curly_loop':'\u27b0', 'currency_exchange':'\ud83d\udcb1', 'curry':'\ud83c\udf5b', 'custard':'\ud83c\udf6e', 'customs':'\ud83d\udec3', 'cyclone':'\ud83c\udf00', 'dagger':'\ud83d\udde1', 'dancer':'\ud83d\udc83', 'dancing_women':'\ud83d\udc6f', 'dancing_men':'\ud83d\udc6f‍\u2642\ufe0f', 'dango':'\ud83c\udf61', 'dark_sunglasses':'\ud83d\udd76', 'dart':'\ud83c\udfaf', 'dash':'\ud83d\udca8', 'date':'\ud83d\udcc5', 'deciduous_tree':'\ud83c\udf33', 'deer':'\ud83e\udd8c', 'department_store':'\ud83c\udfec', 'derelict_house':'\ud83c\udfda', 'desert':'\ud83c\udfdc', 'desert_island':'\ud83c\udfdd', 'desktop_computer':'\ud83d\udda5', 'male_detective':'\ud83d\udd75\ufe0f', 'diamond_shape_with_a_dot_inside':'\ud83d\udca0', 'diamonds':'\u2666\ufe0f', 'disappointed':'\ud83d\ude1e', 'disappointed_relieved':'\ud83d\ude25', 'dizzy':'\ud83d\udcab', 'dizzy_face':'\ud83d\ude35', 'do_not_litter':'\ud83d\udeaf', 'dog':'\ud83d\udc36', 'dog2':'\ud83d\udc15', 'dollar':'\ud83d\udcb5', 'dolls':'\ud83c\udf8e', 'dolphin':'\ud83d\udc2c', 'door':'\ud83d\udeaa', 'doughnut':'\ud83c\udf69', 'dove':'\ud83d\udd4a', 'dragon':'\ud83d\udc09', 'dragon_face':'\ud83d\udc32', 'dress':'\ud83d\udc57', 'dromedary_camel':'\ud83d\udc2a', 'drooling_face':'\ud83e\udd24', 'droplet':'\ud83d\udca7', 'drum':'\ud83e\udd41', 'duck':'\ud83e\udd86', 'dvd':'\ud83d\udcc0', 'e-mail':'\ud83d\udce7', 'eagle':'\ud83e\udd85', 'ear':'\ud83d\udc42', 'ear_of_rice':'\ud83c\udf3e', 'earth_africa':'\ud83c\udf0d', 'earth_americas':'\ud83c\udf0e', 'earth_asia':'\ud83c\udf0f', 'egg':'\ud83e\udd5a', 'eggplant':'\ud83c\udf46', 'eight_pointed_black_star':'\u2734\ufe0f', 'eight_spoked_asterisk':'\u2733\ufe0f', 'electric_plug':'\ud83d\udd0c', 'elephant':'\ud83d\udc18', 'email':'\u2709\ufe0f', 'end':'\ud83d\udd1a', 'envelope_with_arrow':'\ud83d\udce9', 'euro':'\ud83d\udcb6', 'european_castle':'\ud83c\udff0', 'european_post_office':'\ud83c\udfe4', 'evergreen_tree':'\ud83c\udf32', 'exclamation':'\u2757\ufe0f', 'expressionless':'\ud83d\ude11', 'eye':'\ud83d\udc41', 'eye_speech_bubble':'\ud83d\udc41‍\ud83d\udde8', 'eyeglasses':'\ud83d\udc53', 'eyes':'\ud83d\udc40', 'face_with_head_bandage':'\ud83e\udd15', 'face_with_thermometer':'\ud83e\udd12', 'fist_oncoming':'\ud83d\udc4a', 'factory':'\ud83c\udfed', 'fallen_leaf':'\ud83c\udf42', 'family_man_woman_boy':'\ud83d\udc6a', 'family_man_boy':'\ud83d\udc68‍\ud83d\udc66', 'family_man_boy_boy':'\ud83d\udc68‍\ud83d\udc66‍\ud83d\udc66', 'family_man_girl':'\ud83d\udc68‍\ud83d\udc67', 'family_man_girl_boy':'\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc66', 'family_man_girl_girl':'\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc67', 'family_man_man_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc66', 'family_man_man_boy_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc66‍\ud83d\udc66', 'family_man_man_girl':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67', 'family_man_man_girl_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc66', 'family_man_man_girl_girl':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc67', 'family_man_woman_boy_boy':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', 'family_man_woman_girl':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67', 'family_man_woman_girl_boy':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', 'family_man_woman_girl_girl':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', 'family_woman_boy':'\ud83d\udc69‍\ud83d\udc66', 'family_woman_boy_boy':'\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', 'family_woman_girl':'\ud83d\udc69‍\ud83d\udc67', 'family_woman_girl_boy':'\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', 'family_woman_girl_girl':'\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', 'family_woman_woman_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc66', 'family_woman_woman_boy_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', 'family_woman_woman_girl':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67', 'family_woman_woman_girl_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', 'family_woman_woman_girl_girl':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', 'fast_forward':'\u23e9', 'fax':'\ud83d\udce0', 'fearful':'\ud83d\ude28', 'feet':'\ud83d\udc3e', 'female_detective':'\ud83d\udd75\ufe0f‍\u2640\ufe0f', 'ferris_wheel':'\ud83c\udfa1', 'ferry':'\u26f4', 'field_hockey':'\ud83c\udfd1', 'file_cabinet':'\ud83d\uddc4', 'file_folder':'\ud83d\udcc1', 'film_projector':'\ud83d\udcfd', 'film_strip':'\ud83c\udf9e', 'fire':'\ud83d\udd25', 'fire_engine':'\ud83d\ude92', 'fireworks':'\ud83c\udf86', 'first_quarter_moon':'\ud83c\udf13', 'first_quarter_moon_with_face':'\ud83c\udf1b', 'fish':'\ud83d\udc1f', 'fish_cake':'\ud83c\udf65', 'fishing_pole_and_fish':'\ud83c\udfa3', 'fist_raised':'\u270a', 'fist_left':'\ud83e\udd1b', 'fist_right':'\ud83e\udd1c', 'flags':'\ud83c\udf8f', 'flashlight':'\ud83d\udd26', 'fleur_de_lis':'\u269c\ufe0f', 'flight_arrival':'\ud83d\udeec', 'flight_departure':'\ud83d\udeeb', 'floppy_disk':'\ud83d\udcbe', 'flower_playing_cards':'\ud83c\udfb4', 'flushed':'\ud83d\ude33', 'fog':'\ud83c\udf2b', 'foggy':'\ud83c\udf01', 'football':'\ud83c\udfc8', 'footprints':'\ud83d\udc63', 'fork_and_knife':'\ud83c\udf74', 'fountain':'\u26f2\ufe0f', 'fountain_pen':'\ud83d\udd8b', 'four_leaf_clover':'\ud83c\udf40', 'fox_face':'\ud83e\udd8a', 'framed_picture':'\ud83d\uddbc', 'free':'\ud83c\udd93', 'fried_egg':'\ud83c\udf73', 'fried_shrimp':'\ud83c\udf64', 'fries':'\ud83c\udf5f', 'frog':'\ud83d\udc38', 'frowning':'\ud83d\ude26', 'frowning_face':'\u2639\ufe0f', 'frowning_man':'\ud83d\ude4d‍\u2642\ufe0f', 'frowning_woman':'\ud83d\ude4d', 'middle_finger':'\ud83d\udd95', 'fuelpump':'\u26fd\ufe0f', 'full_moon':'\ud83c\udf15', 'full_moon_with_face':'\ud83c\udf1d', 'funeral_urn':'\u26b1\ufe0f', 'game_die':'\ud83c\udfb2', 'gear':'\u2699\ufe0f', 'gem':'\ud83d\udc8e', 'gemini':'\u264a\ufe0f', 'ghost':'\ud83d\udc7b', 'gift':'\ud83c\udf81', 'gift_heart':'\ud83d\udc9d', 'girl':'\ud83d\udc67', 'globe_with_meridians':'\ud83c\udf10', 'goal_net':'\ud83e\udd45', 'goat':'\ud83d\udc10', 'golf':'\u26f3\ufe0f', 'golfing_man':'\ud83c\udfcc\ufe0f', 'golfing_woman':'\ud83c\udfcc\ufe0f‍\u2640\ufe0f', 'gorilla':'\ud83e\udd8d', 'grapes':'\ud83c\udf47', 'green_apple':'\ud83c\udf4f', 'green_book':'\ud83d\udcd7', 'green_heart':'\ud83d\udc9a', 'green_salad':'\ud83e\udd57', 'grey_exclamation':'\u2755', 'grey_question':'\u2754', 'grimacing':'\ud83d\ude2c', 'grin':'\ud83d\ude01', 'grinning':'\ud83d\ude00', 'guardsman':'\ud83d\udc82', 'guardswoman':'\ud83d\udc82‍\u2640\ufe0f', 'guitar':'\ud83c\udfb8', 'gun':'\ud83d\udd2b', 'haircut_woman':'\ud83d\udc87', 'haircut_man':'\ud83d\udc87‍\u2642\ufe0f', 'hamburger':'\ud83c\udf54', 'hammer':'\ud83d\udd28', 'hammer_and_pick':'\u2692', 'hammer_and_wrench':'\ud83d\udee0', 'hamster':'\ud83d\udc39', 'hand':'\u270b', 'handbag':'\ud83d\udc5c', 'handshake':'\ud83e\udd1d', 'hankey':'\ud83d\udca9', 'hatched_chick':'\ud83d\udc25', 'hatching_chick':'\ud83d\udc23', 'headphones':'\ud83c\udfa7', 'hear_no_evil':'\ud83d\ude49', 'heart':'\u2764\ufe0f', 'heart_decoration':'\ud83d\udc9f', 'heart_eyes':'\ud83d\ude0d', 'heart_eyes_cat':'\ud83d\ude3b', 'heartbeat':'\ud83d\udc93', 'heartpulse':'\ud83d\udc97', 'hearts':'\u2665\ufe0f', 'heavy_check_mark':'\u2714\ufe0f', 'heavy_division_sign':'\u2797', 'heavy_dollar_sign':'\ud83d\udcb2', 'heavy_heart_exclamation':'\u2763\ufe0f', 'heavy_minus_sign':'\u2796', 'heavy_multiplication_x':'\u2716\ufe0f', 'heavy_plus_sign':'\u2795', 'helicopter':'\ud83d\ude81', 'herb':'\ud83c\udf3f', 'hibiscus':'\ud83c\udf3a', 'high_brightness':'\ud83d\udd06', 'high_heel':'\ud83d\udc60', 'hocho':'\ud83d\udd2a', 'hole':'\ud83d\udd73', 'honey_pot':'\ud83c\udf6f', 'horse':'\ud83d\udc34', 'horse_racing':'\ud83c\udfc7', 'hospital':'\ud83c\udfe5', 'hot_pepper':'\ud83c\udf36', 'hotdog':'\ud83c\udf2d', 'hotel':'\ud83c\udfe8', 'hotsprings':'\u2668\ufe0f', 'hourglass':'\u231b\ufe0f', 'hourglass_flowing_sand':'\u23f3', 'house':'\ud83c\udfe0', 'house_with_garden':'\ud83c\udfe1', 'houses':'\ud83c\udfd8', 'hugs':'\ud83e\udd17', 'hushed':'\ud83d\ude2f', 'ice_cream':'\ud83c\udf68', 'ice_hockey':'\ud83c\udfd2', 'ice_skate':'\u26f8', 'icecream':'\ud83c\udf66', 'id':'\ud83c\udd94', 'ideograph_advantage':'\ud83c\ude50', 'imp':'\ud83d\udc7f', 'inbox_tray':'\ud83d\udce5', 'incoming_envelope':'\ud83d\udce8', 'tipping_hand_woman':'\ud83d\udc81', 'information_source':'\u2139\ufe0f', 'innocent':'\ud83d\ude07', 'interrobang':'\u2049\ufe0f', 'iphone':'\ud83d\udcf1', 'izakaya_lantern':'\ud83c\udfee', 'jack_o_lantern':'\ud83c\udf83', 'japan':'\ud83d\uddfe', 'japanese_castle':'\ud83c\udfef', 'japanese_goblin':'\ud83d\udc7a', 'japanese_ogre':'\ud83d\udc79', 'jeans':'\ud83d\udc56', 'joy':'\ud83d\ude02', 'joy_cat':'\ud83d\ude39', 'joystick':'\ud83d\udd79', 'kaaba':'\ud83d\udd4b', 'key':'\ud83d\udd11', 'keyboard':'\u2328\ufe0f', 'keycap_ten':'\ud83d\udd1f', 'kick_scooter':'\ud83d\udef4', 'kimono':'\ud83d\udc58', 'kiss':'\ud83d\udc8b', 'kissing':'\ud83d\ude17', 'kissing_cat':'\ud83d\ude3d', 'kissing_closed_eyes':'\ud83d\ude1a', 'kissing_heart':'\ud83d\ude18', 'kissing_smiling_eyes':'\ud83d\ude19', 'kiwi_fruit':'\ud83e\udd5d', 'koala':'\ud83d\udc28', 'koko':'\ud83c\ude01', 'label':'\ud83c\udff7', 'large_blue_circle':'\ud83d\udd35', 'large_blue_diamond':'\ud83d\udd37', 'large_orange_diamond':'\ud83d\udd36', 'last_quarter_moon':'\ud83c\udf17', 'last_quarter_moon_with_face':'\ud83c\udf1c', 'latin_cross':'\u271d\ufe0f', 'laughing':'\ud83d\ude06', 'leaves':'\ud83c\udf43', 'ledger':'\ud83d\udcd2', 'left_luggage':'\ud83d\udec5', 'left_right_arrow':'\u2194\ufe0f', 'leftwards_arrow_with_hook':'\u21a9\ufe0f', 'lemon':'\ud83c\udf4b', 'leo':'\u264c\ufe0f', 'leopard':'\ud83d\udc06', 'level_slider':'\ud83c\udf9a', 'libra':'\u264e\ufe0f', 'light_rail':'\ud83d\ude88', 'link':'\ud83d\udd17', 'lion':'\ud83e\udd81', 'lips':'\ud83d\udc44', 'lipstick':'\ud83d\udc84', 'lizard':'\ud83e\udd8e', 'lock':'\ud83d\udd12', 'lock_with_ink_pen':'\ud83d\udd0f', 'lollipop':'\ud83c\udf6d', 'loop':'\u27bf', 'loud_sound':'\ud83d\udd0a', 'loudspeaker':'\ud83d\udce2', 'love_hotel':'\ud83c\udfe9', 'love_letter':'\ud83d\udc8c', 'low_brightness':'\ud83d\udd05', 'lying_face':'\ud83e\udd25', 'm':'\u24c2\ufe0f', 'mag':'\ud83d\udd0d', 'mag_right':'\ud83d\udd0e', 'mahjong':'\ud83c\udc04\ufe0f', 'mailbox':'\ud83d\udceb', 'mailbox_closed':'\ud83d\udcea', 'mailbox_with_mail':'\ud83d\udcec', 'mailbox_with_no_mail':'\ud83d\udced', 'man':'\ud83d\udc68', 'man_artist':'\ud83d\udc68‍\ud83c\udfa8', 'man_astronaut':'\ud83d\udc68‍\ud83d\ude80', 'man_cartwheeling':'\ud83e\udd38‍\u2642\ufe0f', 'man_cook':'\ud83d\udc68‍\ud83c\udf73', 'man_dancing':'\ud83d\udd7a', 'man_facepalming':'\ud83e\udd26‍\u2642\ufe0f', 'man_factory_worker':'\ud83d\udc68‍\ud83c\udfed', 'man_farmer':'\ud83d\udc68‍\ud83c\udf3e', 'man_firefighter':'\ud83d\udc68‍\ud83d\ude92', 'man_health_worker':'\ud83d\udc68‍\u2695\ufe0f', 'man_in_tuxedo':'\ud83e\udd35', 'man_judge':'\ud83d\udc68‍\u2696\ufe0f', 'man_juggling':'\ud83e\udd39‍\u2642\ufe0f', 'man_mechanic':'\ud83d\udc68‍\ud83d\udd27', 'man_office_worker':'\ud83d\udc68‍\ud83d\udcbc', 'man_pilot':'\ud83d\udc68‍\u2708\ufe0f', 'man_playing_handball':'\ud83e\udd3e‍\u2642\ufe0f', 'man_playing_water_polo':'\ud83e\udd3d‍\u2642\ufe0f', 'man_scientist':'\ud83d\udc68‍\ud83d\udd2c', 'man_shrugging':'\ud83e\udd37‍\u2642\ufe0f', 'man_singer':'\ud83d\udc68‍\ud83c\udfa4', 'man_student':'\ud83d\udc68‍\ud83c\udf93', 'man_teacher':'\ud83d\udc68‍\ud83c\udfeb', 'man_technologist':'\ud83d\udc68‍\ud83d\udcbb', 'man_with_gua_pi_mao':'\ud83d\udc72', 'man_with_turban':'\ud83d\udc73', 'tangerine':'\ud83c\udf4a', 'mans_shoe':'\ud83d\udc5e', 'mantelpiece_clock':'\ud83d\udd70', 'maple_leaf':'\ud83c\udf41', 'martial_arts_uniform':'\ud83e\udd4b', 'mask':'\ud83d\ude37', 'massage_woman':'\ud83d\udc86', 'massage_man':'\ud83d\udc86‍\u2642\ufe0f', 'meat_on_bone':'\ud83c\udf56', 'medal_military':'\ud83c\udf96', 'medal_sports':'\ud83c\udfc5', 'mega':'\ud83d\udce3', 'melon':'\ud83c\udf48', 'memo':'\ud83d\udcdd', 'men_wrestling':'\ud83e\udd3c‍\u2642\ufe0f', 'menorah':'\ud83d\udd4e', 'mens':'\ud83d\udeb9', 'metal':'\ud83e\udd18', 'metro':'\ud83d\ude87', 'microphone':'\ud83c\udfa4', 'microscope':'\ud83d\udd2c', 'milk_glass':'\ud83e\udd5b', 'milky_way':'\ud83c\udf0c', 'minibus':'\ud83d\ude90', 'minidisc':'\ud83d\udcbd', 'mobile_phone_off':'\ud83d\udcf4', 'money_mouth_face':'\ud83e\udd11', 'money_with_wings':'\ud83d\udcb8', 'moneybag':'\ud83d\udcb0', 'monkey':'\ud83d\udc12', 'monkey_face':'\ud83d\udc35', 'monorail':'\ud83d\ude9d', 'moon':'\ud83c\udf14', 'mortar_board':'\ud83c\udf93', 'mosque':'\ud83d\udd4c', 'motor_boat':'\ud83d\udee5', 'motor_scooter':'\ud83d\udef5', 'motorcycle':'\ud83c\udfcd', 'motorway':'\ud83d\udee3', 'mount_fuji':'\ud83d\uddfb', 'mountain':'\u26f0', 'mountain_biking_man':'\ud83d\udeb5', 'mountain_biking_woman':'\ud83d\udeb5‍\u2640\ufe0f', 'mountain_cableway':'\ud83d\udea0', 'mountain_railway':'\ud83d\ude9e', 'mountain_snow':'\ud83c\udfd4', 'mouse':'\ud83d\udc2d', 'mouse2':'\ud83d\udc01', 'movie_camera':'\ud83c\udfa5', 'moyai':'\ud83d\uddff', 'mrs_claus':'\ud83e\udd36', 'muscle':'\ud83d\udcaa', 'mushroom':'\ud83c\udf44', 'musical_keyboard':'\ud83c\udfb9', 'musical_note':'\ud83c\udfb5', 'musical_score':'\ud83c\udfbc', 'mute':'\ud83d\udd07', 'nail_care':'\ud83d\udc85', 'name_badge':'\ud83d\udcdb', 'national_park':'\ud83c\udfde', 'nauseated_face':'\ud83e\udd22', 'necktie':'\ud83d\udc54', 'negative_squared_cross_mark':'\u274e', 'nerd_face':'\ud83e\udd13', 'neutral_face':'\ud83d\ude10', 'new':'\ud83c\udd95', 'new_moon':'\ud83c\udf11', 'new_moon_with_face':'\ud83c\udf1a', 'newspaper':'\ud83d\udcf0', 'newspaper_roll':'\ud83d\uddde', 'next_track_button':'\u23ed', 'ng':'\ud83c\udd96', 'no_good_man':'\ud83d\ude45‍\u2642\ufe0f', 'no_good_woman':'\ud83d\ude45', 'night_with_stars':'\ud83c\udf03', 'no_bell':'\ud83d\udd15', 'no_bicycles':'\ud83d\udeb3', 'no_entry':'\u26d4\ufe0f', 'no_entry_sign':'\ud83d\udeab', 'no_mobile_phones':'\ud83d\udcf5', 'no_mouth':'\ud83d\ude36', 'no_pedestrians':'\ud83d\udeb7', 'no_smoking':'\ud83d\udead', 'non-potable_water':'\ud83d\udeb1', 'nose':'\ud83d\udc43', 'notebook':'\ud83d\udcd3', 'notebook_with_decorative_cover':'\ud83d\udcd4', 'notes':'\ud83c\udfb6', 'nut_and_bolt':'\ud83d\udd29', 'o':'\u2b55\ufe0f', 'o2':'\ud83c\udd7e\ufe0f', 'ocean':'\ud83c\udf0a', 'octopus':'\ud83d\udc19', 'oden':'\ud83c\udf62', 'office':'\ud83c\udfe2', 'oil_drum':'\ud83d\udee2', 'ok':'\ud83c\udd97', 'ok_hand':'\ud83d\udc4c', 'ok_man':'\ud83d\ude46‍\u2642\ufe0f', 'ok_woman':'\ud83d\ude46', 'old_key':'\ud83d\udddd', 'older_man':'\ud83d\udc74', 'older_woman':'\ud83d\udc75', 'om':'\ud83d\udd49', 'on':'\ud83d\udd1b', 'oncoming_automobile':'\ud83d\ude98', 'oncoming_bus':'\ud83d\ude8d', 'oncoming_police_car':'\ud83d\ude94', 'oncoming_taxi':'\ud83d\ude96', 'open_file_folder':'\ud83d\udcc2', 'open_hands':'\ud83d\udc50', 'open_mouth':'\ud83d\ude2e', 'open_umbrella':'\u2602\ufe0f', 'ophiuchus':'\u26ce', 'orange_book':'\ud83d\udcd9', 'orthodox_cross':'\u2626\ufe0f', 'outbox_tray':'\ud83d\udce4', 'owl':'\ud83e\udd89', 'ox':'\ud83d\udc02', 'package':'\ud83d\udce6', 'page_facing_up':'\ud83d\udcc4', 'page_with_curl':'\ud83d\udcc3', 'pager':'\ud83d\udcdf', 'paintbrush':'\ud83d\udd8c', 'palm_tree':'\ud83c\udf34', 'pancakes':'\ud83e\udd5e', 'panda_face':'\ud83d\udc3c', 'paperclip':'\ud83d\udcce', 'paperclips':'\ud83d\udd87', 'parasol_on_ground':'\u26f1', 'parking':'\ud83c\udd7f\ufe0f', 'part_alternation_mark':'\u303d\ufe0f', 'partly_sunny':'\u26c5\ufe0f', 'passenger_ship':'\ud83d\udef3', 'passport_control':'\ud83d\udec2', 'pause_button':'\u23f8', 'peace_symbol':'\u262e\ufe0f', 'peach':'\ud83c\udf51', 'peanuts':'\ud83e\udd5c', 'pear':'\ud83c\udf50', 'pen':'\ud83d\udd8a', 'pencil2':'\u270f\ufe0f', 'penguin':'\ud83d\udc27', 'pensive':'\ud83d\ude14', 'performing_arts':'\ud83c\udfad', 'persevere':'\ud83d\ude23', 'person_fencing':'\ud83e\udd3a', 'pouting_woman':'\ud83d\ude4e', 'phone':'\u260e\ufe0f', 'pick':'\u26cf', 'pig':'\ud83d\udc37', 'pig2':'\ud83d\udc16', 'pig_nose':'\ud83d\udc3d', 'pill':'\ud83d\udc8a', 'pineapple':'\ud83c\udf4d', 'ping_pong':'\ud83c\udfd3', 'pisces':'\u2653\ufe0f', 'pizza':'\ud83c\udf55', 'place_of_worship':'\ud83d\uded0', 'plate_with_cutlery':'\ud83c\udf7d', 'play_or_pause_button':'\u23ef', 'point_down':'\ud83d\udc47', 'point_left':'\ud83d\udc48', 'point_right':'\ud83d\udc49', 'point_up':'\u261d\ufe0f', 'point_up_2':'\ud83d\udc46', 'police_car':'\ud83d\ude93', 'policewoman':'\ud83d\udc6e‍\u2640\ufe0f', 'poodle':'\ud83d\udc29', 'popcorn':'\ud83c\udf7f', 'post_office':'\ud83c\udfe3', 'postal_horn':'\ud83d\udcef', 'postbox':'\ud83d\udcee', 'potable_water':'\ud83d\udeb0', 'potato':'\ud83e\udd54', 'pouch':'\ud83d\udc5d', 'poultry_leg':'\ud83c\udf57', 'pound':'\ud83d\udcb7', 'rage':'\ud83d\ude21', 'pouting_cat':'\ud83d\ude3e', 'pouting_man':'\ud83d\ude4e‍\u2642\ufe0f', 'pray':'\ud83d\ude4f', 'prayer_beads':'\ud83d\udcff', 'pregnant_woman':'\ud83e\udd30', 'previous_track_button':'\u23ee', 'prince':'\ud83e\udd34', 'princess':'\ud83d\udc78', 'printer':'\ud83d\udda8', 'purple_heart':'\ud83d\udc9c', 'purse':'\ud83d\udc5b', 'pushpin':'\ud83d\udccc', 'put_litter_in_its_place':'\ud83d\udeae', 'question':'\u2753', 'rabbit':'\ud83d\udc30', 'rabbit2':'\ud83d\udc07', 'racehorse':'\ud83d\udc0e', 'racing_car':'\ud83c\udfce', 'radio':'\ud83d\udcfb', 'radio_button':'\ud83d\udd18', 'radioactive':'\u2622\ufe0f', 'railway_car':'\ud83d\ude83', 'railway_track':'\ud83d\udee4', 'rainbow':'\ud83c\udf08', 'rainbow_flag':'\ud83c\udff3\ufe0f‍\ud83c\udf08', 'raised_back_of_hand':'\ud83e\udd1a', 'raised_hand_with_fingers_splayed':'\ud83d\udd90', 'raised_hands':'\ud83d\ude4c', 'raising_hand_woman':'\ud83d\ude4b', 'raising_hand_man':'\ud83d\ude4b‍\u2642\ufe0f', 'ram':'\ud83d\udc0f', 'ramen':'\ud83c\udf5c', 'rat':'\ud83d\udc00', 'record_button':'\u23fa', 'recycle':'\u267b\ufe0f', 'red_circle':'\ud83d\udd34', 'registered':'\u00ae\ufe0f', 'relaxed':'\u263a\ufe0f', 'relieved':'\ud83d\ude0c', 'reminder_ribbon':'\ud83c\udf97', 'repeat':'\ud83d\udd01', 'repeat_one':'\ud83d\udd02', 'rescue_worker_helmet':'\u26d1', 'restroom':'\ud83d\udebb', 'revolving_hearts':'\ud83d\udc9e', 'rewind':'\u23ea', 'rhinoceros':'\ud83e\udd8f', 'ribbon':'\ud83c\udf80', 'rice':'\ud83c\udf5a', 'rice_ball':'\ud83c\udf59', 'rice_cracker':'\ud83c\udf58', 'rice_scene':'\ud83c\udf91', 'right_anger_bubble':'\ud83d\uddef', 'ring':'\ud83d\udc8d', 'robot':'\ud83e\udd16', 'rocket':'\ud83d\ude80', 'rofl':'\ud83e\udd23', 'roll_eyes':'\ud83d\ude44', 'roller_coaster':'\ud83c\udfa2', 'rooster':'\ud83d\udc13', 'rose':'\ud83c\udf39', 'rosette':'\ud83c\udff5', 'rotating_light':'\ud83d\udea8', 'round_pushpin':'\ud83d\udccd', 'rowing_man':'\ud83d\udea3', 'rowing_woman':'\ud83d\udea3‍\u2640\ufe0f', 'rugby_football':'\ud83c\udfc9', 'running_man':'\ud83c\udfc3', 'running_shirt_with_sash':'\ud83c\udfbd', 'running_woman':'\ud83c\udfc3‍\u2640\ufe0f', 'sa':'\ud83c\ude02\ufe0f', 'sagittarius':'\u2650\ufe0f', 'sake':'\ud83c\udf76', 'sandal':'\ud83d\udc61', 'santa':'\ud83c\udf85', 'satellite':'\ud83d\udce1', 'saxophone':'\ud83c\udfb7', 'school':'\ud83c\udfeb', 'school_satchel':'\ud83c\udf92', 'scissors':'\u2702\ufe0f', 'scorpion':'\ud83e\udd82', 'scorpius':'\u264f\ufe0f', 'scream':'\ud83d\ude31', 'scream_cat':'\ud83d\ude40', 'scroll':'\ud83d\udcdc', 'seat':'\ud83d\udcba', 'secret':'\u3299\ufe0f', 'see_no_evil':'\ud83d\ude48', 'seedling':'\ud83c\udf31', 'selfie':'\ud83e\udd33', 'shallow_pan_of_food':'\ud83e\udd58', 'shamrock':'\u2618\ufe0f', 'shark':'\ud83e\udd88', 'shaved_ice':'\ud83c\udf67', 'sheep':'\ud83d\udc11', 'shell':'\ud83d\udc1a', 'shield':'\ud83d\udee1', 'shinto_shrine':'\u26e9', 'ship':'\ud83d\udea2', 'shirt':'\ud83d\udc55', 'shopping':'\ud83d\udecd', 'shopping_cart':'\ud83d\uded2', 'shower':'\ud83d\udebf', 'shrimp':'\ud83e\udd90', 'signal_strength':'\ud83d\udcf6', 'six_pointed_star':'\ud83d\udd2f', 'ski':'\ud83c\udfbf', 'skier':'\u26f7', 'skull':'\ud83d\udc80', 'skull_and_crossbones':'\u2620\ufe0f', 'sleeping':'\ud83d\ude34', 'sleeping_bed':'\ud83d\udecc', 'sleepy':'\ud83d\ude2a', 'slightly_frowning_face':'\ud83d\ude41', 'slightly_smiling_face':'\ud83d\ude42', 'slot_machine':'\ud83c\udfb0', 'small_airplane':'\ud83d\udee9', 'small_blue_diamond':'\ud83d\udd39', 'small_orange_diamond':'\ud83d\udd38', 'small_red_triangle':'\ud83d\udd3a', 'small_red_triangle_down':'\ud83d\udd3b', 'smile':'\ud83d\ude04', 'smile_cat':'\ud83d\ude38', 'smiley':'\ud83d\ude03', 'smiley_cat':'\ud83d\ude3a', 'smiling_imp':'\ud83d\ude08', 'smirk':'\ud83d\ude0f', 'smirk_cat':'\ud83d\ude3c', 'smoking':'\ud83d\udeac', 'snail':'\ud83d\udc0c', 'snake':'\ud83d\udc0d', 'sneezing_face':'\ud83e\udd27', 'snowboarder':'\ud83c\udfc2', 'snowflake':'\u2744\ufe0f', 'snowman':'\u26c4\ufe0f', 'snowman_with_snow':'\u2603\ufe0f', 'sob':'\ud83d\ude2d', 'soccer':'\u26bd\ufe0f', 'soon':'\ud83d\udd1c', 'sos':'\ud83c\udd98', 'sound':'\ud83d\udd09', 'space_invader':'\ud83d\udc7e', 'spades':'\u2660\ufe0f', 'spaghetti':'\ud83c\udf5d', 'sparkle':'\u2747\ufe0f', 'sparkler':'\ud83c\udf87', 'sparkles':'\u2728', 'sparkling_heart':'\ud83d\udc96', 'speak_no_evil':'\ud83d\ude4a', 'speaker':'\ud83d\udd08', 'speaking_head':'\ud83d\udde3', 'speech_balloon':'\ud83d\udcac', 'speedboat':'\ud83d\udea4', 'spider':'\ud83d\udd77', 'spider_web':'\ud83d\udd78', 'spiral_calendar':'\ud83d\uddd3', 'spiral_notepad':'\ud83d\uddd2', 'spoon':'\ud83e\udd44', 'squid':'\ud83e\udd91', 'stadium':'\ud83c\udfdf', 'star':'\u2b50\ufe0f', 'star2':'\ud83c\udf1f', 'star_and_crescent':'\u262a\ufe0f', 'star_of_david':'\u2721\ufe0f', 'stars':'\ud83c\udf20', 'station':'\ud83d\ude89', 'statue_of_liberty':'\ud83d\uddfd', 'steam_locomotive':'\ud83d\ude82', 'stew':'\ud83c\udf72', 'stop_button':'\u23f9', 'stop_sign':'\ud83d\uded1', 'stopwatch':'\u23f1', 'straight_ruler':'\ud83d\udccf', 'strawberry':'\ud83c\udf53', 'stuck_out_tongue':'\ud83d\ude1b', 'stuck_out_tongue_closed_eyes':'\ud83d\ude1d', 'stuck_out_tongue_winking_eye':'\ud83d\ude1c', 'studio_microphone':'\ud83c\udf99', 'stuffed_flatbread':'\ud83e\udd59', 'sun_behind_large_cloud':'\ud83c\udf25', 'sun_behind_rain_cloud':'\ud83c\udf26', 'sun_behind_small_cloud':'\ud83c\udf24', 'sun_with_face':'\ud83c\udf1e', 'sunflower':'\ud83c\udf3b', 'sunglasses':'\ud83d\ude0e', 'sunny':'\u2600\ufe0f', 'sunrise':'\ud83c\udf05', 'sunrise_over_mountains':'\ud83c\udf04', 'surfing_man':'\ud83c\udfc4', 'surfing_woman':'\ud83c\udfc4‍\u2640\ufe0f', 'sushi':'\ud83c\udf63', 'suspension_railway':'\ud83d\ude9f', 'sweat':'\ud83d\ude13', 'sweat_drops':'\ud83d\udca6', 'sweat_smile':'\ud83d\ude05', 'sweet_potato':'\ud83c\udf60', 'swimming_man':'\ud83c\udfca', 'swimming_woman':'\ud83c\udfca‍\u2640\ufe0f', 'symbols':'\ud83d\udd23', 'synagogue':'\ud83d\udd4d', 'syringe':'\ud83d\udc89', 'taco':'\ud83c\udf2e', 'tada':'\ud83c\udf89', 'tanabata_tree':'\ud83c\udf8b', 'taurus':'\u2649\ufe0f', 'taxi':'\ud83d\ude95', 'tea':'\ud83c\udf75', 'telephone_receiver':'\ud83d\udcde', 'telescope':'\ud83d\udd2d', 'tennis':'\ud83c\udfbe', 'tent':'\u26fa\ufe0f', 'thermometer':'\ud83c\udf21', 'thinking':'\ud83e\udd14', 'thought_balloon':'\ud83d\udcad', 'ticket':'\ud83c\udfab', 'tickets':'\ud83c\udf9f', 'tiger':'\ud83d\udc2f', 'tiger2':'\ud83d\udc05', 'timer_clock':'\u23f2', 'tipping_hand_man':'\ud83d\udc81‍\u2642\ufe0f', 'tired_face':'\ud83d\ude2b', 'tm':'\u2122\ufe0f', 'toilet':'\ud83d\udebd', 'tokyo_tower':'\ud83d\uddfc', 'tomato':'\ud83c\udf45', 'tongue':'\ud83d\udc45', 'top':'\ud83d\udd1d', 'tophat':'\ud83c\udfa9', 'tornado':'\ud83c\udf2a', 'trackball':'\ud83d\uddb2', 'tractor':'\ud83d\ude9c', 'traffic_light':'\ud83d\udea5', 'train':'\ud83d\ude8b', 'train2':'\ud83d\ude86', 'tram':'\ud83d\ude8a', 'triangular_flag_on_post':'\ud83d\udea9', 'triangular_ruler':'\ud83d\udcd0', 'trident':'\ud83d\udd31', 'triumph':'\ud83d\ude24', 'trolleybus':'\ud83d\ude8e', 'trophy':'\ud83c\udfc6', 'tropical_drink':'\ud83c\udf79', 'tropical_fish':'\ud83d\udc20', 'truck':'\ud83d\ude9a', 'trumpet':'\ud83c\udfba', 'tulip':'\ud83c\udf37', 'tumbler_glass':'\ud83e\udd43', 'turkey':'\ud83e\udd83', 'turtle':'\ud83d\udc22', 'tv':'\ud83d\udcfa', 'twisted_rightwards_arrows':'\ud83d\udd00', 'two_hearts':'\ud83d\udc95', 'two_men_holding_hands':'\ud83d\udc6c', 'two_women_holding_hands':'\ud83d\udc6d', 'u5272':'\ud83c\ude39', 'u5408':'\ud83c\ude34', 'u55b6':'\ud83c\ude3a', 'u6307':'\ud83c\ude2f\ufe0f', 'u6708':'\ud83c\ude37\ufe0f', 'u6709':'\ud83c\ude36', 'u6e80':'\ud83c\ude35', 'u7121':'\ud83c\ude1a\ufe0f', 'u7533':'\ud83c\ude38', 'u7981':'\ud83c\ude32', 'u7a7a':'\ud83c\ude33', 'umbrella':'\u2614\ufe0f', 'unamused':'\ud83d\ude12', 'underage':'\ud83d\udd1e', 'unicorn':'\ud83e\udd84', 'unlock':'\ud83d\udd13', 'up':'\ud83c\udd99', 'upside_down_face':'\ud83d\ude43', 'v':'\u270c\ufe0f', 'vertical_traffic_light':'\ud83d\udea6', 'vhs':'\ud83d\udcfc', 'vibration_mode':'\ud83d\udcf3', 'video_camera':'\ud83d\udcf9', 'video_game':'\ud83c\udfae', 'violin':'\ud83c\udfbb', 'virgo':'\u264d\ufe0f', 'volcano':'\ud83c\udf0b', 'volleyball':'\ud83c\udfd0', 'vs':'\ud83c\udd9a', 'vulcan_salute':'\ud83d\udd96', 'walking_man':'\ud83d\udeb6', 'walking_woman':'\ud83d\udeb6‍\u2640\ufe0f', 'waning_crescent_moon':'\ud83c\udf18', 'waning_gibbous_moon':'\ud83c\udf16', 'warning':'\u26a0\ufe0f', 'wastebasket':'\ud83d\uddd1', 'watch':'\u231a\ufe0f', 'water_buffalo':'\ud83d\udc03', 'watermelon':'\ud83c\udf49', 'wave':'\ud83d\udc4b', 'wavy_dash':'\u3030\ufe0f', 'waxing_crescent_moon':'\ud83c\udf12', 'wc':'\ud83d\udebe', 'weary':'\ud83d\ude29', 'wedding':'\ud83d\udc92', 'weight_lifting_man':'\ud83c\udfcb\ufe0f', 'weight_lifting_woman':'\ud83c\udfcb\ufe0f‍\u2640\ufe0f', 'whale':'\ud83d\udc33', 'whale2':'\ud83d\udc0b', 'wheel_of_dharma':'\u2638\ufe0f', 'wheelchair':'\u267f\ufe0f', 'white_check_mark':'\u2705', 'white_circle':'\u26aa\ufe0f', 'white_flag':'\ud83c\udff3\ufe0f', 'white_flower':'\ud83d\udcae', 'white_large_square':'\u2b1c\ufe0f', 'white_medium_small_square':'\u25fd\ufe0f', 'white_medium_square':'\u25fb\ufe0f', 'white_small_square':'\u25ab\ufe0f', 'white_square_button':'\ud83d\udd33', 'wilted_flower':'\ud83e\udd40', 'wind_chime':'\ud83c\udf90', 'wind_face':'\ud83c\udf2c', 'wine_glass':'\ud83c\udf77', 'wink':'\ud83d\ude09', 'wolf':'\ud83d\udc3a', 'woman':'\ud83d\udc69', 'woman_artist':'\ud83d\udc69‍\ud83c\udfa8', 'woman_astronaut':'\ud83d\udc69‍\ud83d\ude80', 'woman_cartwheeling':'\ud83e\udd38‍\u2640\ufe0f', 'woman_cook':'\ud83d\udc69‍\ud83c\udf73', 'woman_facepalming':'\ud83e\udd26‍\u2640\ufe0f', 'woman_factory_worker':'\ud83d\udc69‍\ud83c\udfed', 'woman_farmer':'\ud83d\udc69‍\ud83c\udf3e', 'woman_firefighter':'\ud83d\udc69‍\ud83d\ude92', 'woman_health_worker':'\ud83d\udc69‍\u2695\ufe0f', 'woman_judge':'\ud83d\udc69‍\u2696\ufe0f', 'woman_juggling':'\ud83e\udd39‍\u2640\ufe0f', 'woman_mechanic':'\ud83d\udc69‍\ud83d\udd27', 'woman_office_worker':'\ud83d\udc69‍\ud83d\udcbc', 'woman_pilot':'\ud83d\udc69‍\u2708\ufe0f', 'woman_playing_handball':'\ud83e\udd3e‍\u2640\ufe0f', 'woman_playing_water_polo':'\ud83e\udd3d‍\u2640\ufe0f', 'woman_scientist':'\ud83d\udc69‍\ud83d\udd2c', 'woman_shrugging':'\ud83e\udd37‍\u2640\ufe0f', 'woman_singer':'\ud83d\udc69‍\ud83c\udfa4', 'woman_student':'\ud83d\udc69‍\ud83c\udf93', 'woman_teacher':'\ud83d\udc69‍\ud83c\udfeb', 'woman_technologist':'\ud83d\udc69‍\ud83d\udcbb', 'woman_with_turban':'\ud83d\udc73‍\u2640\ufe0f', 'womans_clothes':'\ud83d\udc5a', 'womans_hat':'\ud83d\udc52', 'women_wrestling':'\ud83e\udd3c‍\u2640\ufe0f', 'womens':'\ud83d\udeba', 'world_map':'\ud83d\uddfa', 'worried':'\ud83d\ude1f', 'wrench':'\ud83d\udd27', 'writing_hand':'\u270d\ufe0f', 'x':'\u274c', 'yellow_heart':'\ud83d\udc9b', 'yen':'\ud83d\udcb4', 'yin_yang':'\u262f\ufe0f', 'yum':'\ud83d\ude0b', 'zap':'\u26a1\ufe0f', 'zipper_mouth_face':'\ud83e\udd10', 'zzz':'\ud83d\udca4', /* special emojis :P */ 'octocat': ':octocat:', 'showdown': 'S' }; /** * Created by Estevao on 31-05-2015. */ /** * Showdown Converter class * @class * @param {object} [converterOptions] * @returns {Converter} */ showdown.Converter = function (converterOptions) { 'use strict'; var /** * Options used by this converter * @private * @type {{}} */ options = {}, /** * Language extensions used by this converter * @private * @type {Array} */ langExtensions = [], /** * Output modifiers extensions used by this converter * @private * @type {Array} */ outputModifiers = [], /** * Event listeners * @private * @type {{}} */ listeners = {}, /** * The flavor set in this converter */ setConvFlavor = setFlavor, /** * Metadata of the document * @type {{parsed: {}, raw: string, format: string}} */ metadata = { parsed: {}, raw: '', format: '' }; _constructor(); /** * Converter constructor * @private */ function _constructor () { converterOptions = converterOptions || {}; for (var gOpt in globalOptions) { if (globalOptions.hasOwnProperty(gOpt)) { options[gOpt] = globalOptions[gOpt]; } } // Merge options if (typeof converterOptions === 'object') { for (var opt in converterOptions) { if (converterOptions.hasOwnProperty(opt)) { options[opt] = converterOptions[opt]; } } } else { throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions + ' was passed instead.'); } if (options.extensions) { showdown.helper.forEach(options.extensions, _parseExtension); } } /** * Parse extension * @param {*} ext * @param {string} [name=''] * @private */ function _parseExtension (ext, name) { name = name || null; // If it's a string, the extension was previously loaded if (showdown.helper.isString(ext)) { ext = showdown.helper.stdExtName(ext); name = ext; // LEGACY_SUPPORT CODE if (showdown.extensions[ext]) { console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' + 'Please inform the developer that the extension should be updated!'); legacyExtensionLoading(showdown.extensions[ext], ext); return; // END LEGACY SUPPORT CODE } else if (!showdown.helper.isUndefined(extensions[ext])) { ext = extensions[ext]; } else { throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.'); } } if (typeof ext === 'function') { ext = ext(); } if (!showdown.helper.isArray(ext)) { ext = [ext]; } var validExt = validate(ext, name); if (!validExt.valid) { throw Error(validExt.error); } for (var i = 0; i < ext.length; ++i) { switch (ext[i].type) { case 'lang': langExtensions.push(ext[i]); break; case 'output': outputModifiers.push(ext[i]); break; } if (ext[i].hasOwnProperty('listeners')) { for (var ln in ext[i].listeners) { if (ext[i].listeners.hasOwnProperty(ln)) { listen(ln, ext[i].listeners[ln]); } } } } } /** * LEGACY_SUPPORT * @param {*} ext * @param {string} name */ function legacyExtensionLoading (ext, name) { if (typeof ext === 'function') { ext = ext(new showdown.Converter()); } if (!showdown.helper.isArray(ext)) { ext = [ext]; } var valid = validate(ext, name); if (!valid.valid) { throw Error(valid.error); } for (var i = 0; i < ext.length; ++i) { switch (ext[i].type) { case 'lang': langExtensions.push(ext[i]); break; case 'output': outputModifiers.push(ext[i]); break; default:// should never reach here throw Error('Extension loader error: Type unrecognized!!!'); } } } /** * Listen to an event * @param {string} name * @param {function} callback */ function listen (name, callback) { if (!showdown.helper.isString(name)) { throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given'); } if (typeof callback !== 'function') { throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given'); } if (!listeners.hasOwnProperty(name)) { listeners[name] = []; } listeners[name].push(callback); } function rTrimInputText (text) { var rsp = text.match(/^\s*/)[0].length, rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm'); return text.replace(rgx, ''); } /** * Dispatch an event * @private * @param {string} evtName Event name * @param {string} text Text * @param {{}} options Converter Options * @param {{}} globals * @returns {string} */ this._dispatch = function dispatch (evtName, text, options, globals) { if (listeners.hasOwnProperty(evtName)) { for (var ei = 0; ei < listeners[evtName].length; ++ei) { var nText = listeners[evtName][ei](evtName, text, this, options, globals); if (nText && typeof nText !== 'undefined') { text = nText; } } } return text; }; /** * Listen to an event * @param {string} name * @param {function} callback * @returns {showdown.Converter} */ this.listen = function (name, callback) { listen(name, callback); return this; }; /** * Converts a markdown string into HTML * @param {string} text * @returns {*} */ this.makeHtml = function (text) { //check if text is not falsy if (!text) { return text; } var globals = { gHtmlBlocks: [], gHtmlMdBlocks: [], gHtmlSpans: [], gUrls: {}, gTitles: {}, gDimensions: {}, gListLevel: 0, hashLinkCounts: {}, langExtensions: langExtensions, outputModifiers: outputModifiers, converter: this, ghCodeBlocks: [], metadata: { parsed: {}, raw: '', format: '' } }; // This lets us use ¨ trema as an escape char to avoid md5 hashes // The choice of character is arbitrary; anything that isn't // magic in Markdown will work. text = text.replace(/¨/g, '¨T'); // Replace $ with ¨D // RegExp interprets $ as a special character // when it's in a replacement string text = text.replace(/\$/g, '¨D'); // Standardize line endings text = text.replace(/\r\n/g, '\n'); // DOS to Unix text = text.replace(/\r/g, '\n'); // Mac to Unix // Stardardize line spaces text = text.replace(/\u00A0/g, ' '); if (options.smartIndentationFix) { text = rTrimInputText(text); } // Make sure text begins and ends with a couple of newlines: text = '\n\n' + text + '\n\n'; // detab text = showdown.subParser('detab')(text, options, globals); /** * Strip any lines consisting only of spaces and tabs. * This makes subsequent regexs easier to write, because we can * match consecutive blank lines with /\n+/ instead of something * contorted like /[ \t]*\n+/ */ text = text.replace(/^[ \t]+$/mg, ''); //run languageExtensions showdown.helper.forEach(langExtensions, function (ext) { text = showdown.subParser('runExtension')(ext, text, options, globals); }); // run the sub parsers text = showdown.subParser('metadata')(text, options, globals); text = showdown.subParser('hashPreCodeTags')(text, options, globals); text = showdown.subParser('githubCodeBlocks')(text, options, globals); text = showdown.subParser('hashHTMLBlocks')(text, options, globals); text = showdown.subParser('hashCodeTags')(text, options, globals); text = showdown.subParser('stripLinkDefinitions')(text, options, globals); text = showdown.subParser('blockGamut')(text, options, globals); text = showdown.subParser('unhashHTMLSpans')(text, options, globals); text = showdown.subParser('unescapeSpecialChars')(text, options, globals); // attacklab: Restore dollar signs text = text.replace(/¨D/g, '$$'); // attacklab: Restore tremas text = text.replace(/¨T/g, '¨'); // render a complete html document instead of a partial if the option is enabled text = showdown.subParser('completeHTMLDocument')(text, options, globals); // Run output modifiers showdown.helper.forEach(outputModifiers, function (ext) { text = showdown.subParser('runExtension')(ext, text, options, globals); }); // update metadata metadata = globals.metadata; return text; }; /** * Converts an HTML string into a markdown string * @param src * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used. * @returns {string} */ this.makeMarkdown = this.makeMd = function (src, HTMLParser) { // replace \r\n with \n src = src.replace(/\r\n/g, '\n'); src = src.replace(/\r/g, '\n'); // old macs // due to an edge case, we need to find this: > < // to prevent removing of non silent white spaces // ex: this is sparta src = src.replace(/>[ \t]+¨NBSP;<'); if (!HTMLParser) { if (window && window.document) { HTMLParser = window.document; } else { throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM'); } } var doc = HTMLParser.createElement('div'); doc.innerHTML = src; var globals = { preList: substitutePreCodeTags(doc) }; // remove all newlines and collapse spaces clean(doc); // some stuff, like accidental reference links must now be escaped // TODO // doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/); var nodes = doc.childNodes, mdDoc = ''; for (var i = 0; i < nodes.length; i++) { mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals); } function clean (node) { for (var n = 0; n < node.childNodes.length; ++n) { var child = node.childNodes[n]; if (child.nodeType === 3) { if (!/\S/.test(child.nodeValue)) { node.removeChild(child); --n; } else { child.nodeValue = child.nodeValue.split('\n').join(' '); child.nodeValue = child.nodeValue.replace(/(\s)+/g, '$1'); } } else if (child.nodeType === 1) { clean(child); } } } // find all pre tags and replace contents with placeholder // we need this so that we can remove all indentation from html // to ease up parsing function substitutePreCodeTags (doc) { var pres = doc.querySelectorAll('pre'), presPH = []; for (var i = 0; i < pres.length; ++i) { if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') { var content = pres[i].firstChild.innerHTML.trim(), language = pres[i].firstChild.getAttribute('data-language') || ''; // if data-language attribute is not defined, then we look for class language-* if (language === '') { var classes = pres[i].firstChild.className.split(' '); for (var c = 0; c < classes.length; ++c) { var matches = classes[c].match(/^language-(.+)$/); if (matches !== null) { language = matches[1]; break; } } } // unescape html entities in content content = showdown.helper.unescapeHTMLEntities(content); presPH.push(content); pres[i].outerHTML = ''; } else { presPH.push(pres[i].innerHTML); pres[i].innerHTML = ''; pres[i].setAttribute('prenum', i.toString()); } } return presPH; } return mdDoc; }; /** * Set an option of this Converter instance * @param {string} key * @param {*} value */ this.setOption = function (key, value) { options[key] = value; }; /** * Get the option of this Converter instance * @param {string} key * @returns {*} */ this.getOption = function (key) { return options[key]; }; /** * Get the options of this Converter instance * @returns {{}} */ this.getOptions = function () { return options; }; /** * Add extension to THIS converter * @param {{}} extension * @param {string} [name=null] */ this.addExtension = function (extension, name) { name = name || null; _parseExtension(extension, name); }; /** * Use a global registered extension with THIS converter * @param {string} extensionName Name of the previously registered extension */ this.useExtension = function (extensionName) { _parseExtension(extensionName); }; /** * Set the flavor THIS converter should use * @param {string} name */ this.setFlavor = function (name) { if (!flavor.hasOwnProperty(name)) { throw Error(name + ' flavor was not found'); } var preset = flavor[name]; setConvFlavor = name; for (var option in preset) { if (preset.hasOwnProperty(option)) { options[option] = preset[option]; } } }; /** * Get the currently set flavor of this converter * @returns {string} */ this.getFlavor = function () { return setConvFlavor; }; /** * Remove an extension from THIS converter. * Note: This is a costly operation. It's better to initialize a new converter * and specify the extensions you wish to use * @param {Array} extension */ this.removeExtension = function (extension) { if (!showdown.helper.isArray(extension)) { extension = [extension]; } for (var a = 0; a < extension.length; ++a) { var ext = extension[a]; for (var i = 0; i < langExtensions.length; ++i) { if (langExtensions[i] === ext) { langExtensions[i].splice(i, 1); } } for (var ii = 0; ii < outputModifiers.length; ++i) { if (outputModifiers[ii] === ext) { outputModifiers[ii].splice(i, 1); } } } }; /** * Get all extension of THIS converter * @returns {{language: Array, output: Array}} */ this.getAllExtensions = function () { return { language: langExtensions, output: outputModifiers }; }; /** * Get the metadata of the previously parsed document * @param raw * @returns {string|{}} */ this.getMetadata = function (raw) { if (raw) { return metadata.raw; } else { return metadata.parsed; } }; /** * Get the metadata format of the previously parsed document * @returns {string} */ this.getMetadataFormat = function () { return metadata.format; }; /** * Private: set a single key, value metadata pair * @param {string} key * @param {string} value */ this._setMetadataPair = function (key, value) { metadata.parsed[key] = value; }; /** * Private: set metadata format * @param {string} format */ this._setMetadataFormat = function (format) { metadata.format = format; }; /** * Private: set metadata raw text * @param {string} raw */ this._setMetadataRaw = function (raw) { metadata.raw = raw; }; }; /** * Turn Markdown link shortcuts into XHTML tags. */ showdown.subParser('anchors', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('anchors.before', text, options, globals); var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) { if (showdown.helper.isUndefined(title)) { title = ''; } linkId = linkId.toLowerCase(); // Special case for explicit empty url if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { url = ''; } else if (!url) { if (!linkId) { // lower-case and turn embedded newlines into spaces linkId = linkText.toLowerCase().replace(/ ?\n/g, ' '); } url = '#' + linkId; if (!showdown.helper.isUndefined(globals.gUrls[linkId])) { url = globals.gUrls[linkId]; if (!showdown.helper.isUndefined(globals.gTitles[linkId])) { title = globals.gTitles[linkId]; } } else { return wholeMatch; } } //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); var result = ''; return result; }; // First, handle reference-style links: [link text] [id] text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag); // Next, inline-style links: [link text](url "optional title") // cases with crazy urls like ./image/cat1).png text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, writeAnchorTag); // normal cases text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, writeAnchorTag); // handle reference-style shortcuts: [link text] // These must come last in case you've also got [link test][1] // or [link test](/foo) text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag); // Lastly handle GithubMentions if option is enabled if (options.ghMentions) { text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) { if (escape === '\\') { return st + mentions; } //check if options.ghMentionsLink is a string if (!showdown.helper.isString(options.ghMentionsLink)) { throw new Error('ghMentionsLink option must be a string'); } var lnk = options.ghMentionsLink.replace(/\{u}/g, username), target = ''; if (options.openLinksInNewWindow) { target = ' rel="noopener noreferrer" target="¨E95Eblank"'; } return st + '' + mentions + ''; }); } text = globals.converter._dispatch('anchors.after', text, options, globals); return text; }); // url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-] var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi, simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi, delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi, simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi, delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, replaceLink = function (options) { 'use strict'; return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) { link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); var lnkTxt = link, append = '', target = '', lmc = leadingMagicChars || '', tmc = trailingMagicChars || ''; if (/^www\./i.test(link)) { link = link.replace(/^www\./i, 'http://www.'); } if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) { append = trailingPunctuation; } if (options.openLinksInNewWindow) { target = ' rel="noopener noreferrer" target="¨E95Eblank"'; } return lmc + '' + lnkTxt + '' + append + tmc; }; }, replaceMail = function (options, globals) { 'use strict'; return function (wholeMatch, b, mail) { var href = 'mailto:'; b = b || ''; mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals); if (options.encodeEmails) { href = showdown.helper.encodeEmailAddress(href + mail); mail = showdown.helper.encodeEmailAddress(mail); } else { href = href + mail; } return b + '' + mail + ''; }; }; showdown.subParser('autoLinks', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('autoLinks.before', text, options, globals); text = text.replace(delimUrlRegex, replaceLink(options)); text = text.replace(delimMailRegex, replaceMail(options, globals)); text = globals.converter._dispatch('autoLinks.after', text, options, globals); return text; }); showdown.subParser('simplifiedAutoLinks', function (text, options, globals) { 'use strict'; if (!options.simplifiedAutoLink) { return text; } text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals); if (options.excludeTrailingPunctuationFromURLs) { text = text.replace(simpleURLRegex2, replaceLink(options)); } else { text = text.replace(simpleURLRegex, replaceLink(options)); } text = text.replace(simpleMailRegex, replaceMail(options, globals)); text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals); return text; }); /** * These are all the transformations that form block-level * tags like paragraphs, headers, and list items. */ showdown.subParser('blockGamut', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('blockGamut.before', text, options, globals); // we parse blockquotes first so that we can have headings and hrs // inside blockquotes text = showdown.subParser('blockQuotes')(text, options, globals); text = showdown.subParser('headers')(text, options, globals); // Do Horizontal Rules: text = showdown.subParser('horizontalRule')(text, options, globals); text = showdown.subParser('lists')(text, options, globals); text = showdown.subParser('codeBlocks')(text, options, globals); text = showdown.subParser('tables')(text, options, globals); // We already ran _HashHTMLBlocks() before, in Markdown(), but that // was to escape raw HTML in the original Markdown source. This time, // we're escaping the markup we've just created, so that we don't wrap //

tags around block-level tags. text = showdown.subParser('hashHTMLBlocks')(text, options, globals); text = showdown.subParser('paragraphs')(text, options, globals); text = globals.converter._dispatch('blockGamut.after', text, options, globals); return text; }); showdown.subParser('blockQuotes', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('blockQuotes.before', text, options, globals); // add a couple extra lines after the text and endtext mark text = text + '\n\n'; var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm; if (options.splitAdjacentBlockquotes) { rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm; } text = text.replace(rgx, function (bq) { // attacklab: hack around Konqueror 3.5.4 bug: // "----------bug".replace(/^-/g,"") == "bug" bq = bq.replace(/^[ \t]*>[ \t]?/gm, ''); // trim one level of quoting // attacklab: clean up hack bq = bq.replace(/¨0/g, ''); bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines bq = showdown.subParser('githubCodeBlocks')(bq, options, globals); bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse bq = bq.replace(/(^|\n)/g, '$1 '); // These leading spaces screw with

 content, so we need to fix that:
    bq = bq.replace(/(\s*
[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
      var pre = m1;
      // attacklab: hack around Konqueror 3.5.4 bug:
      pre = pre.replace(/^  /mg, '¨0');
      pre = pre.replace(/¨0/g, '');
      return pre;
    });

    return showdown.subParser('hashBlock')('
\n' + bq + '\n
', options, globals); }); text = globals.converter._dispatch('blockQuotes.after', text, options, globals); return text; }); /** * Process Markdown `
` blocks.
 */
showdown.subParser('codeBlocks', function (text, options, globals) {
  'use strict';

  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);

  // sentinel workarounds for lack of \A and \Z, safari\khtml bug
  text += '¨0';

  var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
  text = text.replace(pattern, function (wholeMatch, m1, m2) {
    var codeblock = m1,
        nextChar = m2,
        end = '\n';

    codeblock = showdown.subParser('outdent')(codeblock, options, globals);
    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
    codeblock = showdown.subParser('detab')(codeblock, options, globals);
    codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
    codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines

    if (options.omitExtraWLInCodeBlocks) {
      end = '';
    }

    codeblock = '
' + codeblock + end + '
'; return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar; }); // strip sentinel text = text.replace(/¨0/, ''); text = globals.converter._dispatch('codeBlocks.after', text, options, globals); return text; }); /** * * * Backtick quotes are used for spans. * * * You can use multiple backticks as the delimiters if you want to * include literal backticks in the code span. So, this input: * * Just type ``foo `bar` baz`` at the prompt. * * Will translate to: * *

Just type foo `bar` baz at the prompt.

* * There's no arbitrary limit to the number of backticks you * can use as delimters. If you need three consecutive backticks * in your code, use four for delimiters, etc. * * * You can use spaces to get literal backticks at the edges: * * ... type `` `bar` `` ... * * Turns to: * * ... type `bar` ... */ showdown.subParser('codeSpans', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('codeSpans.before', text, options, globals); if (typeof text === 'undefined') { text = ''; } text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function (wholeMatch, m1, m2, m3) { var c = m3; c = c.replace(/^([ \t]*)/g, ''); // leading whitespace c = c.replace(/[ \t]*$/g, ''); // trailing whitespace c = showdown.subParser('encodeCode')(c, options, globals); c = m1 + '' + c + ''; c = showdown.subParser('hashHTMLSpans')(c, options, globals); return c; } ); text = globals.converter._dispatch('codeSpans.after', text, options, globals); return text; }); /** * Create a full HTML document from the processed markdown */ showdown.subParser('completeHTMLDocument', function (text, options, globals) { 'use strict'; if (!options.completeHTMLDocument) { return text; } text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals); var doctype = 'html', doctypeParsed = '\n', title = '', charset = '\n', lang = '', metadata = ''; if (typeof globals.metadata.parsed.doctype !== 'undefined') { doctypeParsed = '\n'; doctype = globals.metadata.parsed.doctype.toString().toLowerCase(); if (doctype === 'html' || doctype === 'html5') { charset = ''; } } for (var meta in globals.metadata.parsed) { if (globals.metadata.parsed.hasOwnProperty(meta)) { switch (meta.toLowerCase()) { case 'doctype': break; case 'title': title = '' + globals.metadata.parsed.title + '\n'; break; case 'charset': if (doctype === 'html' || doctype === 'html5') { charset = '\n'; } else { charset = '\n'; } break; case 'language': case 'lang': lang = ' lang="' + globals.metadata.parsed[meta] + '"'; metadata += '\n'; break; default: metadata += '\n'; } } } text = doctypeParsed + '\n\n' + title + charset + metadata + '\n\n' + text.trim() + '\n\n'; text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals); return text; }); /** * Convert all tabs to spaces */ showdown.subParser('detab', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('detab.before', text, options, globals); // expand first n-1 tabs text = text.replace(/\t(?=\t)/g, ' '); // g_tab_width // replace the nth with two sentinels text = text.replace(/\t/g, '¨A¨B'); // use the sentinel to anchor our regex so it doesn't explode text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) { var leadingText = m1, numSpaces = 4 - leadingText.length % 4; // g_tab_width // there *must* be a better way to do this: for (var i = 0; i < numSpaces; i++) { leadingText += ' '; } return leadingText; }); // clean up sentinels text = text.replace(/¨A/g, ' '); // g_tab_width text = text.replace(/¨B/g, ''); text = globals.converter._dispatch('detab.after', text, options, globals); return text; }); showdown.subParser('ellipsis', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('ellipsis.before', text, options, globals); //text = text.replace(/\.\.\./g, '…'); text = globals.converter._dispatch('ellipsis.after', text, options, globals); return text; }); /** * Turn emoji codes into emojis * * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis */ showdown.subParser('emoji', function (text, options, globals) { 'use strict'; if (!options.emoji) { return text; } text = globals.converter._dispatch('emoji.before', text, options, globals); var emojiRgx = /:([\S]+?):/g; text = text.replace(emojiRgx, function (wm, emojiCode) { if (showdown.helper.emojis.hasOwnProperty(emojiCode)) { return showdown.helper.emojis[emojiCode]; } return wm; }); text = globals.converter._dispatch('emoji.after', text, options, globals); return text; }); /** * Smart processing for ampersands and angle brackets that need to be encoded. */ showdown.subParser('encodeAmpsAndAngles', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals); // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: // http://bumppo.net/projects/amputator/ text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&'); // Encode naked <'s text = text.replace(/<(?![a-z\/?$!])/gi, '<'); // Encode < text = text.replace(/ text = text.replace(/>/g, '>'); text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals); return text; }); /** * Returns the string, with after processing the following backslash escape sequences. * * attacklab: The polite way to do this is with the new escapeCharacters() function: * * text = escapeCharacters(text,"\\",true); * text = escapeCharacters(text,"`*_{}[]()>#+-.!",true); * * ...but we're sidestepping its use of the (slow) RegExp constructor * as an optimization for Firefox. This function gets called a LOT. */ showdown.subParser('encodeBackslashEscapes', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals); text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback); text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback); text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals); return text; }); /** * Encode/escape certain characters inside Markdown code runs. * The point is that in code, these characters are literals, * and lose their special Markdown meanings. */ showdown.subParser('encodeCode', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('encodeCode.before', text, options, globals); // Encode all ampersands; HTML entities are not // entities within a Markdown code span. text = text .replace(/&/g, '&') // Do the angle bracket song and dance: .replace(//g, '>') // Now, escape characters that are magic in Markdown: .replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback); text = globals.converter._dispatch('encodeCode.after', text, options, globals); return text; }); /** * Within tags -- meaning between < and > -- encode [\ ` * _ ~ =] so they * don't conflict with their use in Markdown for code, italics and strong. */ showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals); // Build a regex to find HTML tags. var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi; text = text.replace(tags, function (wholeMatch) { return wholeMatch .replace(/(.)<\/?code>(?=.)/g, '$1`') .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback); }); text = text.replace(comments, function (wholeMatch) { return wholeMatch .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback); }); text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals); return text; }); /** * Handle github codeblocks prior to running HashHTML so that * HTML contained within the codeblock gets escaped properly * Example: * ```ruby * def hello_world(x) * puts "Hello, #{x}" * end * ``` */ showdown.subParser('githubCodeBlocks', function (text, options, globals) { 'use strict'; // early exit if option is not enabled if (!options.ghCodeBlocks) { return text; } text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals); text += '¨0'; text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function (wholeMatch, delim, language, codeblock) { var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n'; // First parse the github code block codeblock = showdown.subParser('encodeCode')(codeblock, options, globals); codeblock = showdown.subParser('detab')(codeblock, options, globals); codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace codeblock = '
' + codeblock + end + '
'; codeblock = showdown.subParser('hashBlock')(codeblock, options, globals); // Since GHCodeblocks can be false positives, we need to // store the primitive text and the parsed text in a global var, // and then return a token return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n'; }); // attacklab: strip sentinel text = text.replace(/¨0/, ''); return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals); }); showdown.subParser('hashBlock', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('hashBlock.before', text, options, globals); text = text.replace(/(^\n+|\n+$)/g, ''); text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n'; text = globals.converter._dispatch('hashBlock.after', text, options, globals); return text; }); /** * Hash and escape elements that should not be parsed as markdown */ showdown.subParser('hashCodeTags', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('hashCodeTags.before', text, options, globals); var repFunc = function (wholeMatch, match, left, right) { var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right; return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C'; }; // Hash naked text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim'); text = globals.converter._dispatch('hashCodeTags.after', text, options, globals); return text; }); showdown.subParser('hashElement', function (text, options, globals) { 'use strict'; return function (wholeMatch, m1) { var blockText = m1; // Undo double lines blockText = blockText.replace(/\n\n/g, '\n'); blockText = blockText.replace(/^\n/, ''); // strip trailing blank lines blockText = blockText.replace(/\n+$/g, ''); // Replace the element text with a marker ("¨KxK" where x is its key) blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n'; return blockText; }; }); showdown.subParser('hashHTMLBlocks', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals); var blockTags = [ 'pre', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'table', 'dl', 'ol', 'ul', 'script', 'noscript', 'form', 'fieldset', 'iframe', 'math', 'style', 'section', 'header', 'footer', 'nav', 'article', 'aside', 'address', 'audio', 'canvas', 'figure', 'hgroup', 'output', 'video', 'p' ], repFunc = function (wholeMatch, match, left, right) { var txt = wholeMatch; // check if this html element is marked as markdown // if so, it's contents should be parsed as markdown if (left.search(/\bmarkdown\b/) !== -1) { txt = left + globals.converter.makeHtml(match) + right; } return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n'; }; if (options.backslashEscapesHTMLTags) { // encode backslash escaped HTML tags text = text.replace(/\\<(\/?[^>]+?)>/g, function (wm, inside) { return '<' + inside + '>'; }); } // hash HTML Blocks for (var i = 0; i < blockTags.length; ++i) { var opTagPos, rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\b[^>]*>)', 'im'), patLeft = '<' + blockTags[i] + '\\b[^>]*>', patRight = ''; // 1. Look for the first position of the first opening HTML tag in the text while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) { // if the HTML tag is \ escaped, we need to escape it and break //2. Split the text in that position var subTexts = showdown.helper.splitAtIndex(text, opTagPos), //3. Match recursively newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im'); // prevent an infinite loop if (newSubText1 === subTexts[1]) { break; } text = subTexts[0].concat(newSubText1); } } // HR SPECIAL CASE text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, showdown.subParser('hashElement')(text, options, globals)); // Special case for standalone HTML comments text = showdown.helper.replaceRecursiveRegExp(text, function (txt) { return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n'; }, '^ {0,3}', 'gm'); // PHP and ASP-style processor instructions ( and <%...%>) text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, showdown.subParser('hashElement')(text, options, globals)); text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals); return text; }); /** * Hash span elements that should not be parsed as markdown */ showdown.subParser('hashHTMLSpans', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals); function hashHTMLSpan (html) { return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C'; } // Hash Self Closing tags text = text.replace(/<[^>]+?\/>/gi, function (wm) { return hashHTMLSpan(wm); }); // Hash tags without properties text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) { return hashHTMLSpan(wm); }); // Hash tags with properties text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) { return hashHTMLSpan(wm); }); // Hash self closing tags without /> text = text.replace(/<[^>]+?>/gi, function (wm) { return hashHTMLSpan(wm); }); /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/ text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals); return text; }); /** * Unhash HTML spans */ showdown.subParser('unhashHTMLSpans', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals); for (var i = 0; i < globals.gHtmlSpans.length; ++i) { var repText = globals.gHtmlSpans[i], // limiter to prevent infinite loop (assume 10 as limit for recurse) limit = 0; while (/¨C(\d+)C/.test(repText)) { var num = RegExp.$1; repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]); if (limit === 10) { console.error('maximum nesting of 10 spans reached!!!'); break; } ++limit; } text = text.replace('¨C' + i + 'C', repText); } text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals); return text; }); /** * Hash and escape
 elements that should not be parsed as markdown
 */
showdown.subParser('hashPreCodeTags', function (text, options, globals) {
  'use strict';
  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);

  var repFunc = function (wholeMatch, match, left, right) {
    // encode html entities
    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
    return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
  };

  // Hash 

  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\s*]*>', '^ {0,3}\\s*
', 'gim'); text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals); return text; }); showdown.subParser('headers', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('headers.before', text, options, globals); var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart), // Set text-style headers: // Header 1 // ======== // // Header 2 // -------- // setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm; text = text.replace(setextRegexH1, function (wholeMatch, m1) { var spanGamut = showdown.subParser('spanGamut')(m1, options, globals), hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart, hashBlock = '' + spanGamut + ''; return showdown.subParser('hashBlock')(hashBlock, options, globals); }); text = text.replace(setextRegexH2, function (matchFound, m1) { var spanGamut = showdown.subParser('spanGamut')(m1, options, globals), hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart + 1, hashBlock = '' + spanGamut + ''; return showdown.subParser('hashBlock')(hashBlock, options, globals); }); // atx-style headers: // # Header 1 // ## Header 2 // ## Header 2 with closing hashes ## // ... // ###### Header 6 // var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm; text = text.replace(atxStyle, function (wholeMatch, m1, m2) { var hText = m2; if (options.customizedHeaderId) { hText = m2.replace(/\s?\{([^{]+?)}\s*$/, ''); } var span = showdown.subParser('spanGamut')(hText, options, globals), hID = (options.noHeaderId) ? '' : ' id="' + headerId(m2) + '"', hLevel = headerLevelStart - 1 + m1.length, header = '' + span + ''; return showdown.subParser('hashBlock')(header, options, globals); }); function headerId (m) { var title, prefix; // It is separate from other options to allow combining prefix and customized if (options.customizedHeaderId) { var match = m.match(/\{([^{]+?)}\s*$/); if (match && match[1]) { m = match[1]; } } title = m; // Prefix id to prevent causing inadvertent pre-existing style matches. if (showdown.helper.isString(options.prefixHeaderId)) { prefix = options.prefixHeaderId; } else if (options.prefixHeaderId === true) { prefix = 'section-'; } else { prefix = ''; } if (!options.rawPrefixHeaderId) { title = prefix + title; } if (options.ghCompatibleHeaderId) { title = title .replace(/ /g, '-') // replace previously escaped chars (&, ¨ and $) .replace(/&/g, '') .replace(/¨T/g, '') .replace(/¨D/g, '') // replace rest of the chars (&~$ are repeated as they might have been escaped) // borrowed from github's redcarpet (some they should produce similar results) .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '') .toLowerCase(); } else if (options.rawHeaderId) { title = title .replace(/ /g, '-') // replace previously escaped chars (&, ¨ and $) .replace(/&/g, '&') .replace(/¨T/g, '¨') .replace(/¨D/g, '$') // replace " and ' .replace(/["']/g, '-') .toLowerCase(); } else { title = title .replace(/[^\w]/g, '') .toLowerCase(); } if (options.rawPrefixHeaderId) { title = prefix + title; } if (globals.hashLinkCounts[title]) { title = title + '-' + (globals.hashLinkCounts[title]++); } else { globals.hashLinkCounts[title] = 1; } return title; } text = globals.converter._dispatch('headers.after', text, options, globals); return text; }); /** * Turn Markdown link shortcuts into XHTML tags. */ showdown.subParser('horizontalRule', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('horizontalRule.before', text, options, globals); var key = showdown.subParser('hashBlock')('
', options, globals); text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key); text = globals.converter._dispatch('horizontalRule.after', text, options, globals); return text; }); /** * Turn Markdown image shortcuts into tags. */ showdown.subParser('images', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('images.before', text, options, globals); var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g; function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) { url = url.replace(/\s/g, ''); return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title); } function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) { var gUrls = globals.gUrls, gTitles = globals.gTitles, gDims = globals.gDimensions; linkId = linkId.toLowerCase(); if (!title) { title = ''; } // Special case for explicit empty url if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { url = ''; } else if (url === '' || url === null) { if (linkId === '' || linkId === null) { // lower-case and turn embedded newlines into spaces linkId = altText.toLowerCase().replace(/ ?\n/g, ' '); } url = '#' + linkId; if (!showdown.helper.isUndefined(gUrls[linkId])) { url = gUrls[linkId]; if (!showdown.helper.isUndefined(gTitles[linkId])) { title = gTitles[linkId]; } if (!showdown.helper.isUndefined(gDims[linkId])) { width = gDims[linkId].width; height = gDims[linkId].height; } } else { return wholeMatch; } } altText = altText .replace(/"/g, '"') //altText = showdown.helper.escapeCharacters(altText, '*_', false); .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); //url = showdown.helper.escapeCharacters(url, '*_', false); url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); var result = '' + altText + 'x "optional title") // base64 encoded images text = text.replace(base64RegExp, writeImageTagBase64); // cases with crazy urls like ./image/cat1).png text = text.replace(crazyRegExp, writeImageTag); // normal cases text = text.replace(inlineRegExp, writeImageTag); // handle reference-style shortcuts: ![img text] text = text.replace(refShortcutRegExp, writeImageTag); text = globals.converter._dispatch('images.after', text, options, globals); return text; }); showdown.subParser('italicsAndBold', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('italicsAndBold.before', text, options, globals); // it's faster to have 3 separate regexes for each case than have just one // because of backtracing, in some cases, it could lead to an exponential effect // called "catastrophic backtrace". Ominous! function parseInside (txt, left, right) { /* if (options.simplifiedAutoLink) { txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals); } */ return left + txt + right; } // Parse underscores if (options.literalMidWordUnderscores) { text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { return parseInside (txt, '', ''); }); text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { return parseInside (txt, '', ''); }); text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) { return parseInside (txt, '', ''); }); } else { text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) { return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; }); text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) { return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; }); text = text.replace(/_([^\s_][\s\S]*?)_/g, function (wm, m) { // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it) return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; }); } // Now parse asterisks if (options.literalMidWordAsterisks) { text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) { return parseInside (txt, lead + '', ''); }); text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function (wm, lead, txt) { return parseInside (txt, lead + '', ''); }); text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function (wm, lead, txt) { return parseInside (txt, lead + '', ''); }); } else { text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) { return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; }); text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function (wm, m) { return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; }); text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function (wm, m) { // !/^\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it) return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; }); } text = globals.converter._dispatch('italicsAndBold.after', text, options, globals); return text; }); /** * Form HTML ordered (numbered) and unordered (bulleted) lists. */ showdown.subParser('lists', function (text, options, globals) { 'use strict'; /** * Process the contents of a single ordered or unordered list, splitting it * into individual list items. * @param {string} listStr * @param {boolean} trimTrailing * @returns {string} */ function processListItems (listStr, trimTrailing) { // The $g_list_level global keeps track of when we're inside a list. // Each time we enter a list, we increment it; when we leave a list, // we decrement. If it's zero, we're not in a list anymore. // // We do this because when we're not inside a list, we want to treat // something like this: // // I recommend upgrading to version // 8. Oops, now this line is treated // as a sub-list. // // As a single paragraph, despite the fact that the second line starts // with a digit-period-space sequence. // // Whereas when we're inside a list (or sub-list), that line will be // treated as the start of a sub-list. What a kludge, huh? This is // an aspect of Markdown's syntax that's hard to parse perfectly // without resorting to mind-reading. Perhaps the solution is to // change the syntax rules such that sub-lists must start with a // starting cardinal number; e.g. "1." or "a.". globals.gListLevel++; // trim trailing blank lines: listStr = listStr.replace(/\n{2,}$/, '\n'); // attacklab: add sentinel to emulate \z listStr += '¨0'; var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, isParagraphed = (/\n[ \t]*\n(?!¨0)/.test(listStr)); // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation, // which is a syntax breaking change // activating this option reverts to old behavior if (options.disableForced4SpacesIndentedSublists) { rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm; } listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) { checked = (checked && checked.trim() !== ''); var item = showdown.subParser('outdent')(m4, options, globals), bulletStyle = ''; // Support for github tasklists if (taskbtn && options.tasklists) { bulletStyle = ' class="task-list-item" style="list-style-type: none;"'; item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () { var otp = '
  • a
  • // instead of: //
    • - - a
    // So, to prevent it, we will put a marker (¨A)in the beginning of the line // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function (wm2) { return '¨A' + wm2; }); // m1 - Leading line or // Has a double return (multi paragraph) or // Has sublist if (m1 || (item.search(/\n{2,}/) > -1)) { item = showdown.subParser('githubCodeBlocks')(item, options, globals); item = showdown.subParser('blockGamut')(item, options, globals); } else { // Recursion for sub-lists: item = showdown.subParser('lists')(item, options, globals); item = item.replace(/\n$/, ''); // chomp(item) item = showdown.subParser('hashHTMLBlocks')(item, options, globals); // Colapse double linebreaks item = item.replace(/\n\n+/g, '\n\n'); if (isParagraphed) { item = showdown.subParser('paragraphs')(item, options, globals); } else { item = showdown.subParser('spanGamut')(item, options, globals); } } // now we need to remove the marker (¨A) item = item.replace('¨A', ''); // we can finally wrap the line in list item tags item = '' + item + '\n'; return item; }); // attacklab: strip sentinel listStr = listStr.replace(/¨0/g, ''); globals.gListLevel--; if (trimTrailing) { listStr = listStr.replace(/\s+$/, ''); } return listStr; } function styleStartNumber (list, listType) { // check if ol and starts by a number different than 1 if (listType === 'ol') { var res = list.match(/^ *(\d+)\./); if (res && res[1] !== '1') { return ' start="' + res[1] + '"'; } } return ''; } /** * Check and parse consecutive lists (better fix for issue #142) * @param {string} list * @param {string} listType * @param {boolean} trimTrailing * @returns {string} */ function parseConsecutiveLists (list, listType, trimTrailing) { // check if we caught 2 or more consecutive lists by mistake // we use the counterRgx, meaning if listType is UL we look for OL and vice versa var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm, ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm, counterRxg = (listType === 'ul') ? olRgx : ulRgx, result = ''; if (list.search(counterRxg) !== -1) { (function parseCL (txt) { var pos = txt.search(counterRxg), style = styleStartNumber(list, listType); if (pos !== -1) { // slice result += '\n\n<' + listType + style + '>\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\n'; // invert counterType and listType listType = (listType === 'ul') ? 'ol' : 'ul'; counterRxg = (listType === 'ul') ? olRgx : ulRgx; //recurse parseCL(txt.slice(pos)); } else { result += '\n\n<' + listType + style + '>\n' + processListItems(txt, !!trimTrailing) + '\n'; } })(list); } else { var style = styleStartNumber(list, listType); result = '\n\n<' + listType + style + '>\n' + processListItems(list, !!trimTrailing) + '\n'; } return result; } /** Start of list parsing **/ text = globals.converter._dispatch('lists.before', text, options, globals); // add sentinel to hack around khtml/safari bug: // http://bugs.webkit.org/show_bug.cgi?id=11231 text += '¨0'; if (globals.gListLevel) { text = text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, function (wholeMatch, list, m2) { var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol'; return parseConsecutiveLists(list, listType, true); } ); } else { text = text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, function (wholeMatch, m1, list, m3) { var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol'; return parseConsecutiveLists(list, listType, false); } ); } // strip sentinel text = text.replace(/¨0/, ''); text = globals.converter._dispatch('lists.after', text, options, globals); return text; }); /** * Parse metadata at the top of the document */ showdown.subParser('metadata', function (text, options, globals) { 'use strict'; if (!options.metadata) { return text; } text = globals.converter._dispatch('metadata.before', text, options, globals); function parseMetadataContents (content) { // raw is raw so it's not changed in any way globals.metadata.raw = content; // escape chars forbidden in html attributes // double quotes content = content // ampersand first .replace(/&/g, '&') // double quotes .replace(/"/g, '"'); content = content.replace(/\n {4}/g, ' '); content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function (wm, key, value) { globals.metadata.parsed[key] = value; return ''; }); } text = text.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/, function (wholematch, format, content) { parseMetadataContents(content); return '¨M'; }); text = text.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function (wholematch, format, content) { if (format) { globals.metadata.format = format; } parseMetadataContents(content); return '¨M'; }); text = text.replace(/¨M/g, ''); text = globals.converter._dispatch('metadata.after', text, options, globals); return text; }); /** * Remove one level of line-leading tabs or spaces */ showdown.subParser('outdent', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('outdent.before', text, options, globals); // attacklab: hack around Konqueror 3.5.4 bug: // "----------bug".replace(/^-/g,"") == "bug" text = text.replace(/^(\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width // attacklab: clean up hack text = text.replace(/¨0/g, ''); text = globals.converter._dispatch('outdent.after', text, options, globals); return text; }); /** * */ showdown.subParser('paragraphs', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('paragraphs.before', text, options, globals); // Strip leading and trailing lines: text = text.replace(/^\n+/g, ''); text = text.replace(/\n+$/g, ''); var grafs = text.split(/\n{2,}/g), grafsOut = [], end = grafs.length; // Wrap

    tags for (var i = 0; i < end; i++) { var str = grafs[i]; // if this is an HTML marker, copy it if (str.search(/¨(K|G)(\d+)\1/g) >= 0) { grafsOut.push(str); // test for presence of characters to prevent empty lines being parsed // as paragraphs (resulting in undesired extra empty paragraphs) } else if (str.search(/\S/) >= 0) { str = showdown.subParser('spanGamut')(str, options, globals); str = str.replace(/^([ \t]*)/g, '

    '); str += '

    '; grafsOut.push(str); } } /** Unhashify HTML blocks */ end = grafsOut.length; for (i = 0; i < end; i++) { var blockText = '', grafsOutIt = grafsOut[i], codeFlag = false; // if this is a marker for an html block... // use RegExp.test instead of string.search because of QML bug while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) { var delim = RegExp.$1, num = RegExp.$2; if (delim === 'K') { blockText = globals.gHtmlBlocks[num]; } else { // we need to check if ghBlock is a false positive if (codeFlag) { // use encoded version of all text blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals); } else { blockText = globals.ghCodeBlocks[num].codeblock; } } blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText); // Check if grafsOutIt is a pre->code if (/^]*>\s*]*>/.test(grafsOutIt)) { codeFlag = true; } } grafsOut[i] = grafsOutIt; } text = grafsOut.join('\n'); // Strip leading and trailing lines: text = text.replace(/^\n+/g, ''); text = text.replace(/\n+$/g, ''); return globals.converter._dispatch('paragraphs.after', text, options, globals); }); /** * Run extension */ showdown.subParser('runExtension', function (ext, text, options, globals) { 'use strict'; if (ext.filter) { text = ext.filter(text, globals.converter, options); } else if (ext.regex) { // TODO remove this when old extension loading mechanism is deprecated var re = ext.regex; if (!(re instanceof RegExp)) { re = new RegExp(re, 'g'); } text = text.replace(re, ext.replace); } return text; }); /** * These are all the transformations that occur *within* block-level * tags like paragraphs, headers, and list items. */ showdown.subParser('spanGamut', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('spanGamut.before', text, options, globals); text = showdown.subParser('codeSpans')(text, options, globals); text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals); text = showdown.subParser('encodeBackslashEscapes')(text, options, globals); // Process anchor and image tags. Images must come first, // because ![foo][f] looks like an anchor. text = showdown.subParser('images')(text, options, globals); text = showdown.subParser('anchors')(text, options, globals); // Make links out of things like `` // Must come after anchors, because you can use < and > // delimiters in inline links like [this](). text = showdown.subParser('autoLinks')(text, options, globals); text = showdown.subParser('simplifiedAutoLinks')(text, options, globals); text = showdown.subParser('emoji')(text, options, globals); text = showdown.subParser('underline')(text, options, globals); text = showdown.subParser('italicsAndBold')(text, options, globals); text = showdown.subParser('strikethrough')(text, options, globals); text = showdown.subParser('ellipsis')(text, options, globals); // we need to hash HTML tags inside spans text = showdown.subParser('hashHTMLSpans')(text, options, globals); // now we encode amps and angles text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals); // Do hard breaks if (options.simpleLineBreaks) { // GFM style hard breaks // only add line breaks if the text does not contain a block (special case for lists) if (!/\n\n¨K/.test(text)) { text = text.replace(/\n+/g, '
    \n'); } } else { // Vanilla hard breaks text = text.replace(/ +\n/g, '
    \n'); } text = globals.converter._dispatch('spanGamut.after', text, options, globals); return text; }); showdown.subParser('strikethrough', function (text, options, globals) { 'use strict'; function parseInside (txt) { if (options.simplifiedAutoLink) { txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals); } return '' + txt + ''; } if (options.strikethrough) { text = globals.converter._dispatch('strikethrough.before', text, options, globals); text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); }); text = globals.converter._dispatch('strikethrough.after', text, options, globals); } return text; }); /** * Strips link definitions from text, stores the URLs and titles in * hash references. * Link defs are in the form: ^[id]: url "optional title" */ showdown.subParser('stripLinkDefinitions', function (text, options, globals) { 'use strict'; var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm, base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm; // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug text += '¨0'; var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) { linkId = linkId.toLowerCase(); if (url.match(/^data:.+?\/.+?;base64,/)) { // remove newlines globals.gUrls[linkId] = url.replace(/\s/g, ''); } else { globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive } if (blankLines) { // Oops, found blank lines, so it's not a title. // Put back the parenthetical statement we stole. return blankLines + title; } else { if (title) { globals.gTitles[linkId] = title.replace(/"|'/g, '"'); } if (options.parseImgDimensions && width && height) { globals.gDimensions[linkId] = { width: width, height: height }; } } // Completely remove the definition from the text return ''; }; // first we try to find base64 link references text = text.replace(base64Regex, replaceFunc); text = text.replace(regex, replaceFunc); // attacklab: strip sentinel text = text.replace(/¨0/, ''); return text; }); showdown.subParser('tables', function (text, options, globals) { 'use strict'; if (!options.tables) { return text; } var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm, //singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm; singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm; function parseStyles (sLine) { if (/^:[ \t]*--*$/.test(sLine)) { return ' style="text-align:left;"'; } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) { return ' style="text-align:right;"'; } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) { return ' style="text-align:center;"'; } else { return ''; } } function parseHeaders (header, style) { var id = ''; header = header.trim(); // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility if (options.tablesHeaderId || options.tableHeaderId) { id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"'; } header = showdown.subParser('spanGamut')(header, options, globals); return '' + header + '\n'; } function parseCells (cell, style) { var subText = showdown.subParser('spanGamut')(cell, options, globals); return '' + subText + '\n'; } function buildTable (headers, cells) { var tb = '\n\n\n', tblLgn = headers.length; for (var i = 0; i < tblLgn; ++i) { tb += headers[i]; } tb += '\n\n\n'; for (i = 0; i < cells.length; ++i) { tb += '\n'; for (var ii = 0; ii < tblLgn; ++ii) { tb += cells[i][ii]; } tb += '\n'; } tb += '\n
    \n'; return tb; } function parseTable (rawTable) { var i, tableLines = rawTable.split('\n'); for (i = 0; i < tableLines.length; ++i) { // strip wrong first and last column if wrapped tables are used if (/^ {0,3}\|/.test(tableLines[i])) { tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, ''); } if (/\|[ \t]*$/.test(tableLines[i])) { tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, ''); } // parse code spans first, but we only support one line code spans tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals); } var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}), rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}), rawCells = [], headers = [], styles = [], cells = []; tableLines.shift(); tableLines.shift(); for (i = 0; i < tableLines.length; ++i) { if (tableLines[i].trim() === '') { continue; } rawCells.push( tableLines[i] .split('|') .map(function (s) { return s.trim(); }) ); } if (rawHeaders.length < rawStyles.length) { return rawTable; } for (i = 0; i < rawStyles.length; ++i) { styles.push(parseStyles(rawStyles[i])); } for (i = 0; i < rawHeaders.length; ++i) { if (showdown.helper.isUndefined(styles[i])) { styles[i] = ''; } headers.push(parseHeaders(rawHeaders[i], styles[i])); } for (i = 0; i < rawCells.length; ++i) { var row = []; for (var ii = 0; ii < headers.length; ++ii) { if (showdown.helper.isUndefined(rawCells[i][ii])) { } row.push(parseCells(rawCells[i][ii], styles[ii])); } cells.push(row); } return buildTable(headers, cells); } text = globals.converter._dispatch('tables.before', text, options, globals); // find escaped pipe characters text = text.replace(/\\(\|)/g, showdown.helper.escapeCharactersCallback); // parse multi column tables text = text.replace(tableRgx, parseTable); // parse one column tables text = text.replace(singeColTblRgx, parseTable); text = globals.converter._dispatch('tables.after', text, options, globals); return text; }); showdown.subParser('underline', function (text, options, globals) { 'use strict'; if (!options.underline) { return text; } text = globals.converter._dispatch('underline.before', text, options, globals); if (options.literalMidWordUnderscores) { text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { return '' + txt + ''; }); text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { return '' + txt + ''; }); } else { text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) { return (/\S$/.test(m)) ? '' + m + '' : wm; }); text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) { return (/\S$/.test(m)) ? '' + m + '' : wm; }); } // escape remaining underscores to prevent them being parsed by italic and bold text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback); text = globals.converter._dispatch('underline.after', text, options, globals); return text; }); /** * Swap back in all the special characters we've hidden. */ showdown.subParser('unescapeSpecialChars', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals); text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) { var charCodeToReplace = parseInt(m1); return String.fromCharCode(charCodeToReplace); }); text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals); return text; }); showdown.subParser('makeMarkdown.blockquote', function (node, globals) { 'use strict'; var txt = ''; if (node.hasChildNodes()) { var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals); if (innerTxt === '') { continue; } txt += innerTxt; } } // cleanup txt = txt.trim(); txt = '> ' + txt.split('\n').join('\n> '); return txt; }); showdown.subParser('makeMarkdown.codeBlock', function (node, globals) { 'use strict'; var lang = node.getAttribute('language'), num = node.getAttribute('precodenum'); return '```' + lang + '\n' + globals.preList[num] + '\n```'; }); showdown.subParser('makeMarkdown.codeSpan', function (node) { 'use strict'; return '`' + node.innerHTML + '`'; }); showdown.subParser('makeMarkdown.emphasis', function (node, globals) { 'use strict'; var txt = ''; if (node.hasChildNodes()) { txt += '*'; var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals); } txt += '*'; } return txt; }); showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) { 'use strict'; var headerMark = new Array(headerLevel + 1).join('#'), txt = ''; if (node.hasChildNodes()) { txt = headerMark + ' '; var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals); } } return txt; }); showdown.subParser('makeMarkdown.hr', function () { 'use strict'; return '---'; }); showdown.subParser('makeMarkdown.image', function (node) { 'use strict'; var txt = ''; if (node.hasAttribute('src')) { txt += '![' + node.getAttribute('alt') + ']('; txt += '<' + node.getAttribute('src') + '>'; if (node.hasAttribute('width') && node.hasAttribute('height')) { txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height'); } if (node.hasAttribute('title')) { txt += ' "' + node.getAttribute('title') + '"'; } txt += ')'; } return txt; }); showdown.subParser('makeMarkdown.links', function (node, globals) { 'use strict'; var txt = ''; if (node.hasChildNodes() && node.hasAttribute('href')) { var children = node.childNodes, childrenLength = children.length; txt = '['; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals); } txt += ']('; txt += '<' + node.getAttribute('href') + '>'; if (node.hasAttribute('title')) { txt += ' "' + node.getAttribute('title') + '"'; } txt += ')'; } return txt; }); showdown.subParser('makeMarkdown.list', function (node, globals, type) { 'use strict'; var txt = ''; if (!node.hasChildNodes()) { return ''; } var listItems = node.childNodes, listItemsLenght = listItems.length, listNum = node.getAttribute('start') || 1; for (var i = 0; i < listItemsLenght; ++i) { if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') { continue; } // define the bullet to use in list var bullet = ''; if (type === 'ol') { bullet = listNum.toString() + '. '; } else { bullet = '- '; } // parse list item txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals); ++listNum; } // add comment at the end to prevent consecutive lists to be parsed as one txt += '\n\n'; return txt.trim(); }); showdown.subParser('makeMarkdown.listItem', function (node, globals) { 'use strict'; var listItemTxt = ''; var children = node.childNodes, childrenLenght = children.length; for (var i = 0; i < childrenLenght; ++i) { listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals); } // if it's only one liner, we need to add a newline at the end if (!/\n$/.test(listItemTxt)) { listItemTxt += '\n'; } else { // it's multiparagraph, so we need to indent listItemTxt = listItemTxt .split('\n') .join('\n ') .replace(/^ {4}$/gm, '') .replace(/\n\n+/g, '\n\n'); } return listItemTxt; }); showdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) { 'use strict'; spansOnly = spansOnly || false; var txt = ''; // edge case of text without wrapper paragraph if (node.nodeType === 3) { return showdown.subParser('makeMarkdown.txt')(node, globals); } // HTML comment if (node.nodeType === 8) { return '\n\n'; } // process only node elements if (node.nodeType !== 1) { return ''; } var tagName = node.tagName.toLowerCase(); switch (tagName) { // // BLOCKS // case 'h1': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\n\n'; } break; case 'h2': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\n\n'; } break; case 'h3': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\n\n'; } break; case 'h4': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\n\n'; } break; case 'h5': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\n\n'; } break; case 'h6': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\n\n'; } break; case 'p': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\n\n'; } break; case 'blockquote': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\n\n'; } break; case 'hr': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\n\n'; } break; case 'ol': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\n\n'; } break; case 'ul': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\n\n'; } break; case 'precode': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\n\n'; } break; case 'pre': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\n\n'; } break; case 'table': if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\n\n'; } break; // // SPANS // case 'code': txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals); break; case 'em': case 'i': txt = showdown.subParser('makeMarkdown.emphasis')(node, globals); break; case 'strong': case 'b': txt = showdown.subParser('makeMarkdown.strong')(node, globals); break; case 'del': txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals); break; case 'a': txt = showdown.subParser('makeMarkdown.links')(node, globals); break; case 'img': txt = showdown.subParser('makeMarkdown.image')(node, globals); break; default: txt = node.outerHTML + '\n\n'; } // common normalization // TODO eventually return txt; }); showdown.subParser('makeMarkdown.paragraph', function (node, globals) { 'use strict'; var txt = ''; if (node.hasChildNodes()) { var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals); } } // some text normalization txt = txt.trim(); return txt; }); showdown.subParser('makeMarkdown.pre', function (node, globals) { 'use strict'; var num = node.getAttribute('prenum'); return '
    ' + globals.preList[num] + '
    '; }); showdown.subParser('makeMarkdown.strikethrough', function (node, globals) { 'use strict'; var txt = ''; if (node.hasChildNodes()) { txt += '~~'; var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals); } txt += '~~'; } return txt; }); showdown.subParser('makeMarkdown.strong', function (node, globals) { 'use strict'; var txt = ''; if (node.hasChildNodes()) { txt += '**'; var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals); } txt += '**'; } return txt; }); showdown.subParser('makeMarkdown.table', function (node, globals) { 'use strict'; var txt = '', tableArray = [[], []], headings = node.querySelectorAll('thead>tr>th'), rows = node.querySelectorAll('tbody>tr'), i, ii; for (i = 0; i < headings.length; ++i) { var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals), allign = '---'; if (headings[i].hasAttribute('style')) { var style = headings[i].getAttribute('style').toLowerCase().replace(/\s/g, ''); switch (style) { case 'text-align:left;': allign = ':---'; break; case 'text-align:right;': allign = '---:'; break; case 'text-align:center;': allign = ':---:'; break; } } tableArray[0][i] = headContent.trim(); tableArray[1][i] = allign; } for (i = 0; i < rows.length; ++i) { var r = tableArray.push([]) - 1, cols = rows[i].getElementsByTagName('td'); for (ii = 0; ii < headings.length; ++ii) { var cellContent = ' '; if (typeof cols[ii] !== 'undefined') { cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals); } tableArray[r].push(cellContent); } } var cellSpacesCount = 3; for (i = 0; i < tableArray.length; ++i) { for (ii = 0; ii < tableArray[i].length; ++ii) { var strLen = tableArray[i][ii].length; if (strLen > cellSpacesCount) { cellSpacesCount = strLen; } } } for (i = 0; i < tableArray.length; ++i) { for (ii = 0; ii < tableArray[i].length; ++ii) { if (i === 1) { if (tableArray[i][ii].slice(-1) === ':') { tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':'; } else { tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-'); } } else { tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount); } } txt += '| ' + tableArray[i].join(' | ') + ' |\n'; } return txt.trim(); }); showdown.subParser('makeMarkdown.tableCell', function (node, globals) { 'use strict'; var txt = ''; if (!node.hasChildNodes()) { return ''; } var children = node.childNodes, childrenLength = children.length; for (var i = 0; i < childrenLength; ++i) { txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true); } return txt.trim(); }); showdown.subParser('makeMarkdown.txt', function (node) { 'use strict'; var txt = node.nodeValue; // multiple spaces are collapsed txt = txt.replace(/ +/g, ' '); // replace the custom ¨NBSP; with a space txt = txt.replace(/¨NBSP;/g, ' '); // ", <, > and & should replace escaped html entities txt = showdown.helper.unescapeHTMLEntities(txt); // escape markdown magic characters // emphasis, strong and strikethrough - can appear everywhere // we also escape pipe (|) because of tables // and escape ` because of code blocks and spans txt = txt.replace(/([\\*_~|`])/g, '\\$1'); // backport: escape escape characters! // escape > because of blockquotes txt = txt.replace(/^(\s*)>/g, '\\$1>'); // hash character, only troublesome at the beginning of a line because of headers txt = txt.replace(/^#/gm, '\\#'); // horizontal rules txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, '$1\\$2$3'); // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer txt = txt.replace(/^( {0,3}\d+)\./gm, '$1\\.'); // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped) txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\$2'); // images and links, ] followed by ( is problematic, so we escape it txt = txt.replace(/]([\s]*)\(/g, '\\]$1\\('); // reference URIs must also be escaped txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:'); return txt; }); var root = window; // AMD Loader if (typeof define === 'function' && define.amd) { define(function () { 'use strict'; return showdown; }); // CommonJS/nodeJS Loader } else if (typeof module !== 'undefined' && module.exports) { module.exports = showdown; // Regular Browser loader } else { root.showdown = showdown; } }).call(this); showdown.setOption("strikethrough", true); showdown.setOption("ghMentions", true); showdown.setOption("emoji", true); showdown.setOption("tables", false); showdown.setOption("simpleLineBreaks", true); showdown.setOption("simplifiedAutoLink", true); showdown.setOption("ghMentionsLink", "https://anilist.co/user/{u}/"); const converter = new showdown.Converter(); let makeHtml = function(markdown){ markdown = markdown.replace("----","---"); let centerSplit = markdown.split("~~~"); let imgRegex = /img(\d+%?)?\(http.+?\)/gi; centerSplit = centerSplit.map(component => { let images = component.match(imgRegex); if(images){ images.forEach(image => { let imageParts = image.match(/^img(\d+%?)?\((http.+?)\)$/i); component = component.replace(image,``) }) return component } else{ return component } }) let webmRegex = /webm\(http.+?\)/gi; centerSplit = centerSplit.map(component => { let webms = component.match(webmRegex); if(webms){ webms.forEach(webm => { let webmParts = webm.match(/^webm\((http.+?)\)$/i); component = component.replace(webm,``) }) return component } else{ return component } }) let youtubeRegex = /youtube\(.+?\)/gi; centerSplit = centerSplit.map(component => { let videos = component.match(youtubeRegex); if(videos){ videos.forEach(video => { let videoParts = video.match(/^youtube\((.+?)\)$/i); component = component.replace(video,`
    ${videoParts[1]}`) }) } return component }); let preProcessed = [centerSplit[0]]; let openCenter = false; for(let i=1;i"); } else{ preProcessed.push("
    "); } preProcessed.push(centerSplit[i]); openCenter = !openCenter } preProcessed = preProcessed.map(element => { if(/~!/.test(element) || /!~/.test(element)){ return element.replace(/~!/g,"").replace(/!~/g,""); } return element }) return converter.makeHtml(preProcessed.join("")) } function returnList(list,skipProcessing){ if(!list){ return null }; let retl = []; list.data.MediaListCollection.lists.forEach(mediaList => { mediaList.entries.forEach(entry => { if(!skipProcessing){ entry.isCustomList = mediaList.isCustomList; if(entry.isCustomList){ entry.listLocations = [mediaList.name] } else{ entry.listLocations = [] }; entry.scoreRaw = Math.min(entry.scoreRaw,100); if(!entry.media.episodes && entry.media.nextAiringEpisode){ entry.media.episodes = entry.media.nextAiringEpisode.episode - 1 } if(entry.notes){ entry.listJSON = parseListJSON(entry.notes) }; if(entry.media.a){ entry.media.staff = removeGroupedDuplicates( entry.media.a.nodes.concat( entry.media.b.nodes ), e => e.id ); delete entry.media.a; delete entry.media.b; } if(entry.repeat > 10000){//counting eps as repeat, 10x One Piece as the plausibility baseline entry.repeat = 0 } if(entry.status === "REPEATING" && entry.repeat === 0){ entry.repeat = 1 } }; retl.push(entry); }) }) return removeGroupedDuplicates( retl, e => e.mediaId, (oldElement,newElement) => { if(!skipProcessing){ newElement.listLocations = newElement.listLocations.concat(oldElement.listLocations); newElement.isCustomList = oldElement.isCustomList || newElement.isCustomList; } } ) }; function parseListJSON(listNote){ if(!listNote){ return null }; let commandMatches = listNote.match(/\$({.*})\$/); if(commandMatches){ try{ let noteContent = JSON.parse(commandMatches[1]); noteContent.adjustValue = noteContent.adjust || 0; let rangeParser = function(thing){ if(typeof thing === "number"){ return 1 } else if(typeof thing === "string"){ thing = thing.split(",").map(a => a.trim()) }; return thing.reduce(function(acc,item){ if(typeof item === "number"){ return acc + 1 }; let multiplierPresent = item.split("x").map(a => a.trim()); let value = 1; let rangePresent = multiplierPresent[0].split("-").map(a => a.trim()); if(rangePresent.length === 2){//range let minRange = parseFloat(rangePresent[0]); let maxRange = parseFloat(rangePresent[1]); if(minRange && maxRange){ value = maxRange - minRange + 1 } } if(multiplierPresent.length === 1){//no multiplier return acc + value } if(multiplierPresent.length === 2){//possible multiplier let multiplier = parseFloat(multiplierPresent[1]); if(multiplier || multiplier === 0){ return acc + value*multiplier } else{ return acc + 1 } } else{//unparsable return acc + 1 } },0); }; if(noteContent.more){ noteContent.adjustValue += rangeParser(noteContent.more) }; if(noteContent.skip){ noteContent.adjustValue -= rangeParser(noteContent.skip) }; return noteContent; } catch(e){ console.warn("Unable to parse JSON in list note",commandMatches) } } else{ return null } }; function formatCompat(compatData,targetLocation,name){ let differenceSpan = create("span",false,compatData.difference.roundPlaces(3)); if(compatData.difference < 0.9){ differenceSpan.style.color = "green" } else if(compatData.difference > 1.1){ differenceSpan.style.color = "red" }; targetLocation.innerText = ""; targetLocation.appendChild(differenceSpan); let countSpan = create("span",false," based on " + compatData.shared + " shared entries. Lower is better. 0.8 - 1.1 is common\nFormally, this is 'standard deviation between normalized ratings'",targetLocation); let canvas = create("canvas",false,false,targetLocation,"display:block;"); canvas.title = "Blue = " + name + "\nRed = you"; canvas.width = 200; canvas.height = 100; let r1 = Math.sqrt(compatData.list1/(compatData.list1 + compatData.list2)); let r2 = Math.sqrt(compatData.list2/(compatData.list1 + compatData.list2)); let distance; if(compatData.shared === compatData.list1 || compatData.shared === compatData.list2){ distance = Math.abs(r1 - r2) } else if(compatData.shared === 0){ distance = r1 + r2 } else{ let areaOfIntersection = function(d,r0,r1){ let rr0 = r0 * r0; let rr1 = r1 * r1; let phi = (Math.acos((rr0 + (d * d) - rr1) / (2 * r0 * d))) * 2; let theta = (Math.acos((rr1 + (d * d) - rr0) / (2 * r1 * d))) * 2; let area1 = (theta * rr1 - rr1 * Math.sin(theta))/2; let area2 = (phi * rr0 - rr0 * Math.sin(phi))/2; return area1 + area2; }; let overlapArea = Math.PI*compatData.shared/(compatData.list1 + compatData.list2); let pivot0 = Math.abs(r1 - r2); let pivot1 = r1 + r2; while(pivot1 - pivot0 > (r1 + r2)/100){ distance = (pivot0 + pivot1)/2; if(areaOfIntersection(distance,r1,r2) > overlapArea){ pivot0 = distance } else{ pivot1 = distance } } } let ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.fillStyle = "rgb(61,180,242)"; ctx.arc(50,50,50*r1,0,2*Math.PI); ctx.fill(); ctx.beginPath(); ctx.fillStyle = "rgb(250,122,122)"; ctx.arc(50 + 50*distance,50,50*r2,0,2*Math.PI); ctx.fill(); ctx.beginPath(); ctx.fillStyle = "rgb(61,180,242,0.5)"; ctx.arc(50,50,50*r1,0,2*Math.PI); ctx.fill(); } function compatCheck(list,name,type,callback){ const variables = { name: name, listType: type }; generalAPIcall(queryMediaListCompat,variables,function(data){ list.sort((a,b) => a.mediaId - b.mediaId); let list2 = returnList(data).filter(element => element.scoreRaw); let list3 = []; let indeks1 = 0; let indeks2 = 0; while(indeks1 < list.length && indeks2 < list2.length){ if(list2[indeks2].mediaId > list[indeks1].mediaId){ indeks1++; continue }; if(list2[indeks2].mediaId < list[indeks1].mediaId){ indeks2++; continue }; if(list2[indeks2].mediaId === list[indeks1].mediaId){ list3.push({ mediaId: list[indeks1].mediaId, score1: list[indeks1].scoreRaw, score2: list2[indeks2].scoreRaw }); indeks1++; indeks2++ } }; let average1 = 0; let average2 = 0; list3.forEach(item => { average1 += item.score1; average2 += item.score2; item.sdiff = item.score1 - item.score2 }); average1 = average1/list3.length; average2 = average2/list3.length; let standev1 = 0; let standev2 = 0; list3.forEach(item => { standev1 += Math.pow(item.score1 - average1,2); standev2 += Math.pow(item.score2 - average2,2) }); standev1 = Math.sqrt(standev1/(list3.length - 1)); standev2 = Math.sqrt(standev2/(list3.length - 1)); let difference = 0; list3.forEach(item => { difference += Math.abs( (item.score1 - average1)/standev1 - (item.score2 - average2)/standev2 ) }); difference = difference/list3.length; callback({ difference: difference, shared: list3.length, list1: list.length, list2: list2.length, user: name }) }) } //used by the stats module, and to safeguard the manga chapter guesses //publishing manga is a bit tricky, since Anilist doesn't track chapters const commonUnfinishedManga = { "30002":{ "chapters":363, "volumes":40, "comment":"berserk" }, "30013":{ "chapters":1034, "volumes":101, "comment":"one piece" }, "85486":{ "chapters":336, "volumes":32, "comment":"mha" }, "74347":{ "chapters":152, "volumes":24, "comment":"opm" }, "30026":{ "chapters":390, "volumes":36, "comment":"HxH" }, "30656":{ "chapters":327, "volumes":37, "comment":"vagabond" }, "30105":{ "chapters":106, "volumes":14, "comment":"yotsuba&" }, "105398":{ "chapters":173, "volumes":4, "comment":"solo leveling" }, "86635":{ "chapters":246, "volumes":23, "comment":"kaguya" }, "101517":{ "chapters":167, "volumes":17, "comment":"juju" }, "97852":{ "chapters":333, "volumes":23, "comment":"komi" }, "102988":{ "chapters":233, "volumes":24, "comment":"revengers" } } if(NOW() - new Date(2021,11,5) > 365*24*60*60*1000){ console.log("remind hoh to update the commonUnfinishedManga list") } function uniqueBy(a,key){ let seen = new Set(); return a.filter(item => { let k = key(item); return seen.has(k) ? false : seen.add(k) }) } //idea by GoBusto: https://gitlab.com/gobusto/unicodifier function emojiSanitize(string){ return Array.from(string).map(char => { let codePoint = char.codePointAt(0); if(codePoint > 0xFFFF){ return "&#" + codePoint + ";" } return char }).join("") } function looseMatcher(string,searcher){ return string.toLowerCase().includes(searcher.toLowerCase()) || RegExp(searcher,"i").test(string.toLowerCase()) } function cheapReload(linkElement,vueData){ linkElement.onclick = function(){ try{ document.getElementById('app').__vue__._router.push(vueData); return false } catch(e){ console.warn("vue routes are outdated!") } } } //end "utilities.js" /*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.DOMPurify = factory()); }(window, function () { 'use strict'; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var hasOwnProperty = Object.hasOwnProperty, setPrototypeOf = Object.setPrototypeOf, isFrozen = Object.isFrozen, getPrototypeOf = Object.getPrototypeOf, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var freeze = Object.freeze, seal = Object.seal, create = Object.create; // eslint-disable-line import/no-mutable-exports var _ref = typeof Reflect !== 'undefined' && Reflect, apply = _ref.apply, construct = _ref.construct; if (!apply) { apply = function apply(fun, thisValue, args) { return fun.apply(thisValue, args); }; } if (!freeze) { freeze = function freeze(x) { return x; }; } if (!seal) { seal = function seal(x) { return x; }; } if (!construct) { construct = function construct(Func, args) { return new (Function.prototype.bind.apply(Func, [null].concat(_toConsumableArray(args))))(); }; } var arrayForEach = unapply(Array.prototype.forEach); var arrayPop = unapply(Array.prototype.pop); var arrayPush = unapply(Array.prototype.push); var stringToLowerCase = unapply(String.prototype.toLowerCase); var stringMatch = unapply(String.prototype.match); var stringReplace = unapply(String.prototype.replace); var stringIndexOf = unapply(String.prototype.indexOf); var stringTrim = unapply(String.prototype.trim); var regExpTest = unapply(RegExp.prototype.test); var typeErrorCreate = unconstruct(TypeError); function unapply(func) { return function (thisArg) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return apply(func, thisArg, args); }; } function unconstruct(func) { return function () { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return construct(func, args); }; } /* Add properties to a lookup table */ function addToSet(set, array) { if (setPrototypeOf) { // Make 'in' and truthy checks like Boolean(set.constructor) // independent of any properties defined on Object.prototype. // Prevent prototype setters from intercepting set as a this value. setPrototypeOf(set, null); } var l = array.length; while (l--) { var element = array[l]; if (typeof element === 'string') { var lcElement = stringToLowerCase(element); if (lcElement !== element) { // Config presets (e.g. tags.js, attrs.js) are immutable. if (!isFrozen(array)) { array[l] = lcElement; } element = lcElement; } } set[element] = true; } return set; } /* Shallow clone an object */ function clone(object) { var newObject = create(null); var property = void 0; for (property in object) { if (apply(hasOwnProperty, object, [property])) { newObject[property] = object[property]; } } return newObject; } /* IE10 doesn't support __lookupGetter__ so lets' * simulate it. It also automatically checks * if the prop is function or getter and behaves * accordingly. */ function lookupGetter(object, prop) { while (object !== null) { var desc = getOwnPropertyDescriptor(object, prop); if (desc) { if (desc.get) { return unapply(desc.get); } if (typeof desc.value === 'function') { return unapply(desc.value); } } object = getPrototypeOf(object); } function fallbackValue(element) { console.warn('fallback value for', element); return null; } return fallbackValue; } var html = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG var svg = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']); var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default. // We still need to know them so that we can do namespace // checks properly in case one wants to add them to // allow-list. var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'feimage', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']); var mathMl = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements, // even those that we disallow by default. var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']); var text = freeze(['#text']); var html$1 = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']); var svg$1 = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']); var mathMl$1 = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']); var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']); // eslint-disable-next-line unicorn/better-regex var MUSTACHE_EXPR = seal(/\{\{[\s\S]*|[\s\S]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode var ERB_EXPR = seal(/<%[\s\S]*|[\s\S]*%>/gm); var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); // eslint-disable-line no-useless-escape var ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape ); var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex ); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var getGlobal = function getGlobal() { return typeof window === 'undefined' ? null : window; }; /** * Creates a no-op policy for internal use only. * Don't export this function outside this module! * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory. * @param {Document} document The document object (to determine policy name suffix) * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types * are not supported). */ var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) { if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') { return null; } // Allow the callers to control the unique policy name // by adding a data-tt-policy-suffix to the script element with the DOMPurify. // Policy creation with duplicate names throws in Trusted Types. var suffix = null; var ATTR_NAME = 'data-tt-policy-suffix'; if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) { suffix = document.currentScript.getAttribute(ATTR_NAME); } var policyName = 'dompurify' + (suffix ? '#' + suffix : ''); try { return trustedTypes.createPolicy(policyName, { createHTML: function createHTML(html$$1) { return html$$1; } }); } catch (_) { // Policy creation failed (most likely another DOMPurify script has // already run). Skip creating the policy, as this will only cause errors // if TT are enforced. console.warn('TrustedTypes policy ' + policyName + ' could not be created.'); return null; } }; function createDOMPurify() { var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal(); var DOMPurify = function DOMPurify(root) { return createDOMPurify(root); }; /** * Version label, exposed for easier checks * if DOMPurify is up to date or not */ DOMPurify.version = '2.3.1'; /** * Array of elements that DOMPurify removed during sanitation. * Empty if nothing was removed. */ DOMPurify.removed = []; if (!window || !window.document || window.document.nodeType !== 9) { // Not running in a browser, provide a factory function // so that you can pass your own Window DOMPurify.isSupported = false; return DOMPurify; } var originalDocument = window.document; var document = window.document; var DocumentFragment = window.DocumentFragment, HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter, _window$NamedNodeMap = window.NamedNodeMap, NamedNodeMap = _window$NamedNodeMap === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap, Text = window.Text, Comment = window.Comment, DOMParser = window.DOMParser, trustedTypes = window.trustedTypes; var ElementPrototype = Element.prototype; var cloneNode = lookupGetter(ElementPrototype, 'cloneNode'); var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling'); var getChildNodes = lookupGetter(ElementPrototype, 'childNodes'); var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a // new document created via createHTMLDocument. As per the spec // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries) // a new empty registry is used when creating a template contents owner // document, so we use that as our parent document to ensure nothing // is inherited. if (typeof HTMLTemplateElement === 'function') { var template = document.createElement('template'); if (template.content && template.content.ownerDocument) { document = template.content.ownerDocument; } } var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument); var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : ''; var _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName; var importNode = originalDocument.importNode; var documentMode = {}; try { documentMode = clone(document).documentMode ? document.documentMode : {}; } catch (_) {} var hooks = {}; /** * Expose whether this browser supports running the full DOMPurify. */ DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9; var MUSTACHE_EXPR$$1 = MUSTACHE_EXPR, ERB_EXPR$$1 = ERB_EXPR, DATA_ATTR$$1 = DATA_ATTR, ARIA_ATTR$$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$$1 = ATTR_WHITESPACE; var IS_ALLOWED_URI$$1 = IS_ALLOWED_URI; /** * We consider the elements and attributes below to be safe. Ideally * don't add any new ones but feel free to remove unwanted ones. */ /* allowed element names */ var ALLOWED_TAGS = null; var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text))); /* Allowed attribute names */ var ALLOWED_ATTR = null; var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml))); /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */ var FORBID_TAGS = null; /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */ var FORBID_ATTR = null; /* Decide if ARIA attributes are okay */ var ALLOW_ARIA_ATTR = true; /* Decide if custom data attributes are okay */ var ALLOW_DATA_ATTR = true; /* Decide if unknown protocols are okay */ var ALLOW_UNKNOWN_PROTOCOLS = false; /* Output should be safe for common template engines. * This means, DOMPurify removes data attributes, mustaches and ERB */ var SAFE_FOR_TEMPLATES = false; /* Decide if document with ... should be returned */ var WHOLE_DOCUMENT = false; /* Track whether config is already set on this instance of DOMPurify. */ var SET_CONFIG = false; /* Decide if all elements (e.g. style, script) must be children of * document.body. By default, browsers might move them to document.head */ var FORCE_BODY = false; /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html * string (or a TrustedHTML object if Trusted Types are supported). * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead */ var RETURN_DOM = false; /* Decide if a DOM `DocumentFragment` should be returned, instead of a html * string (or a TrustedHTML object if Trusted Types are supported) */ var RETURN_DOM_FRAGMENT = false; /* If `RETURN_DOM` or `RETURN_DOM_FRAGMENT` is enabled, decide if the returned DOM * `Node` is imported into the current `Document`. If this flag is not enabled the * `Node` will belong (its ownerDocument) to a fresh `HTMLDocument`, created by * DOMPurify. * * This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false` * might cause XSS from attacks hidden in closed shadowroots in case the browser * supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/ */ var RETURN_DOM_IMPORT = true; /* Try to return a Trusted Type object instead of a string, return a string in * case Trusted Types are not supported */ var RETURN_TRUSTED_TYPE = false; /* Output should be free from DOM clobbering attacks? */ var SANITIZE_DOM = true; /* Keep element content when removing element? */ var KEEP_CONTENT = true; /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead * of importing it into a new Document and returning a sanitized copy */ var IN_PLACE = false; /* Allow usage of profiles like html, svg and mathMl */ var USE_PROFILES = {}; /* Tags to ignore content of when KEEP_CONTENT is true */ var FORBID_CONTENTS = null; var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']); /* Tags that are safe for data: URIs */ var DATA_URI_TAGS = null; var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']); /* Attributes safe for values like "javascript:" */ var URI_SAFE_ATTRIBUTES = null; var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']); var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; /* Document namespace */ var NAMESPACE = HTML_NAMESPACE; var IS_EMPTY_INPUT = false; /* Keep a reference to config to pass to hooks */ var CONFIG = null; /* Ideally, do not touch anything below this line */ /* ______________________________________________ */ var formElement = document.createElement('form'); /** * _parseConfig * * @param {Object} cfg optional config literal */ // eslint-disable-next-line complexity var _parseConfig = function _parseConfig(cfg) { if (CONFIG && CONFIG === cfg) { return; } /* Shield configuration object from tampering */ if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') { cfg = {}; } /* Shield configuration object from prototype pollution */ cfg = clone(cfg); /* Set configuration parameters */ ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS; ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR; URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES; DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS; FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS; FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {}; FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {}; USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false; ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false RETURN_DOM = cfg.RETURN_DOM || false; // Default false RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false RETURN_DOM_IMPORT = cfg.RETURN_DOM_IMPORT !== false; // Default true RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false FORCE_BODY = cfg.FORCE_BODY || false; // Default false SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true IN_PLACE = cfg.IN_PLACE || false; // Default false IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1; NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE; if (SAFE_FOR_TEMPLATES) { ALLOW_DATA_ATTR = false; } if (RETURN_DOM_FRAGMENT) { RETURN_DOM = true; } /* Parse profile info */ if (USE_PROFILES) { ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text))); ALLOWED_ATTR = []; if (USE_PROFILES.html === true) { addToSet(ALLOWED_TAGS, html); addToSet(ALLOWED_ATTR, html$1); } if (USE_PROFILES.svg === true) { addToSet(ALLOWED_TAGS, svg); addToSet(ALLOWED_ATTR, svg$1); addToSet(ALLOWED_ATTR, xml); } if (USE_PROFILES.svgFilters === true) { addToSet(ALLOWED_TAGS, svgFilters); addToSet(ALLOWED_ATTR, svg$1); addToSet(ALLOWED_ATTR, xml); } if (USE_PROFILES.mathMl === true) { addToSet(ALLOWED_TAGS, mathMl); addToSet(ALLOWED_ATTR, mathMl$1); addToSet(ALLOWED_ATTR, xml); } } /* Merge configuration parameters */ if (cfg.ADD_TAGS) { if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) { ALLOWED_TAGS = clone(ALLOWED_TAGS); } addToSet(ALLOWED_TAGS, cfg.ADD_TAGS); } if (cfg.ADD_ATTR) { if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) { ALLOWED_ATTR = clone(ALLOWED_ATTR); } addToSet(ALLOWED_ATTR, cfg.ADD_ATTR); } if (cfg.ADD_URI_SAFE_ATTR) { addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR); } if (cfg.FORBID_CONTENTS) { if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) { FORBID_CONTENTS = clone(FORBID_CONTENTS); } addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS); } /* Add #text in case KEEP_CONTENT is set to true */ if (KEEP_CONTENT) { ALLOWED_TAGS['#text'] = true; } /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */ if (WHOLE_DOCUMENT) { addToSet(ALLOWED_TAGS, ['html', 'head', 'body']); } /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */ if (ALLOWED_TAGS.table) { addToSet(ALLOWED_TAGS, ['tbody']); delete FORBID_TAGS.tbody; } // Prevent further manipulation of configuration. // Not available in IE8, Safari 5, etc. if (freeze) { freeze(cfg); } CONFIG = cfg; }; var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']); var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); /* Keep track of all possible SVG and MathML tags * so that we can perform the namespace checks * correctly. */ var ALL_SVG_TAGS = addToSet({}, svg); addToSet(ALL_SVG_TAGS, svgFilters); addToSet(ALL_SVG_TAGS, svgDisallowed); var ALL_MATHML_TAGS = addToSet({}, mathMl); addToSet(ALL_MATHML_TAGS, mathMlDisallowed); /** * * * @param {Element} element a DOM element whose namespace is being checked * @returns {boolean} Return false if the element has a * namespace that a spec-compliant parser would never * return. Return true otherwise. */ var _checkValidNamespace = function _checkValidNamespace(element) { var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode // can be null. We just simulate parent in this case. if (!parent || !parent.tagName) { parent = { namespaceURI: HTML_NAMESPACE, tagName: 'template' }; } var tagName = stringToLowerCase(element.tagName); var parentTagName = stringToLowerCase(parent.tagName); if (element.namespaceURI === SVG_NAMESPACE) { // The only way to switch from HTML namespace to SVG // is via . If it happens via any other tag, then // it should be killed. if (parent.namespaceURI === HTML_NAMESPACE) { return tagName === 'svg'; } // The only way to switch from MathML to SVG is via // svg if parent is either or MathML // text integration points. if (parent.namespaceURI === MATHML_NAMESPACE) { return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]); } // We only allow elements that are defined in SVG // spec. All others are disallowed in SVG namespace. return Boolean(ALL_SVG_TAGS[tagName]); } if (element.namespaceURI === MATHML_NAMESPACE) { // The only way to switch from HTML namespace to MathML // is via . If it happens via any other tag, then // it should be killed. if (parent.namespaceURI === HTML_NAMESPACE) { return tagName === 'math'; } // The only way to switch from SVG to MathML is via // and HTML integration points if (parent.namespaceURI === SVG_NAMESPACE) { return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName]; } // We only allow elements that are defined in MathML // spec. All others are disallowed in MathML namespace. return Boolean(ALL_MATHML_TAGS[tagName]); } if (element.namespaceURI === HTML_NAMESPACE) { // The only way to switch from SVG to HTML is via // HTML integration points, and from MathML to HTML // is via MathML text integration points if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) { return false; } if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) { return false; } // Certain elements are allowed in both SVG and HTML // namespace. We need to specify them explicitly // so that they don't get erronously deleted from // HTML namespace. var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']); // We disallow tags that are specific for MathML // or SVG and should never appear in HTML namespace return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]); } // The code should never reach this place (this means // that the element somehow got namespace that is not // HTML, SVG or MathML). Return false just in case. return false; }; /** * _forceRemove * * @param {Node} node a DOM node */ var _forceRemove = function _forceRemove(node) { arrayPush(DOMPurify.removed, { element: node }); try { // eslint-disable-next-line unicorn/prefer-dom-node-remove node.parentNode.removeChild(node); } catch (_) { try { node.outerHTML = emptyHTML; } catch (_) { node.remove(); } } }; /** * _removeAttribute * * @param {String} name an Attribute name * @param {Node} node a DOM node */ var _removeAttribute = function _removeAttribute(name, node) { try { arrayPush(DOMPurify.removed, { attribute: node.getAttributeNode(name), from: node }); } catch (_) { arrayPush(DOMPurify.removed, { attribute: null, from: node }); } node.removeAttribute(name); // We void attribute values for unremovable "is"" attributes if (name === 'is' && !ALLOWED_ATTR[name]) { if (RETURN_DOM || RETURN_DOM_FRAGMENT) { try { _forceRemove(node); } catch (_) {} } else { try { node.setAttribute(name, ''); } catch (_) {} } } }; /** * _initDocument * * @param {String} dirty a string of dirty markup * @return {Document} a DOM, filled with the dirty markup */ var _initDocument = function _initDocument(dirty) { /* Create a HTML document */ var doc = void 0; var leadingWhitespace = void 0; if (FORCE_BODY) { dirty = '' + dirty; } else { /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */ var matches = stringMatch(dirty, /^[\r\n\t ]+/); leadingWhitespace = matches && matches[0]; } var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty; /* * Use the DOMParser API by default, fallback later if needs be * DOMParser not work for svg when has multiple root element. */ if (NAMESPACE === HTML_NAMESPACE) { try { doc = new DOMParser().parseFromString(dirtyPayload, 'text/html'); } catch (_) {} } /* Use createHTMLDocument in case DOMParser is not available */ if (!doc || !doc.documentElement) { doc = implementation.createDocument(NAMESPACE, 'template', null); try { doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload; } catch (_) { // Syntax error if dirtyPayload is invalid xml } } var body = doc.body || doc.documentElement; if (dirty && leadingWhitespace) { body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null); } /* Work on whole document or just its body */ if (NAMESPACE === HTML_NAMESPACE) { return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0]; } return WHOLE_DOCUMENT ? doc.documentElement : body; }; /** * _createIterator * * @param {Document} root document/fragment to create iterator for * @return {Iterator} iterator instance */ var _createIterator = function _createIterator(root) { return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false); }; /** * _isClobbered * * @param {Node} elm element to check for clobbering attacks * @return {Boolean} true if clobbered, false if safe */ var _isClobbered = function _isClobbered(elm) { if (elm instanceof Text || elm instanceof Comment) { return false; } if (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function') { return true; } return false; }; /** * _isNode * * @param {Node} obj object to check whether it's a DOM node * @return {Boolean} true is object is a DOM node */ var _isNode = function _isNode(object) { return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'; }; /** * _executeHook * Execute user configurable hooks * * @param {String} entryPoint Name of the hook's entry point * @param {Node} currentNode node to work on with the hook * @param {Object} data additional hook parameters */ var _executeHook = function _executeHook(entryPoint, currentNode, data) { if (!hooks[entryPoint]) { return; } arrayForEach(hooks[entryPoint], function (hook) { hook.call(DOMPurify, currentNode, data, CONFIG); }); }; /** * _sanitizeElements * * @protect nodeName * @protect textContent * @protect removeChild * * @param {Node} currentNode to check for permission to exist * @return {Boolean} true if node was killed, false if left alive */ var _sanitizeElements = function _sanitizeElements(currentNode) { var content = void 0; /* Execute a hook if present */ _executeHook('beforeSanitizeElements', currentNode, null); /* Check if element is clobbered or can clobber */ if (_isClobbered(currentNode)) { _forceRemove(currentNode); return true; } /* Check if tagname contains Unicode */ if (stringMatch(currentNode.nodeName, /[\u0080-\uFFFF]/)) { _forceRemove(currentNode); return true; } /* Now let's check the element's type and name */ var tagName = stringToLowerCase(currentNode.nodeName); /* Execute a hook if present */ _executeHook('uponSanitizeElement', currentNode, { tagName: tagName, allowedTags: ALLOWED_TAGS }); /* Detect mXSS attempts abusing namespace confusion */ if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) { _forceRemove(currentNode); return true; } /* Mitigate a problem with templates inside select */ if (tagName === 'select' && regExpTest(/

    " + activity.text.replace(/\n\n/g,"

    ") + "

    ";//workaround for API bug if(useScripts.termsFeedNoImages){ let imgCount = 0; let webmCount = 0; let imgText = activity.text.replace(//g,img => { let link = img.match(//)[2]; imgCount++; return "[" + (link.length > 200 ? link.slice(0,200) + "…" : link) + "]" }).replace(//g,video => { let link = video.match(/src=("|')(.*?)("|')/)[2]; webmCount++; return "[" + (link.length > 200 ? link.slice(0,200) + "…" : link) + "]" }) status.innerHTML = DOMPurify.sanitize(imgText);//reason for inner HTML: preparsed sanitized HTML from the Anilist API if(imgText !== activity.text){ let render = create("a",false,"IMG",act,"position:absolute;top:2px;right:20px;cursor:pointer;"); render.title = "load images"; if(imgCount === 0 && webmCount){ render.innerText = "WebM"; render.title = "load webms" } else if(imgCount && webmCount){ render.innerText = "IMG+WebM"; render.title = "load images and webms" } render.onclick = () => { activity.renderingPermission = true; status.innerHTML = DOMPurify.sanitize(activity.text);//reason for inner HTML: preparsed sanitized HTML from the Anilist API render.style.display = "none" } } } else{ status.innerHTML = DOMPurify.sanitize(activity.text);//reason for inner HTML: preparsed sanitized HTML from the Anilist API } Array.from(status.querySelectorAll(".youtube")).forEach(ytLink => { create("a",["link","newTab"],ytLink.id,ytLink) .href = ytLink.id }); if(activity.user.name === whoAmI && (activity.type === "TEXT" || activity.type === "MESSAGE") && type !== "thread"){ let edit = create("a",false,translate("$button_edit"),act,"position:absolute;top:2px;right:40px;width:10px;cursor:pointer;font-size:small;color:inherit;"); if(useScripts.termsFeedNoImages){ edit.style.right = "80px" } edit.onclick = function(){ loading.innerText = "Loading activity " + activity.id + "..."; if(terms.scrollIntoView){ terms.scrollIntoView({"behavior": "smooth","block": "start"}) } else{ document.body.scrollTop = document.documentElement.scrollTop = 0 }; if(activity.type === "MESSAGE"){ authAPIcall( `query($id: Int){ Activity(id: $id){ ... on MessageActivity{ text:message(asHtml: false) } } }`, {id: activity.id}, data => { if(!data){ onlySpecificActivity = false; loading.innerText = "Failed to load message"; } inputArea.focus(); onlySpecificActivity = activity.id; loading.innerText = "Editing message " + activity.id; inputArea.value = data.data.Activity.text; } ) } else{ authAPIcall( `query($id: Int){ Activity(id: $id){ ... on TextActivity{ text(asHtml: false) } } }`, {id: activity.id}, data => { if(!data){ onlySpecificActivity = false; loading.innerText = "Failed to load activity"; } inputArea.focus(); onlySpecificActivity = activity.id; loading.innerText = "Editing activity " + activity.id; inputArea.value = data.data.Activity.text; } ) } } } act.classList.add("text"); actions.style.right = "21px"; actions.style.bottom = "4px"; } else{ status = create("span",false," " + activity.status + " ",content); if(activity.progress){ status.innerText += " " + activity.progress + " of " }; if(activity.media.type === "MANGA"){ if(activity.status === "read chapter" && activity.progress){ status.innerText = " " + translate("$listActivity_MreadChapter",activity.progress) } else if(activity.status === "reread chapter" && activity.progress){ status.innerText = " " + translate("$listActivity_MrepeatingManga",activity.progress) } else if(activity.status === "dropped" && activity.progress){ status.innerText = " " + translate("$listActivity_MdroppedManga",activity.progress) } else if(activity.status === "dropped"){ status.innerText = " " + translate("$listActivity_droppedManga") } else if(activity.status === "completed"){ status.innerText = " " + translate("$listActivity_completedManga") } else if(activity.status === "plans to read"){ status.innerText = " " + translate("$listActivity_planningManga") } else if(activity.status === "paused reading"){ status.innerText = " " + translate("$listActivity_pausedManga") } else{ console.warn("Missing listActivity translation key for:",activity.status) } } else{ if(activity.status === "watched episode" && activity.progress){ status.innerText = " " + translate("$listActivity_MwatchedEpisode",activity.progress) } else if(activity.status === "rewatched episode" && activity.progress){ status.innerText = " " + translate("$listActivity_MrepeatingAnime",activity.progress) } else if(activity.status === "dropped" && activity.progress){ status.innerText = " " + translate("$listActivity_MdroppedAnime",activity.progress) } else if(activity.status === "dropped"){ status.innerText = " " + translate("$listActivity_droppedAnime") } else if(activity.status === "completed"){ status.innerText = " " + translate("$listActivity_completedAnime") } else if(activity.status === "plans to watch"){ status.innerText = " " + translate("$listActivity_planningAnime") } else if(activity.status === "paused watching"){ status.innerText = " " + translate("$listActivity_pausedAnime") } else{ console.warn("Missing listActivity translation key for:",activity.status) } } let title = activity.media.title.romaji; if(useScripts.titleLanguage === "NATIVE" && activity.media.title.native){ title = activity.media.title.native } else if(useScripts.titleLanguage === "ENGLISH" && activity.media.title.english){ title = activity.media.title.english }; dataMedia.add(title); title = titlePicker(activity.media); let media = create("a",["link","newTab"],title,content); media.href = "/" + activity.media.type.toLowerCase() + "/" + activity.media.id + "/" + safeURL(title) + "/"; if(activity.media.type === "MANGA" && useScripts.CSSgreenManga){ media.style.color = "rgb(var(--color-green))" }; act.classList.add("list"); actions.style.right = "21px"; actions.style.top = "2px"; if(useScripts.statusBorder){ let blockerMap = { "plans": "PLANNING", "watched": "CURRENT", "read": "CURRENT", "completed": "COMPLETED", "paused": "PAUSED", "dropped": "DROPPED", "rewatched": "REPEATING", "reread": "REPEATING" }; let status = blockerMap[ Object.keys(blockerMap).find( key => activity.status.includes(key) ) ] if(status === "CURRENT"){ //nothing } else if(status === "COMPLETED"){ act.style.borderLeftWidth = "3px"; act.style.marginLeft = "-2px"; if(useScripts.CSSgreenManga && activity.media.type === "ANIME"){ act.style.borderLeftColor = "rgb(var(--color-blue))"; } else{ act.style.borderLeftColor = "rgb(var(--color-green))"; } } else{ act.style.borderLeftWidth = "3px"; act.style.marginLeft = "-2px"; act.style.borderLeftColor = distributionColours[status] } } }; let link = create("a",["link","newTab"],false,act,"position:absolute;top:2px;right:4px;width:10px;"); link.appendChild(svgAssets2.link.cloneNode(true)); if(type === "thread"){ link.href = "https://anilist.co/forum/thread/" + activity.id + "/" } else{ link.href = "https://anilist.co/" + type + "/" + activity.id + "/" } if(activity.user.name === whoAmI){ let deleteActivity = create("span","hohDeleteActivity",svgAssets.cross,act); deleteActivity.title = "Delete"; deleteActivity.onclick = function(){ authAPIcall( "mutation($id: Int){Delete" + capitalize(type) + "(id: $id){deleted}}", {id: activity.id}, function(data){ if(data.data.DeleteActivity.deleted){ act.style.display = "none" } } ) } } dataUsers.add(activity.user.name); activity.replies.forEach(reply => { dataUsers.add(reply.user.name); (reply.text.match(/@(.*?) { dataUsers.add(user.slice(1,user.length-1)) }) }) }); if(terms.scrollIntoView){ terms.scrollIntoView({"behavior": "smooth","block": "start"}) } else{ document.body.scrollTop = document.documentElement.scrollTop = 0 }; removeChildren(dataUsersList) dataUsers.forEach(user => { create("option",false,false,dataUsersList) .value = user }); removeChildren(dataMediaList) dataMedia.forEach(media => { create("option",false,false,dataMediaList) .value = media }) }; let requestPage = function(npage,userID){ page = npage; changeURL(); let types = []; if(!onlyUser.checked || date){ types.push("MESSAGE") } if(onlyStatus.checked){ types.push("ANIME_LIST","MANGA_LIST") }; let specificUser = onlyUserInput.value || whoAmI; if(onlyUser.checked && !userID){ generalAPIcall("query($name:String){User(name:$name){id}}",{name: specificUser},function(data){ if(data){ requestPage(npage,data.data.User.id) } else{ loading.innerText = "Not Found"; deleteCacheItem("hohIDlookup" + specificUser.toLowerCase()); if(!onlyUserInput.value){ requestPage(npage) } } },"hohIDlookup" + specificUser.toLowerCase()); return; }; let requestTime = NOW(); if(onlyForum.checked){ authAPIcall( ` query($page: Int){ Page(page: $page){ threads(sort:REPLIED_AT_DESC${(onlyUser.checked ? ",userId: " + userID : "")}${onlyMedia.checked && onlyMediaResult.id ? ",mediaCategoryId: " + onlyMediaResult.id : ""}){ id createdAt user{name} text:body likes{name} title replyCount } } Viewer{unreadNotificationCount} }`, {page: npage}, function(data){ if(!data){ loading.innerText = translate("$error_connection"); return } buildPage(data.data.Page.threads.map(thread => { thread.type = "TEXT"; thread.replies = []; thread.text = "

    " + thread.title + "

    " + thread.text; return thread }).filter(thread => thread.replyCount || !onlyReplies.checked),"thread",requestTime); handleNotifications(data) } ) } else if(onlyReviews.checked){ authAPIcall( ` query($page: Int){ Page(page: $page,perPage: 20){ reviews(sort:CREATED_AT_DESC${(onlyUser.checked ? ",userId: " + userID : "")}${onlyMedia.checked && onlyMediaResult.id ? ",mediaId: " + onlyMediaResult.id : ""}){ id createdAt user{name} media{ id type title{romaji native english} } summary body rating ratingAmount } } Viewer{unreadNotificationCount} }`, {page: npage}, function(data){ if(!data){ loading.innerText = translate("$error_connection"); return } buildPage(data.data.Page.reviews.map(review => { review.type = "TEXT"; review.likes = []; review.replies = [{ id: review.id, user: review.user, likes: [], text: review.body, createdAt: review.createdAt }]; review.text = review.summary; return review }),"review",requestTime); handleNotifications(data) } ) } else{ authAPIcall( ` query($page: Int,$types: [ActivityType]){ Page(page: $page){ activities(${(onlyUser.checked || onlyGlobal.checked ? "" : "isFollowing: true,")}sort: ID_DESC,type_not_in: $types${(onlyReplies.checked ? ",hasReplies: true" : "")}${(onlyUser.checked ? ",userId: " + userID : "")}${(onlyGlobal.checked ? ",hasRepliesOrTypeText: true" : "")}${onlyMedia.checked && onlyMediaResult.id ? ",mediaId: " + onlyMediaResult.id : ""}${date ? ",createdAt_greater: " + ((new Date(date)).valueOf()/1000) + ",createdAt_lesser: " + ((new Date(date)).valueOf()/1000 + 24*60*60) : ""}){ ... on MessageActivity{ id type createdAt user:messenger{name} text:message likes{name} replies{ id user{name} likes{name} text createdAt } } ... on TextActivity{ id type createdAt user{name} text likes{name} replies{ id user{name} likes{name} text createdAt } } ... on ListActivity{ id type createdAt user{name} status progress media{ id type title{romaji native english} } likes{name} replies{ id user{name} likes{name} text createdAt } } } } Viewer{unreadNotificationCount} }`, {page: npage,types:types}, function(data){ if(!data){ loading.innerText = translate("$error_connection"); return } buildPage(data.data.Page.activities,"activity",requestTime); handleNotifications(data) } ) } }; requestPage(page); let setInputs = function(){ statusInputTitle.style.display = "none"; if(onlyReviews.checked){ inputArea.placeholder = "Writing reviews not supported yet..."; publishButton.innerText = translate("$button_publish") } else if(onlyForum.checked){ inputArea.placeholder = translate("$placeholder_forum"); statusInputTitle.style.display = "block"; publishButton.innerText = translate("$button_publish") } else if(onlyUser.checked && onlyUserInput.value && onlyUserInput.value.toLowerCase() !== whoAmI.toLowerCase()){ inputArea.placeholder = translate("$placeholder_message"); publishButton.innerText = "Send" } else{ inputArea.placeholder = translate("$placeholder_status"); publishButton.innerText = translate("$button_publish") } }; topPrevious.onclick = function(){ loading.innerText = translate("$loading"); if(page === 1){ requestPage(1) } else{ requestPage(page - 1) } }; topNext.onclick = function(){ loading.innerText = translate("$loading"); requestPage(page + 1) }; onlyGlobal.onchange = function(){ loading.innerText = translate("$loading"); statusInputTitle.style.display = "none"; inputArea.placeholder = translate("$placeholder_status"); onlyUser.checked = false; onlyForum.checked = false; onlyReviews.checked = false; requestPage(1) }; onlyStatus.onchange = function(){ loading.innerText = translate("$loading"); onlyForum.checked = false; onlyReviews.checked = false; onlyMedia.checked = false; requestPage(1) }; onlyReplies.onchange = function(){ loading.innerText = translate("$loading"); onlyReviews.checked = false; requestPage(1) }; onlyUser.onchange = function(){ setInputs(); loading.innerText = translate("$loading"); onlyGlobal.checked = false; requestPage(1) }; onlyForum.onchange = function(){ setInputs(); loading.innerText = translate("$loading"); onlyGlobal.checked = false; onlyStatus.checked = false; onlyReviews.checked = false; requestPage(1) }; onlyMedia.onchange = function(){ setInputs(); loading.innerText = translate("$loading"); requestPage(1) }; onlyReviews.onchange = function(){ setInputs(); onlyGlobal.checked = false; onlyStatus.checked = false; onlyForum.checked = false; onlyReplies.checked = false; loading.innerText = translate("$loading"); requestPage(1) } let oldOnlyUser = ""; onlyUserInput.onfocus = function(){ oldOnlyUser = onlyUserInput.value }; let oldOnlyMedia = ""; onlyMediaInput.onfocus = function(){ oldOnlyMedia = onlyMediaInput.value }; onlyMediaInput.onblur = function(){ if(onlyMediaInput.value === oldOnlyMedia){ return } if(onlyMediaInput.value === ""){ removeChildren(mediaDisplayResults) onlyMediaResult.id = false } else{ if(!mediaDisplayResults.childElementCount){ create("span",false,translate("$searching"),mediaDisplayResults); } generalAPIcall(` query($search: String){ Page(page:1,perPage:5){ media(search:$search,sort:SEARCH_MATCH){ title{romaji native english} id type } } }`, {search: onlyMediaInput.value}, function(data){ removeChildren(mediaDisplayResults) data.data.Page.media.forEach((media,index) => { let result = create("div",["hohSearchResult",media.type.toLowerCase()],false,mediaDisplayResults); let title = create("span",false,titlePicker(media),result); if(useScripts.accessToken){ let editButton = create("span","termsFeedEdit","edit",result); editButton.onclick = function(){ event.stopPropagation(); event.preventDefault(); authAPIcall(` query($id: Int,$userName: String){ MediaList( userName: $userName, mediaId: $id ){ progress score status id } }`, {id: media.id,userName: whoAmI}, function(entry,paras,errors){ if(!entry && errors.errors[0].message !== "Not Found."){ console.log(errors); return } let editor = createDisplayBox("width:600px;height:500px;top:100px;left:220px",titlePicker(media)); let progressLabel = create("p",false,translate("$preview_progress"),editor); let progressInput = create("input","hohInput",false,editor); progressInput.type = "number"; progressInput.min = 0; if(entry && entry.data.MediaList.progress){ progressInput.value = entry.data.MediaList.progress } else{ progressInput.value = 0 } create("hr",false,false,editor); let saveButton = create("button","hohButton","Save",editor); saveButton.onclick = function(){ if(entry){ authAPIcall( `mutation($progress: Int,$id: Int){ SaveMediaListEntry(progress: $progress,id:$id){id} }`, {id: entry.data.MediaList.id, progress: parseInt(progressInput.value)}, data => {} ) } else{ authAPIcall( `mutation($progress: Int,$id: Int){ SaveMediaListEntry(progress: $progress,mediaId:$id){id} }`, {id: media.id, progress: parseInt(progressInput.value)}, data => {} ) } } } ) } } if(index === 0){ result.classList.add("selected"); onlyMediaResult.id = media.id; onlyMediaResult.type = media.type } result.onclick = function(){ mediaDisplayResults.querySelector(".selected").classList.toggle("selected"); result.classList.add("selected"); onlyMediaResult.id = media.id; onlyMediaResult.type = media.type; onlyMedia.checked = true; onlyStatus.checked = false; loading.innerText = translate("$loading"); requestPage(1) } }); if(data.data.Page.media.length){ onlyMedia.checked = true; onlyStatus.checked = false; loading.innerText = translate("$loading"); requestPage(1) } else{ create("span",false,translate("$noResults"),mediaDisplayResults); onlyMediaResult.id = false } } ) } }; onlyUserInput.onblur = function(){ if(onlyForum.checked){ inputArea.placeholder = translate("$placeholder_forum"); publishButton.innerText = translate("$button_publish") } else if( (onlyUser.checked && onlyUserInput.value && onlyUserInput.value.toLowerCase() !== whoAmI.toLowerCase()) || (oldOnlyUser !== onlyUserInput.value && onlyUserInput.value !== "") ){ inputArea.placeholder = translate("$placeholder_message"); publishButton.innerText = "Send" } else{ inputArea.placeholder = translate("$placeholder_status"); publishButton.innerText = translate("$button_publish") } if(oldOnlyUser !== onlyUserInput.value && onlyUserInput.value !== ""){ loading.innerText = translate("$loading"); onlyUser.checked = true; requestPage(1) } else if(onlyUser.checked && oldOnlyUser !== onlyUserInput.value){ loading.innerText = translate("$loading"); requestPage(1) } }; onlyUserInput.addEventListener("keyup",function(event){ if(event.key === "Enter"){ onlyUserInput.blur() } }); onlyMediaInput.addEventListener("keyup",function(event){ if(event.key === "Enter"){ onlyMediaInput.blur() } }); inputArea.onfocus = function(){ cancelButton.style.display = "inline"; publishButton.style.display = "inline"; previewArea.style.display = "inline" }; inputArea.oninput = function(){ previewArea.innerHTML = DOMPurify.sanitize(makeHtml(inputArea.value)) } cancelButton.onclick = function(){ inputArea.value = ""; inputArea.rows = 3; inputArea.style.height = "unset"; previewArea.innerText = ""; cancelButton.style.display = "none"; publishButton.style.display = "none"; previewArea.style.display = "none"; loading.innerText = ""; onlySpecificActivity = false; document.activeElement.blur() }; publishButton.onclick = function(){ if(onlyForum.checked){ alert(translate("$notImplemented")); //loading.innerText = "Publishing forum post..."; return } else if(onlyReviews.checked){ alert(translate("$notImplemented")); //loading.innerText = "Publishing review..."; return } else if(onlySpecificActivity){ loading.innerText = "Publishing..."; let mutation; if(onlyUser.checked && onlyUserInput.value && onlyUserInput.value.toLowerCase() !== whoAmI.toLowerCase()){ mutation = "mutation($text: String,$id: Int){SaveMessageActivity(id: $id,message: $text){id}}" } else{ mutation = "mutation($text: String,$id: Int){SaveTextActivity(id: $id,text: $text){id}}" } authAPIcall( mutation, {text: inputArea.value,id: onlySpecificActivity}, function(data){ onlySpecificActivity = false; requestPage(1) } ) } else if(onlyUser.checked && onlyUserInput.value && onlyUserInput.value.toLowerCase() !== whoAmI.toLowerCase()){ loading.innerText = "Sending Message..."; generalAPIcall("query($name:String){User(name:$name){id}}",{name: onlyUserInput.value},function(data){ if(data){ authAPIcall( "mutation($text: String,$recipientId: Int){SaveMessageActivity(message: $text,recipientId: $recipientId){id}}", { text: emojiSanitize(inputArea.value), recipientId: data.data.User.id }, function(data){ requestPage(1) } ) } else{ loading.innerText = "Not Found" } },"hohIDlookup" + onlyUserInput.value.toLowerCase()) } else{ loading.innerText = "Publishing..."; authAPIcall( "mutation($text: String){SaveTextActivity(text: $text){id}}", {text: emojiSanitize(inputArea.value)}, function(data){ requestPage(1) } ) } inputArea.value = ""; previewArea.innerText = ""; cancelButton.style.display = "none"; publishButton.style.display = "none"; document.activeElement.blur() }; let sideBarContent = create("div","sidebar",false,feed,"position:absolute;left:20px;top:200px;max-width:150px;"); let buildPreview = function(data){ if(!data){ return } removeChildren(sideBarContent) let mediaLists = data.data.Page.mediaList.map(mediaList => { if(aliases.has(mediaList.media.id)){ mediaList.media.title.userPreferred = aliases.get(mediaList.media.id) } return mediaList }); mediaLists.slice(0,20).forEach(mediaList => { let mediaEntry = create("div",false,false,sideBarContent,"border-bottom: solid;border-bottom-width: 1px;margin-bottom: 10px;border-radius: 3px;padding: 2px;"); create("a","link",mediaList.media.title.userPreferred,mediaEntry,"min-height:40px;display:inline-block;") .href = "/anime/" + mediaList.media.id + "/" + safeURL(mediaList.media.title.userPreferred); let progress = create("div",false,false,mediaEntry,"font-size: small;"); create("span",false,translate("$preview_progress") + " ",progress); let number = create("span",false,mediaList.progress + (mediaList.media.episodes ? "/" + mediaList.media.episodes : ""),progress); let plusProgress = create("span",false,"+",progress,"padding-left:5px;padding-right:5px;cursor:pointer;"); let isBlocked = false; plusProgress.onclick = function(e){ if(isBlocked){ return }; if(mediaList.media.episodes){ if(mediaList.progress < mediaList.media.episodes){ mediaList.progress++; number.innerText = mediaList.progress + (mediaList.media.episodes ? "/" + mediaList.media.episodes : ""); isBlocked = true; setTimeout(function(){ isBlocked = false; },300); if(mediaList.progress === mediaList.media.episodes){ plusProgress.innerText = ""; if(mediaList.status === "REWATCHING"){//don't overwrite the existing end date authAPIcall( `mutation($progress: Int,$id: Int){ SaveMediaListEntry(progress: $progress,id:$id,status:COMPLETED){id} }`, {id: mediaList.id,progress: mediaList.progress}, data => {} ) } else{ authAPIcall( `mutation($progress: Int,$id: Int,$date:FuzzyDateInput){ SaveMediaListEntry(progress: $progress,id:$id,status:COMPLETED,completedAt:$date){id} }`, { id: mediaList.id, progress: mediaList.progress, date: { year: (new Date()).getUTCFullYear(), month: (new Date()).getUTCMonth() + 1, day: (new Date()).getUTCDate(), } }, data => {} ) }; mediaEntry.style.backgroundColor = "rgba(0,200,0,0.1)" } else{ authAPIcall( `mutation($progress: Int,$id: Int){ SaveMediaListEntry(progress: $progress,id:$id){id} }`, {id: mediaList.id,progress: mediaList.progress}, data => {} ) } localStorage.setItem("hohListPreview",JSON.stringify(data)) } } else{ mediaList.progress++; number.innerText = mediaList.progress + (mediaList.media.episodes ? "/" + mediaList.media.episodes : ""); isBlocked = true; setTimeout(function(){ isBlocked = false; },300); authAPIcall( `mutation($progress: Int,$id: Int){ SaveMediaListEntry(progress: $progress,id:$id){id} }`, {id: mediaList.id,progress: mediaList.progress}, data => {} ); localStorage.setItem("hohListPreview",JSON.stringify(data)) }; e.stopPropagation(); e.preventDefault(); return false } }) }; authAPIcall( `query($name: String){ Page(page:1){ mediaList(type:ANIME,status_in:[CURRENT,REPEATING],userName:$name,sort:UPDATED_TIME_DESC){ id priority scoreRaw: score(format: POINT_100) progress status media{ id episodes coverImage{large color} title{userPreferred} nextAiringEpisode{episode timeUntilAiring} } } } }`,{name: whoAmI},function(data){ localStorage.setItem("hohListPreview",JSON.stringify(data)); buildPreview(data,true) } ); buildPreview(JSON.parse(localStorage.getItem("hohListPreview")),false) } }) //end modules/termsFeed.js //begin modules/tweets.js exportModule({ id: "tweets", description: "$setting_tweets", extendedDescription: ` This works by runnig Twitter's official embedding script. But since loading external code is not allowed for Firefox addons, this setting will only work in userscript mode. Be adviced that Twitter embedding displays NSFW content no differently than other content. `, isDefault: false, categories: ["Feeds"], visible: true }) let tweetLoop = setInterval(function(){ if(useScripts.tweets){ document.querySelectorAll( `.markdown a[href^="https://twitter.com/"][href*="/status/"]` ).forEach(tweet => { if(tweet.classList.contains("hohEmbedded")){ return }; let tweetMatch = tweet.href.match(/^https:\/\/twitter\.com\/(.+?)\/status\/\d+/) if(!tweetMatch || tweet.href !== tweet.innerText){ return } tweet.classList.add("hohEmbedded"); let tweetBlockQuote = create("blockquote",false,false,tweet); tweetBlockQuote.classList.add("twitter-tweet"); if(document.body.classList.contains("site-theme-dark")){ tweetBlockQuote.setAttribute("data-theme","dark") } let tweetBlockQuoteInner = create("p",false,false,tweetBlockQuote); tweetBlockQuoteInner.setAttribute("lang","en"); tweetBlockQuoteInner.setAttribute("dir","ltr"); let tweetBlockQuoteInnerInner = create("a","hohEmbedded","Loading tweet by " + tweetMatch[1] + "...",tweetBlockQuoteInner) .href = tweet.href; if(window.GM_xmlhttpRequest){ /* Only fetch external script if running in userscript mode (window.GM_xmlhttpRequest is only available inside a userscript manager) This is not allowed for Firefox addons, even if this setting is disabled by default. Hence this check */ if(document.getElementById("automailTwitterEmbed") && window.twttr){ window.twttr.widgets.load(tweet) } else{ let script = document.createElement("script"); script.setAttribute("src","https://platform.twitter.com/widgets.js"); script.setAttribute("async",""); script.id = "automailTwitterEmbed"; document.head.appendChild(script) } } }) } },400); //end modules/tweets.js //begin modules/twoColumnFeed.js exportModule({ id: "twoColumnFeed", description: "$twoColumnFeed_description", isDefault: false, importance: 0, categories: ["Feeds"], visible: true, css: ` .home .activity-feed{ grid-template-columns: repeat(2,1fr); display: grid; grid-column-gap: 15px; } .home .activity-feed .activity-entry.activity-text{ grid-column: 1/3; } .home .activity-feed .activity-entry{ margin-bottom: 15px; } ` }) if(useScripts.twoColumnFeed && !useScripts.CSSverticalNav){ moreStyle.textContent += ` .home{ margin-left: -15px; margin-right: -15px; } @media(min-width: 1540px){ .home{ margin-left: -95px; margin-right: -95px; } } @media(min-width:1040px) and (max-width:1540px){ .home{ margin-left: -45px; margin-right: -45px; } } @media(min-width:760px) and (max-width:1040px){ .home{ margin-left: -25px; margin-right: -25px; } } ` } //end modules/twoColumnFeed.js //begin modules/unicodifier.js exportModule({ id: "unicodifier", description: "$module_unicodifier_description", extendedDescription: "$module_unicodifier_extendedDescription", isDefault: true, importance: 0, categories: ["Feeds","Forum"], visible: true }) setInterval(function(){ Array.from(document.querySelectorAll(".activity-edit textarea.el-textarea__inner,.editor textarea.el-textarea__inner")).forEach(editor => { if(editor.value){ editor.value = emojiSanitize(editor.value); editor.dispatchEvent(new Event("input",{bubbles: false})) } }) },2000) //end modules/unicodifier.js //begin modules/videoMimeTypeFixer.js exportModule({ id: "videoMimeTypeFixer", description: "Detect video mime type by file extension [you probably don't need this]", extendedDescription: ` Anilist by default serves all video as "video/webm". However, it's common to use non-webm video, as brower support is common. But some browsers don't autodetect the proper mime type. This module adds a mime type based on the file extension, which may help if the video won't play otherwise. `, isDefault: false, categories: ["Feeds"], visible: true }) if(useScripts.videoMimeTypeFixer){ setInterval(function(){ document.querySelectorAll('source[src$=".av1"][type="video/webm"]').forEach(video => { video.setAttribute("type","video/av1") }) document.querySelectorAll('source[src$=".mp4"][type="video/webm"]').forEach(video => { video.setAttribute("type","video/mp4") }) },2000) } //end modules/videoMimeTypeFixer.js //begin modules/viewAdvancedScores.js function viewAdvancedScores(url){ let URLstuff = url.match(/^https:\/\/anilist\.co\/user\/(.+)\/(anime|manga)list\/?/); let name = decodeURIComponent(URLstuff[1]); generalAPIcall( `query($name:String!){ User(name:$name){ mediaListOptions{ animeList{advancedScoringEnabled} mangaList{advancedScoringEnabled} } } }`, {name: name},function(data){ if( !( (URLstuff[2] === "anime" && data.data.User.mediaListOptions.animeList.advancedScoringEnabled) || (URLstuff[2] === "manga" && data.data.User.mediaListOptions.mangaList.advancedScoringEnabled) ) ){ return }; generalAPIcall( `query($name:String!,$listType:MediaType){ MediaListCollection(userName:$name,type:$listType){ lists{ entries{mediaId advancedScores} } } }`, {name: name,listType: URLstuff[2].toUpperCase()}, function(data2){ let list = new Map(returnList(data2,true).map(a => [a.mediaId,a.advancedScores])); let finder = function(){ if(!document.URL.match(/^https:\/\/anilist\.co\/user\/(.+)\/(anime|manga)list\/?/)){ return }; document.querySelectorAll( ".list-entries .entry .title > a:not(.hohAdvanced)" ).forEach(function(entry){ entry.classList.add("hohAdvanced"); let key = parseInt(entry.href.match(/\/(\d+)\//)[1]); let dollar = create("span",["hohAdvancedDollar","noselect"],"$",entry.parentNode); let advanced = list.get(key); let reasonable = Object.keys(advanced).map( key => [key,advanced[key]] ).filter( a => a[1] ); dollar.title = reasonable.map( a => a[0] + ": " + a[1] ).join("\n"); if(!reasonable.length){ dollar.style.display = "none" } }); setTimeout(finder,1000); };finder(); } ) }) }; //end modules/viewAdvancedScores.js //begin modules/webmResize.js exportModule({ id: "webmResize", description: "Resize videos with a width in the URL hash (like #220 or #40%)", isDefault: true, categories: ["Feeds"], visible: true }) if(useScripts.webmResize){ setInterval(function(){ document.querySelectorAll("source").forEach(video => { let hashMatch = (video.src || "").match(/#(image)?(\d+(\.\d+)?%?)$/); if(hashMatch && !video.parentNode.width){ video.parentNode.setAttribute("width",hashMatch[2]) } if(video.src.match(/#image\d*(\.\d+)?%?$/)){ video.parentNode.removeAttribute("controls") } }) },500) } //end modules/webmResize.js //begin modules/yearStepper.js exportModule({ id: "yearStepper", description: "Add buttons to step the year slider up and down", isDefault: true, importance: 0, categories: ["Lists"], visible: true, urlMatch: function(url,oldUrl){ return url.match(/\/user\/.*\/(anime|manga)list/) }, code: function(){ let yearStepper = function(){ if(!location.pathname.match(/\/user\/.*\/(anime|manga)list/)){ return } let slider = document.querySelector(".el-slider"); if(!slider){ setTimeout(yearStepper,200); return }; const maxYear = parseInt(slider.getAttribute("aria-valuemax")); const minYear = parseInt(slider.getAttribute("aria-valuemin")); const yearRange = maxYear - minYear; let clickSlider = function(year){//thanks, mator! let runway = slider.children[0]; let r = runway.getBoundingClientRect(); const x = r.left + r.width * ((year - minYear) / yearRange); const y = r.top + r.height / 2; runway.dispatchEvent(new MouseEvent("click",{ clientX: x, clientY: y })) }; let adjuster = function(delta){ let heading = slider.previousElementSibling; if(heading.children.length === 0){ if(delta === -1){ clickSlider(maxYear) } else{ clickSlider(minYear) } } else{ let current = parseInt(heading.children[0].innerText); clickSlider(current + delta) } }; if(document.querySelector(".hohStepper")){ return }; slider.style.position = "relative"; let decButton = create("span","hohStepper","<",slider,"left:-27px;font-size:200%;top:0px;"); let incButton = create("span","hohStepper",">",slider,"right:-27px;font-size:200%;top:0px;"); decButton.onclick = function(){ adjuster(-1) }; incButton.onclick = function(){ adjuster(1) } };yearStepper() }, css: ` .hohStepper{ cursor: pointer; position: absolute; opacity: 0.5; } .el-slider:hover .hohStepper{ opacity: 1; }` }) //end modules/yearStepper.js //begin modules/youtubeFullscreen.js exportModule({ id: "youtubeFullscreen", description: "Enable fullscreen button on youtube videos", isDefault: false, categories: ["Feeds"], visible: true }) if(useScripts.youtubeFullscreen){ setInterval(function(){ document.querySelectorAll(".youtube iframe").forEach(video => { if(!video.hasAttribute("allowfullscreen")){ video.setAttribute("allowfullscreen","allowfullscreen"); video.setAttribute("frameborder","0"); video.setAttribute("src",video.getAttribute("src").replace("autohide=1","autohide=0"))//https://github.com/hohMiyazawa/Automail/issues/53 } }) },1000) } //end modules/youtubeFullscreen.js //create your own module //make a javascript file, called yourModule.js, in the directory "modules" //include the following code: exportModule({ id: "howto",//an unique identified for your module description: "what your module does", extendedDescription: ` A more detailed description of what your module does. (optional) This appears when people click the "more info" icon (🛈) on the settings page. `, isDefault: false, importance: 0,//a number, which determines the order of the settings page. Higher numbers are more important. Leave it as 0 if unsure. categories: [],//what categories your module belongs in //Notifications, Feeds, Forum, Lists, Profiles, Stats, Media, Navigation, Browse, Script, Login, Newly Added visible: false,//if the module should be visible in the settings (REMEMBER TO CHANGE THIS TO TRUE!) urlMatch: function(url,oldUrl){//a function that returns true when on the parts of the site you want it to run. url is the current url, oldUrl is the previous page //example: return url === "https://anilist.co/reviews" return false; }, code: function(){ //your code goes here }, css: ""//css rules you need }) //your module can also have extra code and utility functions })() //wanna translate Automail? https://github.com/hohMiyazawa/Automail/issues/69 //Automail built at 1641151650