diff --git a/ElainaV2/assets/Backgrounds/Elaina1.webm b/ElainaV2/assets/Backgrounds/Elaina1.webm new file mode 100644 index 0000000..69dfb4f Binary files /dev/null and b/ElainaV2/assets/Backgrounds/Elaina1.webm differ diff --git a/ElainaV2/assets/Backgrounds/Elaina2.webm b/ElainaV2/assets/Backgrounds/Elaina2.webm new file mode 100644 index 0000000..d341d7b Binary files /dev/null and b/ElainaV2/assets/Backgrounds/Elaina2.webm differ diff --git a/ElainaV2/assets/Backgrounds/Elaina3.webm b/ElainaV2/assets/Backgrounds/Elaina3.webm new file mode 100644 index 0000000..ffe5274 Binary files /dev/null and b/ElainaV2/assets/Backgrounds/Elaina3.webm differ diff --git a/ElainaV2/assets/Backgrounds/Elaina4.webm b/ElainaV2/assets/Backgrounds/Elaina4.webm new file mode 100644 index 0000000..8dfccec Binary files /dev/null and b/ElainaV2/assets/Backgrounds/Elaina4.webm differ diff --git a/ElainaV2/assets/Backgrounds/Old-Ranked_Draft-Champion_Select.mp3 b/ElainaV2/assets/Backgrounds/Old-Ranked_Draft-Champion_Select.mp3 new file mode 100644 index 0000000..5e86af6 Binary files /dev/null and b/ElainaV2/assets/Backgrounds/Old-Ranked_Draft-Champion_Select.mp3 differ diff --git a/ElainaV2/assets/Css/Addon-Css/Animate-Loading-Screen.css b/ElainaV2/assets/Css/Addon-Css/Animate-Loading-Screen.css new file mode 100644 index 0000000..fa653cc --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Animate-Loading-Screen.css @@ -0,0 +1,26 @@ +.lol-loading-screen-container.lol-loading-screen-default-state { + backdrop-filter: blur(15px) ; + background: transparent!important; +} + +.lol-loading-screen-progress-bar-container { + width: 500px !important; + top: 8px !important; +} + +.lol-loading-screen-container .lol-loading-screen-lol-icon { + background: var(--ElainaFly) !important; + background-repeat: no-repeat; + background-size: contain; + width: 475px !important; + height: 475px !important; + margin-top: 114px !important; + margin-bottom: 0px !important; + border: 2px solid transparent !important; + border-radius: 250px !important; +} + +.lol-loading-screen-status-container { + height: 86px !important; + margin-top: 28px !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/Addon-Css/Aram-only.css b/ElainaV2/assets/Css/Addon-Css/Aram-only.css new file mode 100644 index 0000000..9e49151 --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Aram-only.css @@ -0,0 +1,15 @@ +[data-game-mode="CLASSIC"] { + display: none !important; +} + +[data-game-mode="TFT"] { + display: none !important; +} + +.quick-play-game-mode-text { + display: none !important; +} + +.quick-play-button { + display: none !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/Addon-Css/Avatar.css b/ElainaV2/assets/Css/Addon-Css/Avatar.css new file mode 100644 index 0000000..be504eb --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Avatar.css @@ -0,0 +1,3 @@ +.top > .icon-image.has-icon, .style-profile-champion-icon-masked > img { + content: var(--Avatar) !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/Addon-Css/Hide-Champs-Splash-Art.css b/ElainaV2/assets/Css/Addon-Css/Hide-Champs-Splash-Art.css new file mode 100644 index 0000000..0a532c1 --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Hide-Champs-Splash-Art.css @@ -0,0 +1,15 @@ +.champion-select { + background: transparent!important +} + +.champion-select .champion-splash-background .background-vignette-container.defocussed > .champ-select-bg { + opacity:0 !important; +} + +.champ-select-bg-darken { + opacity:0.2!important +} + +.background-vignette-container.focussed.static.visible { + display: none !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/Addon-Css/Sidebar-Color.css b/ElainaV2/assets/Css/Addon-Css/Sidebar-Color.css new file mode 100644 index 0000000..495f0ff --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Sidebar-Color.css @@ -0,0 +1,3 @@ +.rcp-fe-viewport-sidebar { + background: var(--social-sidebar-bg-color) !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/Addon-Css/Sidebar-Transparent.css b/ElainaV2/assets/Css/Addon-Css/Sidebar-Transparent.css new file mode 100644 index 0000000..70d9346 --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Sidebar-Transparent.css @@ -0,0 +1,3 @@ +.rcp-fe-viewport-sidebar { + background: linear-gradient(rgba(6, 6, 6, 0), rgba(0, 0, 0, 0)) !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/Addon-Css/Static-Loading-Screen.css b/ElainaV2/assets/Css/Addon-Css/Static-Loading-Screen.css new file mode 100644 index 0000000..29f0d58 --- /dev/null +++ b/ElainaV2/assets/Css/Addon-Css/Static-Loading-Screen.css @@ -0,0 +1,18 @@ +.lol-loading-screen-container.lol-loading-screen-default-state { + backdrop-filter: blur(15px) ; + background: transparent!important; +} + +.lol-loading-screen-progress-bar-container { + width: 500px !important; + top: 35px !important; +} + +.lol-loading-screen-container .lol-loading-screen-lol-icon { + background: var(--ElainaStatic) !important; + background-repeat: no-repeat; + background-size: contain; + width: 240px !important; + height: 240px !important; + margin-top: 40px !important; +} \ No newline at end of file diff --git a/ElainaV2/assets/Css/ElainaV2.css b/ElainaV2/assets/Css/ElainaV2.css new file mode 100644 index 0000000..9bebf74 --- /dev/null +++ b/ElainaV2/assets/Css/ElainaV2.css @@ -0,0 +1,796 @@ +/* By Elaina Da Catto */ +/* Meow~~~ */ + + + +/*_________________________________________________________________________________________________________________________________*/ +:root { + /* Delete " /* and * / " mark to apply font change */ + /* + --font-display: 'Elaina', sans-serif !important; + --font-body: 'Elaina', sans-serif !important; + */ + + --social-sidebar-bg-color: linear-gradient(rgb(6 6 6), rgb(0 0 0 / 25%)); + + --BE-Icon: url("../Icon/ElainaStare.png"); + --RP-Icon: url("https://raw.githubusercontent.com/Elaina69/Elaina-V2/main/ElainaV2/assets/Icon/ApprenticeWitch.png"); /* Must use Web link */ + + --Avatar: url("https://raw.githubusercontent.com/Elaina69/Elaina-V2/main/ElainaV2/assets/Icon/Avatar.gif"); /* Must use Web link */ + --Hover-card-backdrop: url("https://raw.githubusercontent.com/Elaina69/Elaina-V2/main/ElainaV2/assets/Icon/Hover-card-backdrop.jpg"); /* Must use Web link */ + + --Rank-Icon: url("https://raw.githubusercontent.com/Elaina69/Elaina-V2/main/ElainaV2/assets/Icon/Rank.png"); /* Must use Web link */ + + --Emblem: url("../Icon/emblem_5.png"); + + --Clash-banner: url("../Icon/Clash.png"); + + --Ticker: url("../Icon/ticker.png"); + + --ElainaFly: url("//plugins/ElainaV2/assets/Icon/ElainaFly.gif"); + --ElainaStatic: url("//plugins/ElainaV2/assets/Icon/Logo.png"); +} + +@font-face { + src: url("") format('truetype'); /* .ttf */ + font-family: 'Elaina'; + font-weight: normal; + font-style: normal; + font-display: swap; +} +/*_________________________________________________________________________________________________________________________________*/ + + + + + + + + + +/*_________________________________________________________________________________________________________________________________*/ +@keyframes answerdiv { + 0% { + right: 100px; + background-color: transparent; + border: 2px solid transparent;} + + 100% { + right: 221px; + background-color: rgb(19, 15, 15); + border: 2px solid #8c8263;} +} + +@keyframes answer { + 0% {color: transparent;} + 100% {color: #cdbe91;} +} +/*_________________________________________________________________________________________________________________________________*/ + + + +/*_________________________________________________________________________________________________________________________________*/ + +iframe html { + background: transparent!important; +} + +iframe .bg-cover { + opacity:0!important +} + +.lol-social-sidebar.ember-view { + background: transparent!important +} + +#rcp-fe-lol-home-error { + display: none!important +} + +.store-backdrop { + background-image: unset !important; +} + +.friend-requests { + background:rgb(66, 63, 53)!important +} + +.navigation-root-component.ember-view { + background: linear-gradient(rgb(0 0 0), rgb(0 0 0 / 24%))!important; + height: 77px !important; + +} + +.alpha-version-panel { + background: linear-gradient(rgba(0, 0, 0, 0), rgba(38, 78, 52, 0))!important; + border-top: thin solid #1e282d00 !important; +} + +lol-social-avatar[ref='iconElement'], .lol-social-identity.ember-view > .details { + z-index: 1 !important; +} + +.menu-item-icon { + background-color: #fff1f1!important; + color: #fff1f1!important; +} + +.main-navigation-menu .section .section-text { + color: #fff1f1!important; +} + +.summoner-level { + color:#ffe8a5!important +} + +.alpha-tag { + color:#ffffffc9!important; +} + +lol-social-roster-member .offline .member-name { + color:#9a9696!important +} + +.availability-icon { + position: relative!important; +} + +.availability-icon.chat { + background: #09a646 !important; +} + +.filled.xp-ring { + background: linear-gradient(rgb(255 236 236), rgb(87 103 105 / 48%)) !important; +} + +lol-uikit-navigation-item > .section::after { + background-image: linear-gradient(0deg, rgb(210 195 149 / 32%) 0%, rgb(0 0 0 / 10%) 55%); +} + +.parties-background.ember-view .lol-uikit-background-switcher-image { + opacity: 0.4 !important; +} + +.parties-background { + background: linear-gradient(to bottom, rgb(255 255 255 / 26%) 0%, rgba(0,0,0,0) 50%, rgb(90 27 62 / 20%) 100%) !important; +} + +.lobby-header-overlay { + background: unset!important +} + +.parties-game-section.use-animation > .parties-game-info-panel-bg-container > video { + filter: saturate(0.5) brightness(1) invert(1) hue-rotate(27deg) !important; +} + +.parties-game-search-info { + color:#000000!important +} + +.parties-game-search-elapsed { + color: white!important; + text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black !important; +} + +.parties-status-card-bg-container video { + filter: saturate(0.5) brightness(1) invert(1) hue-rotate(27deg) !important; +} + +.challenge-banner-title-container { + color: #f3d3d3 !important; + text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black !important; +} + +.parties-status-member-icons > .parties-status-member-joined { + filter: grayscale(1) saturate(0) brightness(0.5) !important; +} + +.collections-application { + background: rgb(29 72 56 / 18%)!important; +} + +.item-sets-table-row { + background: #0000007a !important; +} + +#background-ambient { + src: none !important; + display: none !important; +} + +.inventory-search { + background: #00000085!important; +} + +.emote-item-icon.interactive { + background: #000000b0 !important; +} + +.uikit-background-switcher .lol-uikit-background-switcher-image.transition.fade { + animation: unset!important +} + +#elaina-bg:has(+ #rcp-fe-viewport-root .parties-background) { + filter: brightness(0.4) !important; +} + +.background { + background-image: unset!important; +} + +.stats-backdrop { + opacity: 0.3!important; + mix-blend-mode: difference !important; +} + +html { + overflow: hidden !important; +} + +.loot-backdrop { + height: 720px !important; +} + +.loading-tab::after { + background-image:none!important +} + +.store-loading { + background-color: transparent!important; +} + +.clash-aram-intro-modal { + background-image: none!important; + background-color: transparent!important +} + +.champion-select .timer-status::before { + filter: contrast(0) brightness(1) !important; +} + +.champion-select .action-button-container::after { + filter: sepia(1) !important; +} + +.rcp-fe-lol-game-in-progress { + background-image: unset!important; + background-color: unset!important; +} + +.clash-tab-team-background, .clash-tab-bracket-background, .tournament-scouting, .clash-missed-lockin-modal, .clash-root-background-landing, .clash-root-background { + background-image: none !important; +} + +.rcp-fe-lol-navigation.main-nav-bar { + height: 76px !important; +} + +div[data-screen-name="rcp-fe-lol-home"] .rcp-fe-lol-home-sub-nav { + margin-top: 10px; + padding-bottom: 10px; + background-color: #000000ad; + border-radius: 10px; + border: 2px solid var(--default-color, #cdbe91) !important; +} + +div[data-screen-name="rcp-fe-lol-tft"] .tft-sub-nav-container { + padding-top: 10px !important; + padding-bottom: 10px !important; + background-color: #000000ad !important; + border-radius: 10px !important; + border: 2px solid var(--default-color, #cdbe91) !important; +} + +/*_________________________________________________________________________________________________________________________________*/ + + + + +/*_________________________________________________________________________________________________________________________________*/ + +#elaina-bg { + width:100%; + height: 100%; + position: absolute; + pointer-events: none; + transition: opacity 0.5s ease-in-out; + opacity: 1; + filter: blur(10px) brightness(0.4) saturate(1.5) ; +} + +.webm-bottom-buttons-container { + display: flex; + bottom: 9px; + left: 20px; + position:absolute +} + +#pause-bg { + position: relative !important; + border: 2px solid #8c8263 !important; + border-radius: 50% !important; + width: 21px !important; + background-color: black !important; + height: 21px !important; + cursor: pointer !important; +} + +#pause-bg:hover { + filter: brightness(1.3) hue-rotate(263deg) saturate(0.4) !important; +} + +.pause-bg-icon { + width: 17px !important; + margin-left: 2px !important; + margin-top: 2px !important; +} + +#next-bg { + position: relative !important; + width: 21px !important; + height: 21px !important; + cursor: pointer !important; +} + +.next-bg-icon { + width: 25px !important; + margin-left: 0px !important; + margin-top: -0.4px!important; +} + +.next-bg-icon:hover { + filter: hue-rotate(0deg) drop-shadow(2px 4px 6px pink) !important; +} + +#prev-bg { + position: relative !important; + width: 21px !important; + height: 21px !important; + cursor: pointer !important; +} + +.prev-bg-icon { + width: 25px !important; + margin-left: 0px !important; + margin-top: -0.4px !important; +} + +.prev-bg-icon:hover { + filter: hue-rotate(0deg) drop-shadow(2px 4px 6px pink) !important; +} + + +#pause-audio { + border: 2px solid #8c8263 !important; + border-radius: 50% !important; + width: 21px !important; + background-color: black !important; + height: 21px !important; + cursor: pointer !important; + display: block !important; + margin-right: 6px !important; +} + +.pause-audio-icon { + width: 13px !important; + margin-left: 4px !important; + margin-top: 4px !important; +} + +#pause-audio:hover { + filter: brightness(1.3) hue-rotate(263deg) saturate(0.4) !important; +} + +.webm-hidden { + opacity: 0!important +} + +.cs-buttons-container { + display: flex; + gap: 3em; +} + +.dodge-button-container { + position: absolute; + right: 20px; + bottom: 19px; + display: flex; + align-items: flex-end +} + +.audio-volume-panel { + display: flex; + bottom: 40px; + left: 15px; + position:absolute; + border: 3px solid #8c8263; + border-radius: 10px; + background: rgb(19, 15, 15); +} + +.audio-volume { + appearance: slider-vertical; + margin-top: 7px; + margin-left: 0px; + margin-right: 0px; + margin-bottom: 7px; + width: 30px; + height: 85px; +} + +/* ElainaTrigger */ +.watermark { + margin: 4px !important; + color: #cdbe91 !important; +} + +.watermark-text { + display: flex; + bottom: 9px; + right: 20px; + position:absolute +} + +.Elaina1ImageCon { + display: flex; + bottom: -4px; + right: 130px; + position:absolute +} + +.Elaina1TextCon { + display: flex; + bottom: 260px; + right: 303px; + position:absolute +} + +.Elaina1Image { + width: 650px !important; +} + +.Elaina1Text { + margin: 4px !important; + color: rgb(129 185 224) !important; + text-align: center !important; + font-size: 20px !important; +} + +.Headpat-con { + display: flex; + bottom: 230px; + right: 500px; + position:absolute +} + +.Headpat { + font-size: 100px !important; + width: 110px; + height: 60px; + background: transparent; + border: none; +} + +.Boobs-con { + display: flex; + bottom: 20px; + right: 495px; + position:absolute +} + +.Boobs { + font-size: 100px !important; + width: 136px; + height: 65px; + background: transparent; + border: none; +} + +.goOutSide-con { + display: flex; + bottom: -3px; + right: 434px; + position:absolute +} + +.GoOutSide { + font-size: 100px !important; + width: 225px; + height: 290px; + background: transparent; + border: none; +} + +.answer1-con { + display: flex; + bottom: 150px; + right: 220px; + position: absolute; + border-radius: 10px; + animation-name: answerdiv; + animation-duration: 1s; + animation-fill-mode: forwards; +} + +#answer1 { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + margin-right: 10px; + text-align: center; + display: flex; + width: 200px; + font-size: 17px; + animation-name: answer; + animation-duration: 1s; + animation-fill-mode: forwards; +} + +.answer2-con { + display: flex; + bottom: 80px; + right: 220px; + position: absolute; + animation-name: answerdiv; + animation-duration: 1s; + animation-fill-mode: forwards; + animation-delay: 1.2s; + border-radius: 10px; +} + +#answer2 { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + margin-right: 10px; + text-align: center; + display: flex; + width: 200px; + font-size: 17px; + color: transparent; + animation-name: answer; + animation-duration: 1s; + animation-fill-mode: forwards; + animation-delay: 1.2s; +} + +.answer3-con { + display: flex; + bottom: 150px; + right: 220px; + position: absolute; + animation-name: answerdiv; + animation-duration: 1s; + animation-fill-mode: forwards; + border-radius: 10px; +} + +#answer3 { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + margin-right: 10px; + text-align: center; + display: flex; + width: 200px; + font-size: 17px; + animation-name: answer; + animation-duration: 1s; + animation-fill-mode: forwards; +} + +.answer4-con { + display: flex; + bottom: 150px; + right: 200px; + position: absolute; + animation-name: answerdiv; + animation-duration: 1s; + animation-fill-mode: forwards; + border-radius: 10px; +} + +#answer4 { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + margin-right: 10px; + text-align: center; + display: flex; + width: 220px; + font-size: 17px; + animation-name: answer; + animation-duration: 1s; + animation-fill-mode: forwards; +} + +.answer5-con { + display: flex; + bottom: 80px; + right: 200px; + position: absolute; + animation-name: answerdiv; + animation-duration: 1s; + animation-fill-mode: forwards; + animation-delay: 1.2s; + border-radius: 10px; +} + +#answer5 { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + margin-right: 10px; + text-align: center; + display: flex; + width: 220px; + font-size: 17px; + color: transparent; + animation-name: answer; + animation-duration: 1s; + animation-fill-mode: forwards; + animation-delay: 1.2s; +} + +.Greeting { + margin: 4px !important; + color: rgb(129 185 224) !important; + text-align: center !important; + font-size: 20px !important; + width: 212px; + height: 50px; +} +/*_________________________________________________________________________________________________________________________________*/ + + + + +/*_________________________________________________________________________________________________________________________________*/ + +.vng-age-rating.ember-view { + display: none !important; +} + +.clash-aram-intro-modal { + display: none !important; +} + +:host .parties-status-card.open { + filter: hue-rotate(240deg) !important; +} + +.rcp-fe-lol-profiles-main > .component-factory-application > .ember-view > .style-profile-backdrop-component.ember-view > .style-profile-backdrop-container > .style-profile-masked-image { + display: none !important; +} + + +.ranked-intro-background { + display: none !important; +} + +.loot-backdrop.background-static { + background: none !important; +} + +.yourshop-root { + background-image: none !important; +} + +.npe-root-component { + background-image: none !important; +} + +div > div > .rcp-fe-lol-tft-application-background { + background-image: none !important; +} + +.item-page-items-container-wrapper.purchase-history-page-content-wrapper { + background: unset !important; +} + +.postgame-background-image { + display: none !important; +} + +.friend-header { + display: none !important; +} + +.loading-content div > div > .loading-text { + display: none !important; +} + +.hextech-loading-animation > svg { + display: none !important; +} +/*__________________________________________________________________________________________________________________________________*/ + + + + +/*____________________________________________________________Profiles______________________________________________________________*/ + +.style-profile-ranked-reference-modal-button { + display: none !important; +} + +.style-profile-honor-component.ember-view > .style-profile-emblem-wrapper > .style-profile-emblem-header > .style-profile-emblem-header-subtitle { + display: none !important; +} + +.style-profile-emblem-subheader-ranked > div { + color: #cdbe91 !important; + font-size: 0px !important; +} + +.style-profile-ranked-component.ember-view > .style-profile-emblem-wrapper > .style-profile-emblem-header > .style-profile-emblem-header-title { + font-size: 0px !important; +} + +.style-profile-ranked-component.ember-view > .style-profile-emblem-wrapper > .style-profile-emblem-header > .style-profile-emblem-header-title::after { + content: "Apprentice"; + font-size: 12px !important; +} + +.style-profile-emblem-subheader-ranked > div::after { + content: "[Witch]"; + color: #cdbe91 !important; + font-size: 10px !important; +} +/*_________________________________________________________________________________________________________________________________*/ + + + + +/*_________________________________________________________________________________________________________________________________*/ + +.navigation-status-ticker-content-no-link { + background-color: rgba(248, 169, 201, 0.726) !important; + border: 1px solid white !important; + border-radius: 0.5rem !important; + color: rgba(22, 22, 22, 0.626) !important; +} + + +.currency-be-icon-static { + background-image: var(--BE-Icon) !important; + background-position: 0px center !important; +} + +.currency-rp { + background-image: var(--RP-Icon) !important; +} + +.ticker-button { + background-image: var(--Ticker) !important; + border: 2px solid var(--default-color, #e0a9d9) !important; + padding: 2px !important; + border-radius: 50px !important; +} + +.style-profile-clash-banner-empty { + background-image: var(--Clash-banner) !important; +} + +.style-profile-ranked-crest-ranked > lol-regalia-emblem-element { +--regalia-emblem-unranked: var(--Rank-Icon) !important; +--regalia-emblem-iron: var(--Rank-Icon) !important; +--regalia-emblem-bronze: var(--Rank-Icon) !important; +--regalia-emblem-silver: var(--Rank-Icon) !important; +--regalia-emblem-gold: var(--Rank-Icon) !important; +--regalia-emblem-platinum: var(--Rank-Icon) !important; +--regalia-emblem-diamond: var(--Rank-Icon) !important; +--regalia-emblem-master: var(--Rank-Icon) !important; +--regalia-emblem-grandmaster: var(--Rank-Icon) !important; +--regalia-emblem-challenger: var(--Rank-Icon) !important; +} + +.style-profile-honor-icon { + content: var(--Emblem) !important; +} +/*_________________________________________________________________________________________________________________________________*/ + + + +/* End */ + diff --git a/ElainaV2/assets/Icon/ApprenticeWitch.png b/ElainaV2/assets/Icon/ApprenticeWitch.png new file mode 100644 index 0000000..ebab10a Binary files /dev/null and b/ElainaV2/assets/Icon/ApprenticeWitch.png differ diff --git a/ElainaV2/assets/Icon/Avatar.gif b/ElainaV2/assets/Icon/Avatar.gif new file mode 100644 index 0000000..fb080a5 Binary files /dev/null and b/ElainaV2/assets/Icon/Avatar.gif differ diff --git a/ElainaV2/assets/Icon/Clash.png b/ElainaV2/assets/Icon/Clash.png new file mode 100644 index 0000000..0442826 Binary files /dev/null and b/ElainaV2/assets/Icon/Clash.png differ diff --git a/ElainaV2/assets/Icon/ElainaCB.png b/ElainaV2/assets/Icon/ElainaCB.png new file mode 100644 index 0000000..cb89b1f Binary files /dev/null and b/ElainaV2/assets/Icon/ElainaCB.png differ diff --git a/ElainaV2/assets/Icon/ElainaDed.png b/ElainaV2/assets/Icon/ElainaDed.png new file mode 100644 index 0000000..860bd4b Binary files /dev/null and b/ElainaV2/assets/Icon/ElainaDed.png differ diff --git a/ElainaV2/assets/Icon/ElainaFly.gif b/ElainaV2/assets/Icon/ElainaFly.gif new file mode 100644 index 0000000..208cc4d Binary files /dev/null and b/ElainaV2/assets/Icon/ElainaFly.gif differ diff --git a/ElainaV2/assets/Icon/ElainaStare.png b/ElainaV2/assets/Icon/ElainaStare.png new file mode 100644 index 0000000..2707195 Binary files /dev/null and b/ElainaV2/assets/Icon/ElainaStare.png differ diff --git a/ElainaV2/assets/Icon/Hover-card-backdrop.jpg b/ElainaV2/assets/Icon/Hover-card-backdrop.jpg new file mode 100644 index 0000000..238cd0a Binary files /dev/null and b/ElainaV2/assets/Icon/Hover-card-backdrop.jpg differ diff --git a/ElainaV2/assets/Icon/LL-Settings.webm b/ElainaV2/assets/Icon/LL-Settings.webm new file mode 100644 index 0000000..48cb957 Binary files /dev/null and b/ElainaV2/assets/Icon/LL-Settings.webm differ diff --git a/ElainaV2/assets/Icon/Logo.png b/ElainaV2/assets/Icon/Logo.png new file mode 100644 index 0000000..555c8ff Binary files /dev/null and b/ElainaV2/assets/Icon/Logo.png differ diff --git a/ElainaV2/assets/Icon/Rank.png b/ElainaV2/assets/Icon/Rank.png new file mode 100644 index 0000000..b0b73b6 Binary files /dev/null and b/ElainaV2/assets/Icon/Rank.png differ diff --git a/ElainaV2/assets/Icon/audio.png b/ElainaV2/assets/Icon/audio.png new file mode 100644 index 0000000..7aed99b Binary files /dev/null and b/ElainaV2/assets/Icon/audio.png differ diff --git a/ElainaV2/assets/Icon/emblem_5.png b/ElainaV2/assets/Icon/emblem_5.png new file mode 100644 index 0000000..bfb66fa Binary files /dev/null and b/ElainaV2/assets/Icon/emblem_5.png differ diff --git a/ElainaV2/assets/Icon/mute.png b/ElainaV2/assets/Icon/mute.png new file mode 100644 index 0000000..f04f9e0 Binary files /dev/null and b/ElainaV2/assets/Icon/mute.png differ diff --git a/ElainaV2/assets/Icon/next_button.png b/ElainaV2/assets/Icon/next_button.png new file mode 100644 index 0000000..3104071 Binary files /dev/null and b/ElainaV2/assets/Icon/next_button.png differ diff --git a/ElainaV2/assets/Icon/pause_button.png b/ElainaV2/assets/Icon/pause_button.png new file mode 100644 index 0000000..0721099 Binary files /dev/null and b/ElainaV2/assets/Icon/pause_button.png differ diff --git a/ElainaV2/assets/Icon/play_button.png b/ElainaV2/assets/Icon/play_button.png new file mode 100644 index 0000000..ae94259 Binary files /dev/null and b/ElainaV2/assets/Icon/play_button.png differ diff --git a/ElainaV2/assets/Icon/prev_button.png b/ElainaV2/assets/Icon/prev_button.png new file mode 100644 index 0000000..75c5d54 Binary files /dev/null and b/ElainaV2/assets/Icon/prev_button.png differ diff --git a/ElainaV2/assets/Icon/ticker.png b/ElainaV2/assets/Icon/ticker.png new file mode 100644 index 0000000..f68739f Binary files /dev/null and b/ElainaV2/assets/Icon/ticker.png differ diff --git a/ElainaV2/configs/ElainaV2_config.json b/ElainaV2/configs/ElainaV2_config.json new file mode 100644 index 0000000..e575df3 --- /dev/null +++ b/ElainaV2/configs/ElainaV2_config.json @@ -0,0 +1,57 @@ +{ + "css_file": "//plugins/ElainaV2/assets/Css/ElainaV2.css", + + + +"/______________________________________Wallpapers______________________________/": "", + + "/__Support_formats__/": " .mp4, .webm, .mkv, ... idk,maybe more ", + "/___*Notice*__/": " Remember to change both wallpaper name and source ", + + "default_wallpaper":"Elaina3.webm", + "default_wallpaper_src":"//plugins/ElainaV2/assets/Backgrounds/Elaina3.webm", + + "wallpaper_list": ["Elaina1.webm", "Elaina2.webm", "Elaina3.webm", "Elaina4.webm"], + + + "/___*Video volume*___/": "(0.0 is mute, 1.0 is highest)" , + "video_sound_volume": 0.2, + + "pause_wallpaper": false, +"/______________________________________________________________________________/": "", + + + +"/_______________________________________Audio__________________________________/": "", + + "audio_src": "//plugins/ElainaV2/assets/Backgrounds/Old-Ranked_Draft-Champion_Select.mp3", + + + "/___*Audio volume*___/": "(0.0 is mute, 1.0 is highest)" , + "audio_sound_volume": 0.0, + + "pause_audio": false, +"/______________________________________________________________________________/": "", + + + +"/______________________________________________________________________________/": "", + + "Animate-Loading": false, + + "Custom-Avatar": true, + + "Sidebar-Transparent": false, + + "auto_accept": true, + + "Aram-only-mode": false, + + "Hide-Champions-Splash-Art": true, +"/______________________________________________________________________________/": "", + + + "default_home_page": "elaina-home", + + "custom_log": "Sech tan bao" +} \ No newline at end of file diff --git a/ElainaV2/index.js b/ElainaV2/index.js new file mode 100644 index 0000000..a78633d --- /dev/null +++ b/ElainaV2/index.js @@ -0,0 +1,33 @@ +/* By Elaina Da Catto */ +/* Meow~~~ */ + + +//Add something to client +import './resources/LoadingScreen' +import './resources/LL-Settings' +import './resources/Button+Filter' + +//Change or delete something from client +import './resources/Avatar' +import './resources/ChangeClientContents' +import './resources/HideChampsArt' + +//Addon plugins +import './resources/Aram-only' +import './resources/Auto-accept' +import './resources/Dodge-button' +import './resources/Offline-mode' +import './resources/Hide_friendlist' + +//Configs +import data from './configs/ElainaV2_config.json' + +//Load CSS file +import './resources/LoadMainCss' + +//Console +window.addEventListener('load', () => { + console.log('By Elaina Da Catto'); + console.log('Meow ~~~'); + console.log(data["custom_log"]); +}) \ No newline at end of file diff --git a/ElainaV2/resources/Aram-only.js b/ElainaV2/resources/Aram-only.js new file mode 100644 index 0000000..1c1835a --- /dev/null +++ b/ElainaV2/resources/Aram-only.js @@ -0,0 +1,27 @@ +import utils from './_utilselaina'; +import data from"../configs/ElainaV2_config.json"; + +let ARAM = data["Aram-only-mode"]; + +if(ARAM) {window.addEventListener("load",()=>{ + const e=document.createElement("link"); + e.href="//plugins/ElainaV2/assets/Css/Addon-Css/Aram-only.css", + e.type="text/css", + e.rel="stylesheet",document.body.append(e)}); + + let e=e=>{ + let t; + t=e.getAttribute("data-screen-name"), + "rcp-fe-lol-parties"==t&&window.setInterval(()=>{ + try{ + document.querySelector("div[data-game-mode='CLASSIC']").remove(), + document.querySelector("div[data-game-mode='TFT']").remove() + } + catch{} + },100) + }; + + window.addEventListener("load",()=>{ + utils.mutationObserverAddCallback(e,["screen-root"]) + }) +} \ No newline at end of file diff --git a/ElainaV2/resources/Auto-accept.js b/ElainaV2/resources/Auto-accept.js new file mode 100644 index 0000000..87dac0c --- /dev/null +++ b/ElainaV2/resources/Auto-accept.js @@ -0,0 +1,92 @@ +import utils from './_utilselaina'; +import data from"../configs/ElainaV2_config.json"; + +let auto_accept = data["auto_accept"] + +let queue_accepted = false +let player_declined = false + +function autoAcceptQueueButton(){ + let element = document.getElementById("autoAcceptQueueButton") + if (element.attributes.selected != undefined) { + auto_accept = false + element.removeAttribute("selected") + } + else { + element.setAttribute("selected", "true") + auto_accept = true + } +} + +window.autoAcceptQueueButton = autoAcceptQueueButton + + +let autoAcceptCallback = async message => { + utils.phase = JSON.parse(message["data"])[2]["data"] + if (utils.phase == "ReadyCheck" && auto_accept && !queue_accepted) { + await acceptMatchmaking(), + queue_accepted = true + } + else if (utils.phase != "ReadyCheck") { + queue_accepted = false + } +} + +function fetch_or_create_champselect_buttons_container() { + if (document.querySelector(".cs-buttons-container")) { + return document.querySelector(".cs-buttons-container") + } + else { + const div = document.createElement("div") + + div.className = "cs-buttons-container" + document.querySelector(".v2-footer-notifications.ember-view").append(div) + return div + } +} + +let autoAcceptMutationObserver = (mutations) => { + if (document.querySelector(".v2-footer-notifications.ember-view") != null && document.getElementById("autoAcceptQueueButton") == null) { + let newOption = document.createElement("lol-uikit-radio-input-option"); + let container = fetch_or_create_champselect_buttons_container() + + newOption.setAttribute("id", "autoAcceptQueueButton"); + newOption.setAttribute("onclick", "window.autoAcceptQueueButton()"); + + let Option2 = document.createElement("div"); + Option2.classList.add("auto-accept-button-text"); + + newOption.append(Option2) + + if (auto_accept){ + newOption.setAttribute("selected", ""); + } + + +//___________________________________________________________________________// + if (document.querySelector("html").lang == "vi-VN") { + Option2.innerHTML = "Tự động chấp thuận"; + } + else if (document.querySelector("html").lang == "ja-JP") { + Option2.innerHTML = "自動承認"; + } + else { + Option2.innerHTML = "Auto Accept"; + } +//___________________________________________________________________________// + + + container.append(newOption); + } +} + +window.addEventListener('load', () => { + utils.subscribe_endpoint('/lol-gameflow/v1/gameflow-phase', autoAcceptCallback) + utils.routineAddCallback(autoAcceptMutationObserver, ["v2-footer-notifications.ember-view"]) +}) + +let acceptMatchmaking = async () => { + if (player_declined) return; + await fetch('/lol-matchmaking/v1/ready-check/accept', { method: 'POST' }) + +} diff --git a/ElainaV2/resources/Avatar.js b/ElainaV2/resources/Avatar.js new file mode 100644 index 0000000..a8041be --- /dev/null +++ b/ElainaV2/resources/Avatar.js @@ -0,0 +1,56 @@ +import utils from './_utilselaina' +import data from '../configs/ElainaV2_config.json' + +let Avatar = data["Custom-Avatar"] +if (Avatar) { +let changeAvatar1 = async message => { + let phase = JSON.parse(message["data"])[2]["data"]; + if (phase == "Lobby") { + window.setInterval(() => { + try { + document.querySelector("div.lobby-banner.local > lol-regalia-parties-v2-element").shadowRoot.querySelector("div > div > div.regalia-parties-v2-crest-wrapper > lol-regalia-crest-v2-element"). + shadowRoot.querySelector("div > uikit-state-machine > div.lol-regalia-summoner-icon-mask-container > div").style.backgroundImage = "var(--Avatar)" + } + catch {} + }, 20) + } +} + +let changeAvatar2 = (node) => { + let pagename; + pagename = node.getAttribute("data-screen-name") + if (pagename == "rcp-fe-lol-profiles-main") { + window.setInterval(() => { + try { + document.querySelector("div > lol-regalia-profile-v2-element").shadowRoot.querySelector("div > div > div.regalia-profile-crest-hover-area.picker-enabled > lol-regalia-crest-v2-element").shadowRoot.querySelector("div > uikit-state-machine > div.lol-regalia-summoner-icon-mask-container > div").style.backgroundImage = "var(--Avatar)" + } + catch {} + }, 10) + } +} + +window.addEventListener('load', () => { + utils.mutationObserverAddCallback(changeAvatar2, ["screen-root"]) +}) + +window.setInterval(() => { + try { + document.querySelector("lol-uikit-full-page-backdrop > lol-uikit-dialog-frame > div > div.challenges-identity-customizer-contents > div.challenges-identity-customizer-left-container > div > lol-regalia-identity-customizer-element"). + shadowRoot.querySelector("div > div > div.regalia-identity-customizer-crest-wrapper > lol-regalia-crest-v2-element"). + shadowRoot.querySelector("div > uikit-state-machine > div.lol-regalia-summoner-icon-mask-container > div").style.backgroundImage = "var(--Avatar)" + } + catch {} + try { + document.querySelector("#lol-uikit-tooltip-root > div > div > div.hover-card.right.has-regalia.regalia-loaded > div > div.hover-card-info-container > div.hover-card-identity > lol-regalia-hovercard-v2-element"). + shadowRoot.querySelector("lol-regalia-crest-v2-element").shadowRoot.querySelector("div > uikit-state-machine > div.lol-regalia-summoner-icon-mask-container > div").style.backgroundImage = "var(--Avatar)" + + document.querySelector("#hover-card-backdrop").style.backgroundImage = "var(--Hover-card-backdrop)" + } + catch {} +}, 10) + +window.addEventListener('load', () => { + utils.addCss("//plugins/ElainaV2/assets/Css/Addon-Css/Avatar.css") + utils.subscribe_endpoint("/lol-gameflow/v1/gameflow-phase", changeAvatar1) +}) +} \ No newline at end of file diff --git a/ElainaV2/resources/Button+Filter.js b/ElainaV2/resources/Button+Filter.js new file mode 100644 index 0000000..a4806f7 --- /dev/null +++ b/ElainaV2/resources/Button+Filter.js @@ -0,0 +1,167 @@ +import homepage from './CreateHomepage' +import homepagebutton from './Homepagebuttons' +import watermark from './Watermark' + +import utils from './_utilselaina' +import data from '../configs/ElainaV2_config.json' +let default_settings = data + +//___________________________________________________________________________// +var nodeRemovedEvent = function (event) { + if (event.target.classList && event.target.classList.contains("lol-loading-screen-container")) { + let elainaBg = document.getElementById("elaina-bg"); + let viewportRoot = document.getElementById("rcp-fe-viewport-root") + + if (!elainaBg || !viewportRoot) { + return; + } + viewportRoot.style.filter = "none" + elainaBg.style.filter = "brightness(0.7) saturate(0.8)" + + document.removeEventListener("DOMNodeRemoved", nodeRemovedEvent); + } +}; +document.addEventListener("DOMNodeRemoved", nodeRemovedEvent); +//___________________________________________________________________________// + + + +//___________________________________________________________________________// +homepagebutton.apply_default_background() + +let previous_page; +let patcher_go_to_default_home_page = true; +let wallpapers = default_settings["wallpaper_list"]; + +let pageChangeMutation = (node) => { + let pagename; + let elaina_bg_elem = document.getElementById("elaina-bg") + let brightness_modifiers = ["rcp-fe-lol-champ-select", "rcp-fe-lol-store", "rcp-fe-lol-collections", "rcp-fe-lol-profiles-main", + "rcp-fe-lol-parties", "rcp-fe-lol-loot", "rcp-fe-lol-clash-full"] + pagename = node.getAttribute("data-screen-name") + console.log(pagename) + + + if (pagename == "rcp-fe-lol-home-main") { + if (!document.getElementsByClassName("webm-bottom-buttons-container").length) { + homepagebutton.create_webm_buttons() + watermark.ElainaTrigger() + } + homepage.add_elaina_home_page() + homepage.add_elaina_home_navbar() + homepage.go_to_default_home_page() + if (previous_page == "rcp-fe-lol-parties" ){ + homepage.patch_default_home_page() + } + } + else if (pagename != "rcp-fe-lol-navigation-screen" && pagename != "window-controls" && pagename != "rcp-fe-lol-home" && pagename != "social") { + if (document.getElementsByClassName("webm-bottom-buttons-container").length) { + homepagebutton.Delbuttons() + watermark.DelElainaTrigger() + } + } + if (pagename == "social") { + if (patcher_go_to_default_home_page){ + homepage.go_to_default_home_page() + patcher_go_to_default_home_page = false + } + } + if (pagename == "rcp-fe-lol-uikit-full-page-modal-controller") { + return; + } + else if (pagename == "rcp-fe-lol-yourshop") { + elaina_bg_elem.style.filter = 'blur(3px) brightness(0.4) saturate(1.5)'; + } + if (pagename == "rcp-fe-lol-champ-select") { + elaina_bg_elem.style.filter = 'blur(3px) brightness(0.4) saturate(1.5)'; + } + else if (previous_page == "rcp-fe-lol-champ-select" && brightness_modifiers.indexOf(pagename) == -1) { + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'; + } + if (pagename == "rcp-fe-lol-clash-full") { + elaina_bg_elem.style.filter = 'blur(10px) brightness(0.2)'; + } + else if (previous_page == "rcp-fe-lol-clash-full" && brightness_modifiers.indexOf(pagename) == -1) { + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'; + } + if (pagename == "rcp-fe-lol-loot") { + elaina_bg_elem.style.filter = 'brightness(0.3)'; + } + else if (previous_page == "rcp-fe-lol-loot" && brightness_modifiers.indexOf(pagename) == -1) { + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'; + } + if (pagename == "rcp-fe-lol-store") { + elaina_bg_elem.style.filter = 'brightness(0.2)'; + } + else if (previous_page == "rcp-fe-lol-store" && brightness_modifiers.indexOf(pagename) == -1) { + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'; + } + if (pagename == "rcp-fe-lol-collections") { + elaina_bg_elem.style.filter = 'brightness(0.2)'; + } + else if (previous_page == "rcp-fe-lol-collections" && brightness_modifiers.indexOf(pagename) == -1) { + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'; + } + if (pagename == "rcp-fe-lol-profiles-main") { + elaina_bg_elem.style.filter = 'brightness(0.3)'[wallpapers[0]]; + } + else if (previous_page == "rcp-fe-lol-profiles-main") { + if (brightness_modifiers.indexOf(pagename) == -1) + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'; + } + if (pagename == "rcp-fe-lol-parties") { + elaina_bg_elem.style.filter = 'brightness(0.4) blur(6px)'[wallpapers[0]]; + } + else if (previous_page == "rcp-fe-lol-parties" && brightness_modifiers.indexOf(pagename) == -1) { + elaina_bg_elem.style.filter = 'brightness(0.7) saturate(0.8)'[wallpapers[0]]; + } + if (previous_page != pagename) + previous_page = pagename +} + +window.addEventListener('load', () => { + utils.mutationObserverAddCallback(pageChangeMutation, ["screen-root"]) +}) +//___________________________________________________________________________// + + + +//___________________________________________________________________________// +window.addEventListener('load', () => { + const video = document.createElement('video'); + video.id = 'elaina-bg'; + video.autoplay = true; + video.loop = true; + video.src = default_settings["default_wallpaper_src"]; + video.volume = default_settings["video_sound_volume"]; + + const audio = document.createElement("audio"); + audio.autoplay = true; + audio.loop = true; + audio.src = default_settings["audio_src"]; + audio.id = 'bg-audio'; + audio.load(); + audio.addEventListener("load", function() { + audio.play() + }, true); + + document.querySelector("body").prepend(video) + document.querySelector("body").prepend(audio) + + homepagebutton.elaina_play_pause() + + utils.subscribe_endpoint('/lol-gameflow/v1/gameflow-phase', (message) => { + let phase = JSON.parse(message["data"])[2]["data"] + + if (phase == "GameStart" || phase == "InProgress") { + document.getElementById("elaina-bg").style.filter = 'blur(10px) brightness(0.4) saturate(1.5)'; + document.getElementById("elaina-bg").pause() + document.getElementById("bg-audio").pause() + } + else { + homepagebutton.elaina_play_pause() + homepagebutton.audio_play_pause() + } + }) +}) +//___________________________________________________________________________// \ No newline at end of file diff --git a/ElainaV2/resources/ChangeClientContents.js b/ElainaV2/resources/ChangeClientContents.js new file mode 100644 index 0000000..2ab2a44 --- /dev/null +++ b/ElainaV2/resources/ChangeClientContents.js @@ -0,0 +1,105 @@ +import utils from './_utilselaina' + +//___________________________________________________________________________// +let updateLobbyRegaliaBanner = async message => { + let phase = JSON.parse(message["data"])[2]["data"]; + + if (phase == "Lobby") { + window.setInterval(() => { + try { + let base = document.querySelector("lol-regalia-parties-v2-element.regalia-loaded").shadowRoot.querySelector(".regalia-parties-v2-banner-backdrop.regalia-banner-loaded") + + base.shadowRoot.querySelector(".regalia-banner-asset-static-image").style.filter = "sepia(1) brightness(3.5) opacity(0.4)" + base.shadowRoot.querySelector(".regalia-banner-state-machine").shadowRoot.querySelector(".regalia-banner-intro.regalia-banner-video").style.filter = "grayscale(1) saturate(0) brightness(0.5)" + } + catch {} + }, 200) + } +} + +window.addEventListener('load', () => { + utils.subscribe_endpoint("/lol-gameflow/v1/gameflow-phase", updateLobbyRegaliaBanner) +}) +//___________________________________________________________________________// + + + +//___________________________________________________________________________// +window.setInterval(() => { + try { + document.getElementsByClassName("lol-settings-container")[0].style.backgroundColor = "transparent"; + document.querySelector(".lol-settings-container"). + shadowRoot.querySelector("div").style.background = "transparent"; + } + catch {} + + try { + document.querySelector("lol-uikit-full-page-backdrop > lol-uikit-dialog-frame > div > div.challenges-identity-customizer-contents > div.challenges-identity-customizer-left-container > div > lol-regalia-identity-customizer-element"). + shadowRoot.querySelector("div > lol-regalia-banner-v2-element").remove() + } + catch {} + + try { + document.querySelector("lol-uikit-full-page-backdrop > lol-uikit-dialog-frame > div").style.backgroundColor = "transparent"; + document.querySelector("lol-uikit-full-page-backdrop > lol-uikit-dialog-frame"). + shadowRoot.querySelector("div").style.background = "transparent"; + } + catch {} + try { + document.querySelector("#lol-uikit-layer-manager-wrapper > div.modal > div > lol-uikit-dialog-frame"). + shadowRoot.querySelector("div").style.background = "transparent" + } + catch {} +}, 100) +//___________________________________________________________________________// + + + +//___________________________________________________________________________// +let ChangeContents = (node) => { + let ranked_observer; + let previous_page; + let pagename; + pagename = node.getAttribute("data-screen-name") + + if (pagename == "rcp-fe-lol-profiles-main") { + let rankedNode = document.querySelector('[section-id="profile_subsection_leagues"]') + + window.setInterval(() => { + try { + document.querySelector("div > lol-regalia-profile-v2-element").shadowRoot.querySelector("div > lol-regalia-banner-v2-element").shadowRoot.querySelector("div > uikit-state-machine > div:nth-child(2) > img").remove() + document.querySelector("div > div.summoner-xp-radial").remove() + } + catch {} + }, 100) + + if (!ranked_observer && rankedNode) { + ranked_observer = new MutationObserver(mutations => { + mutations.forEach(mutation => { + if (mutation.target.classList.contains('visible')) { + let tmpInterval = window.setInterval(() => { + try { + document.querySelector("div.smoke-background-container > lol-uikit-parallax-background").shadowRoot.querySelector(".parallax-layer-container").style.backgroundImage = '' + window.clearInterval(tmpInterval) + } + catch {} + }, 500) + } + }); + }); + ranked_observer.observe(document.querySelector('[section-id="profile_subsection_leagues"]'), { attributes: true, childList: false, subtree: false }); + } + } + else if (previous_page == "rcp-fe-lol-profiles-main") { + if (ranked_observer) + ranked_observer.disconnect() + ranked_observer = undefined + } + if (previous_page != pagename) + previous_page = pagename +} + +window.addEventListener('load', () => { + utils.mutationObserverAddCallback(ChangeContents, ["screen-root"]) +}) +//___________________________________________________________________________// \ No newline at end of file diff --git a/ElainaV2/resources/CreateHomepage.js b/ElainaV2/resources/CreateHomepage.js new file mode 100644 index 0000000..7a3476c --- /dev/null +++ b/ElainaV2/resources/CreateHomepage.js @@ -0,0 +1,90 @@ +import data from '../configs/ElainaV2_config.json' +let default_settings = data + + + +//___________________________________________________________________________// +function create_element(tagName, className, content) { + const el = document.createElement(tagName); + el.className = className; + if (content) { + el.innerHTML = content; + } + return el; +}; + +function go_to_default_home_page() { + if (default_settings["default_home_page"]) { + document.querySelector(`lol-uikit-navigation-item[item-id='${default_settings["default_home_page"]}']`).click() + } +} + +function add_elaina_home_page() { + let lol_home = document.querySelector(".rcp-fe-lol-home > lol-uikit-section-controller") + + if (lol_home) { + if (!lol_home.querySelector("[section-id='elaina-home']")) { + let elaina_home = create_element("lol-uikit-section", "") + let div = create_element("div", "wrapper") + + div.id = "elaina-home" + elaina_home.setAttribute("section-id", "elaina-home") + elaina_home.append(div) + lol_home.prepend(elaina_home) + } + } +} + +function add_elaina_home_navbar() { + let navbar = document.querySelector(".rcp-fe-lol-home > lol-uikit-navigation-bar") + + if (navbar) { + if (!navbar.querySelector("[item-id='elaina-home']")) { + let elaina_home_navbar_item = create_element("lol-uikit-navigation-item", "") + + elaina_home_navbar_item.setAttribute("item-id", "elaina-home") + elaina_home_navbar_item.setAttribute("priority", 1) + + +//___________________________________________________________________________// + if (document.querySelector("html").lang == "vi-VN") { + elaina_home_navbar_item.textContent = "Trang chủ" + } + else if (document.querySelector("html").lang == "ja-JP") { + elaina_home_navbar_item.textContent = "ホームページ" + } + else { + elaina_home_navbar_item.textContent = "Home" + } +//___________________________________________________________________________// + + + navbar.prepend(elaina_home_navbar_item) + } + } +} + +function patch_default_home_page(){ + let loop = 0 + let intervalId = window.setInterval(() => { + if (loop >= 5) { + window.clearInterval(intervalId) + } + go_to_default_home_page() + loop += 1 + }, 300) +} +//___________________________________________________________________________// + + + +//___________________________________________________________________________// +let homepage = { + add_elaina_home_navbar: add_elaina_home_navbar, + add_elaina_home_page: add_elaina_home_page, + patch_default_home_page: patch_default_home_page, + go_to_default_home_page: go_to_default_home_page +} +//___________________________________________________________________________// + +export default homepage \ No newline at end of file diff --git a/ElainaV2/resources/Dodge-button.js b/ElainaV2/resources/Dodge-button.js new file mode 100644 index 0000000..400c1aa --- /dev/null +++ b/ElainaV2/resources/Dodge-button.js @@ -0,0 +1,69 @@ +async function exitClient(){ + await fetch("/process-control/v1/process/quit", + {method:"POST"} + ) +} + +async function dodgeQueue(){ + await fetch('/lol-login/v1/session/invoke?destination=lcdsServiceProxy&method=call&args=["","teambuilder-draft","quitV2",""]', + {body:'["","teambuilder-draft","quitV2",""]',method:"POST"} + ) +} + +function generateDodgeAndExitButton(t){ + const e=document.createElement("div"), + o=document.createElement("div"), + i=document.createElement("div"); + + o.setAttribute("class","dodge-button-container"), + o.setAttribute("style","position: absolute;right: 0px;bottom: 57px;display: flex;align-items: flex-end;"), + + e.setAttribute("class","quit-button ember-view"), + e.setAttribute("onclick","window.dodgeQueue()"), + e.setAttribute("id","dodgeButton"), + + i.setAttribute("class","quit-button ember-view"), + i.setAttribute("onclick","window.exitClient()"), + i.setAttribute("id","exitButton"); + + const n=document.createElement("lol-uikit-flat-button"), + d=document.createElement("lol-uikit-flat-button"); + + +//___________________________________________________________________________// + if (document.querySelector("html").lang == "vi-VN") { + d.innerHTML="Hủy"; n.innerHTML="Thoát" + } + else if (document.querySelector("html").lang == "ja-JP") { + d.innerHTML="やめる"; n.innerHTML="出口" + } + else { + d.innerHTML="Dodge"; n.innerHTML="Exit" + } +//___________________________________________________________________________// + + + e.appendChild(d), + i.appendChild(n), + o.appendChild(e), + o.appendChild(i), + + console.log(o), + + t.parentNode.insertBefore(o,t) +} + +import utils from './_utilselaina'; + +window.exitClient=exitClient, +window.dodgeQueue=dodgeQueue; + +let addDodgeAndExitButtonObserver=t=>{ + "ChampSelect"==utils.phase&&document.querySelector(".bottom-right-buttons")&&!document.querySelector(".dodge-button-container")&&generateDodgeAndExitButton( + document.querySelector(".bottom-right-buttons") + ) +}; + +window.addEventListener("load",()=>{ + utils.routineAddCallback(addDodgeAndExitButtonObserver,["bottom-right-buttons"]) +}); \ No newline at end of file diff --git a/ElainaV2/resources/HideChampsArt.js b/ElainaV2/resources/HideChampsArt.js new file mode 100644 index 0000000..d44b32d --- /dev/null +++ b/ElainaV2/resources/HideChampsArt.js @@ -0,0 +1,10 @@ +import utils from './_utilselaina' +import data from '../configs/ElainaV2_config.json' + +let HideChampsArt = data["Hide-Champions-Splash-Art"] + +if (HideChampsArt) { + window.addEventListener('load', () => { + utils.addCss("//plugins/ElainaV2/assets/Css/Addon-Css/Hide-Champs-Splash-Art.css") + }) +} \ No newline at end of file diff --git a/ElainaV2/resources/Hide_friendlist.js b/ElainaV2/resources/Hide_friendlist.js new file mode 100644 index 0000000..f7550e9 --- /dev/null +++ b/ElainaV2/resources/Hide_friendlist.js @@ -0,0 +1 @@ +(()=>{"use strict";var t={723:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([t.id,".q2yQU5UfQcRPItl3Jwrw{display:none}.f57AWuFjwzhT5zV7cujr,.mPZ4NPDDuU94M8S7ePy4{display:block;cursor:pointer;width:inherit;height:inherit;-webkit-mask:url(https://img.icons8.com/material-outlined/24/null/visible--v1.png) no-repeat center;background-color:#c8aa6e;-webkit-mask-size:18px}.mPZ4NPDDuU94M8S7ePy4{-webkit-mask:url(https://img.icons8.com/material-outlined/24/null/hide.png) no-repeat center;-webkit-mask-size:18px}",""]),a.locals={hidden:"q2yQU5UfQcRPItl3Jwrw",icon:"f57AWuFjwzhT5zV7cujr",iconHidden:"mPZ4NPDDuU94M8S7ePy4"};const s=a},869:(t,e,n)=>{n.d(e,{Z:()=>s});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([t.id,".B7xMZxPLr2xOc1UqnA6g{position:absolute;top:-80px}",""]),a.locals={container:"B7xMZxPLr2xOc1UqnA6g"};const s=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=i),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),e.push(l))}},e}},81:t=>{t.exports=function(t){return t[1]}},379:t=>{var e=[];function n(t){for(var n=-1,r=0;r{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0,(()=>{var t,e,r,o,i,a,s,c,u={},l=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function d(e,n,r){var o,i,a,s={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return _(e,s,o,i,null)}function _(t,n,o,i,a){var s={type:t,props:n,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++r:a};return null==a&&null!=e.vnode&&e.vnode(s),s}function y(t){return t.children}function v(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||f.test(e)?n:n+"px"}function m(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||v(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||v(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?b:g,i):t.removeEventListener(e,i?b:g,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function g(t){o=!0;try{return this.l[t.type+!1](e.event?e.event(t):t)}finally{o=!1}}function b(t){o=!0;try{return this.l[t.type+!0](e.event?e.event(t):t)}finally{o=!1}}function w(t,e){this.props=t,this.context=e}function E(t,e){if(null==e)return t.__?E(t.__,t.__.__k.indexOf(t)+1):null;for(var n;ee&&i.sort((function(t,e){return t.__v.__b-e.__v.__b})));k.__r=0}function L(t,e,n,r,o,i,a,s,c,f){var h,p,d,v,m,g,b,w=r&&r.__k||l,x=w.length;for(n.__k=[],h=0;h0?_(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)){if(v.__=n,v.__b=n.__b+1,null===(d=w[h])||d&&v.key==d.key&&v.type===d.type)w[h]=void 0;else for(p=0;p=0;e--)if((n=t.__k[e])&&(r=T(n)))return r;return null}function j(t,n,r,o,i,a,s,c,u){var l,f,p,d,_,v,m,g,b,E,x,O,S,k,A,P=n.type;if(void 0!==n.constructor)return null;null!=r.__h&&(u=r.__h,c=n.__e=r.__e,n.__h=null,a=[c]),(l=e.__b)&&l(n);try{t:if("function"==typeof P){if(g=n.props,b=(l=P.contextType)&&o[l.__c],E=l?b?b.props.value:l.__:o,r.__c?m=(f=n.__c=r.__c).__=f.__E:("prototype"in P&&P.prototype.render?n.__c=f=new P(g,E):(n.__c=f=new w(g,E),f.constructor=P,f.render=D),b&&b.sub(f),f.props=g,f.state||(f.state={}),f.context=E,f.__n=o,p=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=P.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=h({},f.__s)),h(f.__s,P.getDerivedStateFromProps(g,f.__s))),d=f.props,_=f.state,f.__v=n,p)null==P.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==P.getDerivedStateFromProps&&g!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,E),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,E)||n.__v===r.__v){for(n.__v!==r.__v&&(f.props=g,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.forEach((function(t){t&&(t.__=n)})),x=0;x=r.__.length&&r.__.push({__V:G}),r.__[t]}function Y(t){return W=1,function(t,e,n){var r=Q(I++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):it(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=M,!M.u)){M.u=!0;var o=M.shouldComponentUpdate;M.shouldComponentUpdate=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(t){return t.__c}));if(i.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var a=!1;return i.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&r.__c.props===t)&&(!o||o.call(this,t,e,n))}}return r.__N||r.__}(it,t)}function X(t,n){var r=Q(I++,3);!e.__s&&function(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}(r.__H,n)&&(r.__=t,r.i=n,M.__H.__h.push(r))}function tt(){for(var t;t=z.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rt),t.__H.__h.forEach(ot),t.__H.__h=[]}catch(n){t.__H.__h=[],e.__e(n,t.__v)}}e.__b=function(t){M=null,V&&V(t)},e.__r=function(t){J&&J(t),I=0;var e=(M=t.__c).__H;e&&(H===M?(e.__h=[],M.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=G,t.__N=t.i=void 0}))):(e.__h.forEach(rt),e.__h.forEach(ot),e.__h=[])),H=M},e.diffed=function(t){Z&&Z(t);var n=t.__c;n&&n.__H&&(n.__H.__h.length&&(1!==z.push(n)&&q===e.requestAnimationFrame||((q=e.requestAnimationFrame)||nt)(tt)),n.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==G&&(t.__=t.__V),t.i=void 0,t.__V=G}))),H=M=null},e.__c=function(t,n){n.some((function(t){try{t.__h.forEach(rt),t.__h=t.__h.filter((function(t){return!t.__||ot(t)}))}catch(r){n.some((function(t){t.__h&&(t.__h=[])})),n=[],e.__e(r,t.__v)}})),$&&$(t,n)},e.unmount=function(t){K&&K(t);var n,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{rt(t)}catch(t){n=t}})),r.__H=void 0,n&&e.__e(n,r.__v))};var et="function"==typeof requestAnimationFrame;function nt(t){var e,n=function(){clearTimeout(r),et&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);et&&(e=requestAnimationFrame(n))}function rt(t){var e=M,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),M=e}function ot(t){var e=M;t.__c=t.__(),M=e}function it(t,e){return"function"==typeof e?e(t):e}var at=function(t,e){return localStorage.setItem(t,JSON.stringify(e))},st=function(t){return"true"===localStorage.getItem(t)},ct=0;function ut(t,n,r,o,i,a){var s,c,u={};for(c in n)"ref"==c?s=n[c]:u[c]=n[c];var l={type:t,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ct,__source:i,__self:a};if("function"==typeof t&&(s=t.defaultProps))for(c in s)void 0===u[c]&&(u[c]=s[c]);return e.vnode&&e.vnode(l),l}function lt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ft(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3;)n.pop()();if(n[1]>>1,1),e.i.removeChild(t)}}),B(d(St,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Lt(t,e){var n=d(kt,{__v:t,i:e});return n.containerInfo=e,n}(xt.prototype=new w).__a=function(t){var e=this,n=Et(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),Ot(e,t,r)):o()};n?n(i):i()}},xt.prototype.render=function(t){this.u=null,this.o=new Map;var e=P(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},xt.prototype.componentDidUpdate=xt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ot(t,n,e)}))};var At="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Pt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Nt="undefined"!=typeof document,Tt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(w.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var jt=e.event;function Ct(){}function Rt(){return this.cancelBubble}function Ut(){return this.defaultPrevented}e.event=function(t){return jt&&(t=jt(t)),t.persist=Ct,t.isPropagationStopped=Rt,t.isDefaultPrevented=Ut,t.nativeEvent=t};var Ft={configurable:!0,get:function(){return this.class}},Dt=e.vnode;e.vnode=function(t){var e=t.type,n=t.props,r=n;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in r={},n){var a=n[i];Nt&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in n&&null==a||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!Tt(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Pt.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),r[i]&&(i="oninputCapture")),r[i]=a)}"select"==e&&r.multiple&&Array.isArray(r.value)&&(r.value=P(n.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==e&&null!=r.defaultValue&&(r.value=P(n.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),t.props=r,n.class!=n.className&&(Ft.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ft))}t.$$typeof=At,Dt&&Dt(t)};var Bt=e.__r;e.__r=function(t){Bt&&Bt(t),t.__c};var It=n(379),Mt=n.n(It),Ht=n(795),qt=n.n(Ht),Wt=n(565),zt=n.n(Wt),Gt=n(216),Vt=n.n(Gt),Jt=n(589),Zt=n.n(Jt),$t=n(723),Kt={};Kt.styleTagTransform=Zt(),Kt.setAttributes=zt(),Kt.insert=function(t){document.addEventListener("DOMContentLoaded",(()=>document.head.appendChild(t)))},Kt.domAPI=qt(),Kt.insertStyleElement=Vt(),Mt()($t.Z,Kt);const Qt=$t.Z&&$t.Z.locals?$t.Z.locals:void 0;function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n lol-social-roster > lol-uikit-scrollable");o?null==t||t.classList.add(Qt.hidden):null==t||t.classList.remove(Qt.hidden)}),[o]),ut(y,{children:Lt(ut("span",{className:"action-bar-button ember-view",onClick:function(){i((function(t){return!t}))},children:ut("div",{className:o?Qt.iconHidden:Qt.icon})}),null!==(t=document.querySelector(".actions-bar .buttons"))&&void 0!==t?t:document.head)})};Xt.on=".lol-social-lower-pane-container";const te=Xt,ee=function(){return ut(pt,{children:ut(te,{})})};var ne=function(){return Lt(ut("link",{href:"//assets/styles/MinimalistTheme.global.css",rel:"stylesheet"}),document.body)};ne.on=".main-navigation-menu-item";const re=ne;function oe(t,e){return function(){return t.apply(e,arguments)}}const{toString:ie}=Object.prototype,{getPrototypeOf:ae}=Object,se=(ce=Object.create(null),t=>{const e=ie.call(t);return ce[e]||(ce[e]=e.slice(8,-1).toLowerCase())});var ce;const ue=t=>(t=t.toLowerCase(),e=>se(e)===t),le=t=>e=>typeof e===t,{isArray:fe}=Array,he=le("undefined"),pe=ue("ArrayBuffer"),de=le("string"),_e=le("function"),ye=le("number"),ve=t=>null!==t&&"object"==typeof t,me=t=>{if("object"!==se(t))return!1;const e=ae(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},ge=ue("Date"),be=ue("File"),we=ue("Blob"),Ee=ue("FileList"),xe=ue("URLSearchParams");function Oe(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),fe(t))for(r=0,o=t.length;r0;)if(r=n[o],e===r.toLowerCase())return r;return null}const ke="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Le=t=>!he(t)&&t!==ke,Ae=(Pe="undefined"!=typeof Uint8Array&&ae(Uint8Array),t=>Pe&&t instanceof Pe);var Pe;const Ne=ue("HTMLFormElement"),Te=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),je=ue("RegExp"),Ce=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Oe(n,((n,o)=>{!1!==e(n,o,t)&&(r[o]=n)})),Object.defineProperties(t,r)},Re="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",Fe={DIGIT:Ue,ALPHA:Re,ALPHA_DIGIT:Re+Re.toUpperCase()+Ue},De={isArray:fe,isArrayBuffer:pe,isBuffer:function(t){return null!==t&&!he(t)&&null!==t.constructor&&!he(t.constructor)&&_e(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||ie.call(t)===e||_e(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&pe(t.buffer),e},isString:de,isNumber:ye,isBoolean:t=>!0===t||!1===t,isObject:ve,isPlainObject:me,isUndefined:he,isDate:ge,isFile:be,isBlob:we,isRegExp:je,isFunction:_e,isStream:t=>ve(t)&&_e(t.pipe),isURLSearchParams:xe,isTypedArray:Ae,isFileList:Ee,forEach:Oe,merge:function t(){const{caseless:e}=Le(this)&&this||{},n={},r=(r,o)=>{const i=e&&Se(n,o)||o;me(n[i])&&me(r)?n[i]=t(n[i],r):me(r)?n[i]=t({},r):fe(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t(Oe(e,((e,r)=>{n&&_e(e)?t[r]=oe(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],r&&!r(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==n&&ae(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:se,kindOfTest:ue,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(fe(t))return t;let e=t.length;if(!ye(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:Ne,hasOwnProperty:Te,hasOwnProp:Te,reduceDescriptors:Ce,freezeMethods:t=>{Ce(t,((e,n)=>{if(_e(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];_e(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return fe(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Se,global:ke,isContextDefined:Le,ALPHABET:Fe,generateString:(t=16,e=Fe.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&_e(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(ve(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=fe(t)?[]:{};return Oe(t,((t,e)=>{const i=n(t,r+1);!he(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)}};function Be(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}De.inherits(Be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ie=Be.prototype,Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Me[t]={value:t}})),Object.defineProperties(Be,Me),Object.defineProperty(Ie,"isAxiosError",{value:!0}),Be.from=(t,e,n,r,o,i)=>{const a=Object.create(Ie);return De.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Be.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const He=Be;function qe(t){return De.isPlainObject(t)||De.isArray(t)}function We(t){return De.endsWith(t,"[]")?t.slice(0,-2):t}function ze(t,e,n){return t?t.concat(e).map((function(t,e){return t=We(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Ge=De.toFlatObject(De,{},null,(function(t){return/^is[A-Z]/.test(t)})),Ve=function(t,e,n){if(!De.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=De.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!De.isUndefined(e[t])}))).metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&De.isSpecCompliantForm(e);if(!De.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(De.isDate(t))return t.toISOString();if(!s&&De.isBlob(t))throw new He("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(t)||De.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,o){let s=t;if(t&&!o&&"object"==typeof t)if(De.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(De.isArray(t)&&function(t){return De.isArray(t)&&!t.some(qe)}(t)||(De.isFileList(t)||De.endsWith(n,"[]"))&&(s=De.toArray(t)))return n=We(n),s.forEach((function(t,r){!De.isUndefined(t)&&null!==t&&e.append(!0===a?ze([n],r,i):null===a?n:n+"[]",c(t))})),!1;return!!qe(t)||(e.append(ze(o,n,i),c(t)),!1)}const l=[],f=Object.assign(Ge,{defaultVisitor:u,convertValue:c,isVisitable:qe});if(!De.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!De.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),De.forEach(n,(function(n,i){!0===(!(De.isUndefined(n)||null===n)&&o.call(e,n,De.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e};function Je(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Ze(t,e){this._pairs=[],t&&Ve(t,this,e)}const $e=Ze.prototype;$e.append=function(t,e){this._pairs.push([t,e])},$e.toString=function(t){const e=t?function(e){return t.call(this,e,Je)}:Je;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const Ke=Ze;function Qe(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ye(t,e,n){if(!e)return t;const r=n&&n.encode||Qe,o=n&&n.serialize;let i;if(i=o?o(e,n):De.isURLSearchParams(e)?e.toString():new Ke(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const Xe=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){De.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},tn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},en="undefined"!=typeof URLSearchParams?URLSearchParams:Ke,nn=FormData,rn=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),on="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,an={isBrowser:!0,classes:{URLSearchParams:en,FormData:nn,Blob},isStandardBrowserEnv:rn,isStandardBrowserWebWorkerEnv:on,protocols:["http","https","file","blob","url","data"]},sn=function(t){function e(t,n,r,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;return i=!i&&De.isArray(r)?r.length:i,s?(De.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&De.isObject(r[i])||(r[i]=[]),e(t,n,r[i],o)&&De.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r{e(function(t){return De.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null},cn={"Content-Type":void 0},un={transitional:tn,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=De.isObject(t);if(o&&De.isHTMLForm(t)&&(t=new FormData(t)),De.isFormData(t))return r&&r?JSON.stringify(sn(t)):t;if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t))return t;if(De.isArrayBufferView(t))return t.buffer;if(De.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Ve(t,new an.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return an.isNode&&De.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=De.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Ve(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(De.isString(t))try{return(0,JSON.parse)(t),De.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||un.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&De.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw He.from(t,He.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:an.classes.FormData,Blob:an.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};De.forEach(["delete","get","head"],(function(t){un.headers[t]={}})),De.forEach(["post","put","patch"],(function(t){un.headers[t]=De.merge(cn)}));const ln=un,fn=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hn=Symbol("internals");function pn(t){return t&&String(t).trim().toLowerCase()}function dn(t){return!1===t||null==t?t:De.isArray(t)?t.map(dn):String(t)}function _n(t,e,n,r){return De.isFunction(r)?r.call(this,e,n):De.isString(e)?De.isString(r)?-1!==e.indexOf(r):De.isRegExp(r)?r.test(e):void 0:void 0}class yn{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=pn(e);if(!o)throw new Error("header name must be a non-empty string");const i=De.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=dn(t))}const i=(t,e)=>De.forEach(t,((t,n)=>o(t,n,e)));return De.isPlainObject(t)||t instanceof this.constructor?i(t,e):De.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&fn[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&o(e,t,n),this}get(t,e){if(t=pn(t)){const n=De.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(De.isFunction(e))return e.call(this,t,n);if(De.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=pn(t)){const n=De.findKey(this,t);return!(!n||void 0===this[n]||e&&!_n(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=pn(t)){const o=De.findKey(n,t);!o||e&&!_n(0,n[o],o,e)||(delete n[o],r=!0)}}return De.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!_n(0,this[o],o,t)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return De.forEach(this,((r,o)=>{const i=De.findKey(n,o);if(i)return e[i]=dn(r),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete e[o],e[a]=dn(r),n[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return De.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&De.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[hn]=this[hn]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=pn(t);e[r]||(function(t,e){const n=De.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return De.isArray(t)?t.forEach(r):r(t),this}}yn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),De.freezeMethods(yn.prototype),De.freezeMethods(yn);const vn=yn;function mn(t,e){const n=this||ln,r=e||n,o=vn.from(r.headers);let i=r.data;return De.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function gn(t){return!(!t||!t.__CANCEL__)}function bn(t,e,n){He.call(this,null==t?"canceled":t,He.ERR_CANCELED,e,n),this.name="CanceledError"}De.inherits(bn,He,{__CANCEL__:!0});const wn=bn,En=an.isStandardBrowserEnv?{write:function(t,e,n,r,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),De.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),De.isString(r)&&a.push("path="+r),De.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function xn(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const On=an.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=De.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0},Sn=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),u=r[a];o||(o=c),n[i]=s,r[i]=c;let l=a,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),c-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,c=r(s);n=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const Ln={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const o=vn.from(t.headers).normalize(),i=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}De.isFormData(r)&&(an.isStandardBrowserEnv||an.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+n))}const u=xn(t.baseURL,t.url);function l(){if(!c)return;const r=vn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),s()}),(function(t){n(t),s()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Ye(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new He("Request aborted",He.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new He("Network Error",He.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||tn;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new He(e,r.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,t,c)),c=null},an.isStandardBrowserEnv){const e=(t.withCredentials||On(u))&&t.xsrfCookieName&&En.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&De.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),De.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",kn(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",kn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{c&&(n(!e||e.type?new wn(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===an.protocols.indexOf(f)?n(new He("Unsupported protocol "+f+":",He.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};De.forEach(Ln,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const An={getAdapter:t=>{t=De.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;ot instanceof vn?t.toJSON():t;function jn(t,e){e=e||{};const n={};function r(t,e,n){return De.isPlainObject(t)&&De.isPlainObject(e)?De.merge.call({caseless:n},t,e):De.isPlainObject(e)?De.merge({},e):De.isArray(e)?e.slice():e}function o(t,e,n){return De.isUndefined(e)?De.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function i(t,e){if(!De.isUndefined(e))return r(void 0,e)}function a(t,e){return De.isUndefined(e)?De.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function s(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Tn(t),Tn(e),!0)};return De.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const i=c[r]||o,a=i(t[r],e[r],r);De.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Cn="1.3.2",Rn={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Rn[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Un={};Rn.transitional=function(t,e,n){function r(t,e){return"[Axios v"+Cn+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new He(r(o," has been removed"+(e?" in "+e:"")),He.ERR_DEPRECATED);return e&&!Un[o]&&(Un[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}};const Fn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const e=t[i],n=void 0===e||a(e,i,t);if(!0!==n)throw new He("option "+i+" must be "+n,He.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new He("Unknown option "+i,He.ERR_BAD_OPTION)}},validators:Rn},Dn=Fn.validators;class Bn{constructor(t){this.defaults=t,this.interceptors={request:new Xe,response:new Xe}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jn(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;let i;void 0!==n&&Fn.assertOptions(n,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),void 0!==r&&Fn.assertOptions(r,{encode:Dn.function,serialize:Dn.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&De.merge(o.common,o[e.method]),i&&De.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=vn.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[Nn.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new wn(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Mn((function(e){t=e}));return{token:e,cancel:t}}}const Hn=Mn,qn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qn).forEach((([t,e])=>{qn[e]=t}));const Wn=qn,zn=function t(e){const n=new In(e),r=oe(In.prototype.request,n);return De.extend(r,In.prototype,n,{allOwnKeys:!0}),De.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(jn(e,n))},r}(ln);zn.Axios=In,zn.CanceledError=wn,zn.CancelToken=Hn,zn.isCancel=gn,zn.VERSION=Cn,zn.toFormData=Ve,zn.AxiosError=He,zn.Cancel=zn.CanceledError,zn.all=function(t){return Promise.all(t)},zn.spread=function(t){return function(e){return t.apply(null,e)}},zn.isAxiosError=function(t){return De.isObject(t)&&!0===t.isAxiosError},zn.mergeConfig=jn,zn.AxiosHeaders=vn,zn.formToJSON=t=>sn(De.isHTMLForm(t)?new FormData(t):t),zn.HttpStatusCode=Wn,zn.default=zn;const Gn=zn;function Vn(t){return Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(t)}function Jn(){Jn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),s=new S(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var _={};c(_,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&n.call(v,i)&&(_=v);var m=d.prototype=h.prototype=Object.create(_);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,i,a,s){var c=l(t[r],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==Vn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Zn(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function $n(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Zn(i,r,o,a,s,"next",t)}function s(t){Zn(i,r,o,a,s,"throw",t)}a(void 0)}))}}var Kn=function(){var t=$n(Jn().mark((function t(){return Jn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Gn.post('/lol-login/v1/session/invoke?destination=lcdsServiceProxy&method=call&args=["","teambuilder-draft","quitV2",""]',["","teambuilder-draft","quitV2",""]);case 2:window.location.reload();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Qn=function(){var t=$n(Jn().mark((function t(){return Jn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Gn.post("/lol-lobby/v1/lobby/custom/cancel-champ-select");case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function Yn(t){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(t)}function Xn(){Xn=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),s=new S(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var _={};c(_,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&n.call(v,i)&&(_=v);var m=d.prototype=h.prototype=Object.create(_);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,i,a,s){var c=l(t[r],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==Yn(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function tr(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}var er=".bottom-right-buttons",nr=function(){var t,e=function(){var t,e=(t=Xn().mark((function t(){return Xn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Kn();case 2:return t.next=4,Qn();case 4:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){tr(i,r,o,a,s,"next",t)}function s(t){tr(i,r,o,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return Lt(ut(y,{children:ut("div",{className:"quit-button",onClick:e,children:ut("lol-uikit-flat-button",{children:"Sair"})})}),null!==(t=document.querySelector(er))&&void 0!==t?t:document.head)};nr.on=er;const rr=nr;var or=n(869),ir={};ir.styleTagTransform=Zt(),ir.setAttributes=zt(),ir.insert=function(t){document.addEventListener("DOMContentLoaded",(()=>document.head.appendChild(t)))},ir.domAPI=qt(),ir.insertStyleElement=Vt(),Mt()(or.Z,ir);const ar=or.Z&&or.Z.locals?or.Z.locals:void 0;var sr=".invite-info-panel-container",cr=function(t){var e,n=t.children;return Lt(ut("div",{className:ar.container,children:n}),null!==(e=document.querySelector(sr))&&void 0!==e?e:document.head)};function ur(t){return ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(t)}function lr(){lr=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),s=new S(o||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function h(){}function p(){}function d(){}var _={};c(_,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&n.call(v,i)&&(_=v);var m=d.prototype=h.prototype=Object.create(_);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(r,i,a,s){var c=l(t[r],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==ur(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function fr(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function hr(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){fr(i,r,o,a,s,"next",t)}function s(t){fr(i,r,o,a,s,"throw",t)}a(void 0)}))}}cr.on=sr;var pr=[cr,re,rr,te],dr=function(){var t=hr(lr().mark((function t(){return lr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.addEventListener("load",hr(lr().mark((function t(){var e,n,r,o,i;return lr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=function(){return document.getElementById("rcp-fe-viewport-root")};case 1:if(n()){t.next=6;break}return t.next=4,new Promise((function(t){return setTimeout(t,200)}));case 4:t.next=1;break;case 6:r=new MutationObserver(function(){var t=hr(lr().mark((function t(e){var r,o,i;return lr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=pr;case 1:if(!(r { + force_audio_pause = !force_audio_pause + audio_play_pause() + play_pause_set_icon_audio() + }) + + pauseBg.addEventListener("click", () => { + force_bg_pause = !force_bg_pause + elaina_play_pause() + play_pause_set_icon() + }) + + nextBg.addEventListener("click", () => { + next_wallpaper() + }) + + prevBg.addEventListener("click", () => { + prev_wallpaper() + }) + + nextBgIcon.setAttribute("src", "//plugins/ElainaV2/assets/Icon/next_button.png") + prevBgIcon.setAttribute("src", "//plugins/ElainaV2/assets/Icon/prev_button.png") + + + let showcontainer = document.getElementsByClassName("rcp-fe-lol-home")[0] + showcontainer.appendChild(container) + //showcontainer.appendChild(containeraudio) + + + container.append(pauseAudio) + container.append(pauseBg) + //container.append(prevBg) + container.append(nextBg) + + + pauseAudio.append(pauseAudioIcon) + pauseBg.append(pauseBgIcon) + //prevBg.append(prevBgIcon) + nextBg.append(nextBgIcon) + + //containeraudio.append(audioVolume) +} + +function Delbuttons() { + document.getElementsByClassName("webm-bottom-buttons-container")[0].remove() +} +//___________________________________________________________________________// + + + +//___________________________________________________________________________// +let homepagebutton = { + elaina_play_pause: elaina_play_pause, + audio_play_pause: audio_play_pause, + create_webm_buttons: create_webm_buttons, + Delbuttons: Delbuttons, + apply_default_background: apply_default_background +} + +export default homepagebutton \ No newline at end of file diff --git a/ElainaV2/resources/LL-Settings.js b/ElainaV2/resources/LL-Settings.js new file mode 100644 index 0000000..b7b0cf4 --- /dev/null +++ b/ElainaV2/resources/LL-Settings.js @@ -0,0 +1,114 @@ +const TRANSLATIONS = { + ['en']: { + 'l.open_settings': 'Open Settings', + 'l.close': 'Close', + 'l.open_devtools': 'Open DevTools', + 'l.reload_client': 'Reload Client', + 'l.open_plugins': 'Open Plugins folder', + } +} + +// Create loader UI. +async function createLoaderMenu(root) { + // Import nano-jsx from CDN. + const { Component, jsx, render } = await import('//esm.run/nano-jsx') + + // Get translation. + const lang = document.body.dataset['lang'] + /** @type {TRANSLATIONS['en']} */ + const _t = TRANSLATIONS[lang] || TRANSLATIONS['en'] + + // Get League Loader version. + const version = window['__llver'] + + // Main component. + class LoaderMenu extends Component { + visible = false + frame = null + opener = null + didMount() { + this.opener = document.querySelector('div[action=settings]') + this.opener.addEventListener('click', e => { + if (!this.visible) { + e.stopImmediatePropagation() + this.show(true) + } + }) + } + show(on) { + this.visible = on + this.update() + if (this.visible) { + this.frame.shadowRoot.querySelector('lol-uikit-close-button') + ?.addEventListener('click', () => this.show(false)) + } + } + showDefaultSettings() { + this.opener.click() + this.show(false) + } + render() { + // Tagged template literal with JSX flavor. + // On VSCode, just install 'Comment tagged templates' extension to get highlighting. + return jsx/*html*/` + + ` + } + } + + // Render component to root. + render(jsx`<${LoaderMenu} />`, root) +} + +// Setup on window loaded. +window.addEventListener('load', async () => { + // Wait for manager layer. + const manager = () => document.getElementById('lol-uikit-layer-manager-wrapper') + while (!manager()) await new Promise(r => setTimeout(r, 200)) + // Create UI and append it to manager. + const root = document.createElement('div') + await createLoaderMenu(root) + manager().prepend(root) +}) \ No newline at end of file diff --git a/ElainaV2/resources/LoadMainCss.js b/ElainaV2/resources/LoadMainCss.js new file mode 100644 index 0000000..14f4aa9 --- /dev/null +++ b/ElainaV2/resources/LoadMainCss.js @@ -0,0 +1,14 @@ +import utils from './_utilselaina' +import data from '../configs/ElainaV2_config.json' + +let SidebarTransparent = data["Sidebar-Transparent"] + +window.addEventListener('load', () => { + utils.addCss(data["css_file"]); + if (SidebarTransparent) { + utils.addCss("//plugins/ElainaV2/assets/Css/Addon-Css/Sidebar-Transparent.css"); + } + else { + utils.addCss("//plugins/ElainaV2/assets/Css/Addon-Css/Sidebar-Color.css"); + } +}) \ No newline at end of file diff --git a/ElainaV2/resources/LoadingScreen.js b/ElainaV2/resources/LoadingScreen.js new file mode 100644 index 0000000..53c76ed --- /dev/null +++ b/ElainaV2/resources/LoadingScreen.js @@ -0,0 +1,18 @@ +import utils from './_utilselaina' +import data from '../configs/ElainaV2_config.json' + +let LoadingScr = data["Animate-Loading"] + +function Applyloadingscreen() { + if (LoadingScr) { + utils.addCss("//plugins/ElainaV2/assets/Css/Addon-Css/Animate-Loading-Screen.css") + } + + else { + utils.addCss("//plugins/ElainaV2/assets/Css/Addon-Css/Static-Loading-Screen.css") + } +} + +window.addEventListener('load', () => { + Applyloadingscreen() +}) \ No newline at end of file diff --git a/ElainaV2/resources/Offline-mode.js b/ElainaV2/resources/Offline-mode.js new file mode 100644 index 0000000..2f140cb --- /dev/null +++ b/ElainaV2/resources/Offline-mode.js @@ -0,0 +1,68 @@ +function get_status(){ + let t=document.querySelector(".availability-icon"), + a=["dnd","chat","away","offline","mobile"]; + + if(t)for(let e of a) + if(t.classList.contains(e)) + return e; + return"chat" +} + +async function patchStatus(){ + await fetch( + "/lol-chat/v1/me", + {headers:{ + "content-type":"application/json" + }, + body:`{"availability":"${covert_status}","lol":{"gameStatus":"outOfGame"}}`,method:"PUT"} + ) +} + +import utils from './_utilselaina'; + +let covert_status="chat", + +switch_between_status=async()=>{ + let t=get_status(), + a="chat"==t?"mobile":"mobile"==t?"dnd":"dnd"==t?"away":"away"==t?"offline":"chat"; + + console.log("pass 1"), + await fetch( + "/lol-chat/v1/me", + {headers:{ + "content-type":"application/json" + }, + body:`{"availability":"${a}"${"offline"==a||"away"==a?',"lol":{"gameStatus":"outOfGame"}':"dnd"==a?',"lol":{"gameStatus":"inGame"}':""}}`,method:"PUT"} + ), + + document.querySelector(".availability-icon").classList.remove(t), + document.querySelector(".availability-icon").classList.add(a), + covert_status=a +}; + +window.switch_between_status=switch_between_status; + +let champSelectPatchStatus=async t=>{ + let a=JSON.parse(t.data)[2].data; + "ChampSelect"!=a||"offline"!=covert_status&&"away"!=covert_status||await patchStatus() +}, + +availabilityButtonMutationObserver=async t=>{ + let a=document.querySelector(".availability-hitbox:not(.offline-mode-available), .availability-hitbox:not([onclick])"), + e=document.querySelectorAll(".availability-hitbox.offline-mode-available"), + i=document.querySelector(".details .status-message.game-status"); + + a&&(console.log(t),a.classList.add("offline-mode-available"), + a.outerHTML=a.outerHTML, + + document.querySelector(".availability-hitbox").setAttribute("onclick","window.switch_between_status()")), + i&&"offline"==covert_status&&await patchStatus(), + e.length>1&&e.forEach((t,a)=>{ + a&&t.remove() + }) +}; + +window.addEventListener("load",()=>{ + utils.subscribe_endpoint("/lol-gameflow/v1/gameflow-phase",champSelectPatchStatus), + utils.routineAddCallback(availabilityButtonMutationObserver,["availability-hitbox","status-message"]) +}); \ No newline at end of file diff --git a/ElainaV2/resources/Watermark.js b/ElainaV2/resources/Watermark.js new file mode 100644 index 0000000..25770f3 --- /dev/null +++ b/ElainaV2/resources/Watermark.js @@ -0,0 +1,336 @@ +function ElainaTrigger() { + const container0 = document.createElement("div") + const container2 = document.createElement("div") + const container3 = document.createElement("div") + const container4 = document.createElement("div") + const container5 = document.createElement("div") + const container6 = document.createElement("div") + const container7 = document.createElement("div") + const container8 = document.createElement("div") + const container9 = document.createElement("div") + const container10 = document.createElement("div") + const container11 = document.createElement("div") + const container12 = document.createElement("div") + + const Greeting = document.createElement("p") + + const watermark = document.createElement("div"); + const wtmark = document.createElement("p") + + const Elaina1ImageDiv = document.createElement("div"); + const Elaina1Image = document.createElement("img") + const Elaina1TextDiv = document.createElement("div"); + const Elaina1Text = document.createElement("p") + + const headpatdiv = document.createElement("div"); + const headpat = document.createElement("button") + + const boobsdiv = document.createElement("div"); + const boobs = document.createElement("button") + + const answer1 = document.createElement("p") + const answer2 = document.createElement("p") + const answer3 = document.createElement("a") + + const goOutSidediv = document.createElement("div"); + const goOutSide = document.createElement("button"); + + const answer4 = document.createElement("p") + const answer5 = document.createElement("p") + + + container0.classList.add ("watermark-text") + container2.classList.add ("Elaina1ImageCon") + container3.classList.add ("Elaina1TextCon") + container4.classList.add ("Greeting-con") + container5.classList.add ("Headpat-con") + container6.classList.add ("Boobs-con") + container7.classList.add ("answer1-con") + container8.classList.add ("answer2-con") + container9.classList.add ("answer3-con") + container10.classList.add("goOutSide-con") + container11.classList.add("answer4-con") + container12.classList.add("answer5-con") + + + wtmark.classList.add("watermark") + if (document.querySelector("html").lang == "ja-JP") { + wtmark.innerHTML =""; + } + else if (document.querySelector("html").lang == "ko-KR") { + wtmark.innerHTML =""; + } + else if (document.querySelector("html").lang == "zh-CN") { + wtmark.innerHTML =""; + } + else if (document.querySelector("html").lang == "zh-TW") { + wtmark.innerHTML =""; + } + else { + wtmark.innerHTML = "By Elaina Da Catto"; + } + + + Greeting.classList.add ("Greeting") + headpat.classList.add ("Headpat") + boobs.classList.add ("Boobs") + goOutSide.classList.add("GoOutSide") + + + Elaina1Text.classList.add ("Elaina1Text") + Elaina1Image.classList.add("Elaina1Image") + Elaina1Image.setAttribute ("src", "//plugins/ElainaV2/assets/Icon/ElainaCB.png") + Elaina1Image.style.visibility = "hidden" + + + answer1.id = "answer1" + answer2.id = "answer2" + answer3.id = "answer3" + answer4.id = "answer4" + answer5.id = "answer5" + + + let count = 0; + let Headpatcount = 0; + let answer2clicked = 0; + let showcontainer = document.getElementsByClassName("rcp-fe-lol-home")[0] + + + wtmark.addEventListener("click", () => { + count += 1; + if (count > 0) { + wtmark.style.visibility = "hidden" + Elaina1Image.style.visibility = "visible" + Elaina1Text.innerHTML = "Huh ?"; + + + function generateGreeting(date) { + const hour = date.getHours(); + Elaina1Text.innerHTML = " " + switch (true) { + case hour >= 5 && hour < 12: + return 'Good morning.You shouldn\'t play game at this time'; + case hour >= 12 && hour < 18: + return 'Good afternoon.It\'s nice time
to play game rights ?'; + case hour >= 18 && hour < 24: + return 'Good evening.You should complete ur work before play game'; + default: + return 'it\'s late, you should
go to bed now.'; + } + } + function updateCurrentTime() { + const date = new Date(); + Greeting.innerHTML = generateGreeting(date); + container4.style.bottom = "256px" + container4.style.right = "225px" + container4.style.position = "absolute" + container4.style.display = "flex" + } + (() => { + const interval = 1000; + setTimeout(updateCurrentTime, interval); + })(); + + + showcontainer.appendChild(container10) + showcontainer.appendChild(container4) + showcontainer.appendChild(container5) + showcontainer.appendChild(container6) + + container10.append(goOutSidediv) + container4.append(Greeting) + container5.append(headpatdiv) + container6.append(boobsdiv) + + goOutSidediv.append(goOutSide) + headpatdiv.append(headpat) + boobsdiv.append(boobs) + + + headpat.addEventListener("click", () => { + Greeting.innerHTML = " " + boobs.style.visibility = "visible" + Headpatcount += 1; + if (Headpatcount < 15) { + Elaina1Text.innerHTML = "Meow ~~ !!" + + container3.style.bottom = "260px" + container3.style.right = "280px" + } + if (Headpatcount >= 15) { + Elaina1Text.innerHTML = "Mo... My hair is burning !!" + + container3.style.bottom = "260px" + container3.style.right = "225px" + } + }, false); + + goOutSide.addEventListener("click", () => { + Greeting.innerHTML = " " + Elaina1Text.innerHTML = "You should go outside
and touch grass" + container3.style.bottom = "250px" + container3.style.right = "241px" + + boobs.style.visibility = "hidden" + headpat.style.visibility = "hidden" + goOutSide.style.visibility = "hidden" + + showcontainer.appendChild(container11) + showcontainer.appendChild(container12) + + container11.append(answer4) + container12.append(answer5) + + answer4.innerHTML = "\"I still want to play game tho\"" + answer5.innerHTML = "\"I want to go outside with you\"" + + answer4.addEventListener("click", () => { + Greeting.innerHTML = " " + Elaina1Text.innerHTML = "Do what ever you want.
I don't care" + container3.style.bottom = "249px" + container3.style.right = "235px" + + boobs.style.visibility = "visible" + headpat.style.visibility = "visible" + goOutSide.style.visibility = "visible" + + container11.remove() + container12.remove() + }, false); + + answer5.addEventListener("click", () => { + Greeting.innerHTML = " " + Elaina1Text.innerHTML = "I'm so proud of you.You
should turn off the client now
and hangout with me (≧▽≦)" + container3.style.bottom = "238px" + container3.style.right = "214px" + + container11.remove() + container12.remove() + }, false); + }, false); + + boobs.addEventListener("click", () => { + Greeting.innerHTML = " " + Elaina1Text.innerHTML = "Ehh...where did you
just touch !?" + + container3.style.bottom = "250px" + container3.style.right = "250px" + + answer1.innerHTML = "\"N...Nothing !!\"" + answer2.innerHTML = "\"I...I wanna see your boobs\"" + + boobs.style.visibility = "hidden" + headpat.style.visibility = "hidden" + goOutSide.style.visibility = "hidden" + + + answer1.addEventListener("click", () => { + Greeting.innerHTML = " " + Elaina1Text.innerHTML = "... You should be careful
next time" + + container3.style.bottom = "248px" + container3.style.right = "239px" + + container7.remove() + container8.remove() + + boobs.style.visibility = "visible" + headpat.style.visibility = "visible" + goOutSide.style.visibility = "visible" + }, false); + + answer2.addEventListener("click", () => { + answer2clicked += 1; + Greeting.innerHTML = " " + Elaina1Text.innerHTML = "As you wish, my darling ~~" + + container3.style.bottom = "260px" + container3.style.right = "219px" + + container7.remove() + container8.remove() + + + if (answer2clicked > 0) { + showcontainer.appendChild(container9) + container9.append(answer3) + + Greeting.innerHTML = " " + answer3.innerHTML = "Take off her clothes" + answer3.setAttribute("href", "https://media.discordapp.net/attachments/887677396315172894/1081501404729974804/6f5ba14e64dea4feb1349c3b658338349e0c1244.png") + answer3.setAttribute("target", "_blank") + answer3.addEventListener("click", () => { + Elaina1Text.innerHTML = "..." + + container3.style.bottom = "260px" + container3.style.right = "325px" + + boobs.style.visibility = "visible" + headpat.style.visibility = "visible" + goOutSide.style.visibility = "visible" + + container9.remove() + }, false); + } + }, false); + + showcontainer.appendChild(container7) + showcontainer.appendChild(container8) + + container7.append(answer1) + container8.append(answer2) + container9.append(answer3) + + + }, false); + } + }, false); + + + showcontainer.appendChild(container2) + showcontainer.appendChild(container0) + showcontainer.appendChild(container3) + + + container0.append(watermark) + container2.append(Elaina1ImageDiv) + container3.append(Elaina1TextDiv) + + + + watermark.append(wtmark) + Elaina1ImageDiv.append(Elaina1Image) + Elaina1TextDiv.append(Elaina1Text) +} + +function DelElainaTrigger() { + try { + document.getElementsByClassName("watermark-text")[0].remove() + document.getElementsByClassName("Elaina1ImageCon")[0].remove() + document.getElementsByClassName("Elaina1TextCon")[0].remove() + document.getElementsByClassName("Greeting-con")[0].remove() + document.getElementsByClassName("Headpat-con")[0].remove() + document.getElementsByClassName("Boobs-con")[0].remove() + document.getElementsByClassName("goOutSide-con")[0].remove() + document.getElementsByClassName("answer1-con")[0].remove() + document.getElementsByClassName("answer2-con")[0].remove() + document.getElementsByClassName("answer3-con")[0].remove() + } + catch{} + try { + document.getElementsByClassName("answer3-con")[0].remove() + } + catch{} + try { + document.getElementsByClassName("answer4-con")[0].remove() + document.getElementsByClassName("answer5-con")[0].remove() + } + catch{} +} + +let watermark = { + ElainaTrigger: ElainaTrigger, + DelElainaTrigger: DelElainaTrigger +} + +export default watermark \ No newline at end of file diff --git a/ElainaV2/resources/_utilselaina.js b/ElainaV2/resources/_utilselaina.js new file mode 100644 index 0000000..7a27d01 --- /dev/null +++ b/ElainaV2/resources/_utilselaina.js @@ -0,0 +1,120 @@ +const version = "1.2.0" +let riotclient_auth, riotclient_port; +let regex_rc_auth = /^--riotclient-auth-token=(.+)$/ +let regex_rc_port = /^--riotclient-app-port=([0-9]+)$/ +let phase; // automatically updated to current gameflow phase +let debug_sub = true // to display debug messages +let routines = [] // array of functions that will be called routinely +let mutationCallbacks = [] // array of functions that will be called in mutation observer +let pvp_net_id; // automatically updated to your pvp.net id +let summoner_id; // automatically updated to your summonerId +let summoner_region; // player current region + +/** used to add css files to document body */ +function addCss(filename) { + const style = document.createElement('link') + style.href = filename + style.type = 'text/css' + style.rel = 'stylesheet' + document.body.append(style) +} + +/** + * Subscribe to a specific endpoint, and trigger callback function when that endpoint is called + * @param {string} endpoint Endpoint you wish to monitor. ex: /lol-gameflow/v1/gameflow-phase , send "" to subscribe to all + * @param {function} callback The callback function + */ +async function subscribe_endpoint(endpoint, callback) { + const uri = document.querySelector('link[rel="riot:plugins:websocket"]').href + const ws = new WebSocket(uri, 'wamp') + + ws.onopen = () => ws.send(JSON.stringify([5, 'OnJsonApiEvent' + endpoint.replace(/\//g, '_')])) + ws.onmessage = callback +} + +/** fetch the Riot client API port/auth and save it to variables that can be exported */ +async function fetch_riotclient_credentials() { + await fetch("/riotclient/command-line-args", { + "method": "GET", + }).then(response => response.json()).then(data => { + data.forEach(elem => { + if (regex_rc_auth.exec(elem)) + utils.riotclient_auth = regex_rc_auth.exec(elem)[1]; + else if (regex_rc_port.exec(elem)) + utils.riotclient_port = regex_rc_port.exec(elem)[1]; + }); + }) + if (debug_sub) + console.log(utils.riotclient_auth, utils.riotclient_port) +} + +/** Callback function to be sent in subscribe_endpoint() to update the variable holding user pvp.net infos */ +let updateUserPvpNetInfos = async message => { + let data = JSON.parse(message["data"])[2]["data"]; + if (data != undefined) { + utils.pvp_net_id = data["id"]; + utils.summoner_id = data["summonerId"] + } +} + +/** Callback function to be sent in subscribe_endpoint() to update the variable monitoring the gameflow phase */ +let updatePhaseCallback = async message => { phase = JSON.parse(message["data"])[2]["data"]; } + +/** Callback function to be sent in subscribe_endpoint() to log uri & data object */ +let debugLogEndpoints = async message => { if (debug_sub) console.log(JSON.parse(message["data"])[2]["uri"], JSON.parse(message["data"])[2]["data"]) } + +/** + * Add function to be called in the MutationObserver API + * @param {function} callback The callback function + * @param {[string]} targets The list of class targets + */ +function routineAddCallback(callback, target) { + routines.push({ "callback": callback, "targets": target }) +} + +function mutationObserverAddCallback(callback, target) { + mutationCallbacks.push({ "callback": callback, "targets": target }) +} + +let utils = { + riotclient_auth: riotclient_auth, + riotclient_port: riotclient_port, + phase: phase, + summoner_id: summoner_id, + pvp_net_id: pvp_net_id, + subscribe_endpoint: subscribe_endpoint, + routineAddCallback: routineAddCallback, + mutationObserverAddCallback: mutationObserverAddCallback, + addCss: addCss +} + +export default utils + +window.addEventListener('load', () => { + fetch_riotclient_credentials() + subscribe_endpoint("/lol-gameflow/v1/gameflow-phase", updatePhaseCallback) + subscribe_endpoint("/lol-chat/v1/me", updateUserPvpNetInfos) + subscribe_endpoint("", debugLogEndpoints) + window.setInterval(() => { + routines.forEach(routine => { + routine.callback() + }) + }, 1300) + + const observer = new MutationObserver((mutationsList) => { + for (let mutation of mutationsList) { + for (let addedNode of mutation.addedNodes) { + if (addedNode.nodeType === Node.ELEMENT_NODE && addedNode.classList) { + for (let addedNodeClass of addedNode.classList) { + for (let obj of mutationCallbacks) { + if (obj.targets.indexOf(addedNodeClass) != -1 || obj.targets.indexOf("*") != -1) { + obj.callback(addedNode) + } + } + } + } + } + } + }); + observer.observe(document, { attributes: false, childList: true, subtree: true }); +}) \ No newline at end of file