From 80425ae8c1501537a2a63448970d0c6faa90ba64 Mon Sep 17 00:00:00 2001 From: Kir-Antipov Date: Tue, 28 Jul 2020 17:32:09 +0300 Subject: [PATCH] Build --- build/github-defreshed.meta.js | 2 +- build/github-defreshed.user.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/github-defreshed.meta.js b/build/github-defreshed.meta.js index 5ec3b46..1d09ee6 100644 --- a/build/github-defreshed.meta.js +++ b/build/github-defreshed.meta.js @@ -1,7 +1,7 @@ // ==UserScript== // @name GitHub Defreshed // @namespace GitHub -// @version 1.6.0 +// @version 2.0.0 // @author Kir_Antipov // @description Make GitHub Great Again! // @license MIT diff --git a/build/github-defreshed.user.js b/build/github-defreshed.user.js index 751e013..8f97b7c 100644 --- a/build/github-defreshed.user.js +++ b/build/github-defreshed.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name GitHub Defreshed // @namespace GitHub -// @version 1.6.0 +// @version 2.0.0 // @author Kir_Antipov // @description Make GitHub Great Again! // @license MIT @@ -13,4 +13,4 @@ // @run-at document-start // @grant none // ==/UserScript== -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t,r){"use strict";const n=r(1),a=r(2);t.all=n,t.check=e=>(e=(e||"").toString().toLowerCase(),n.includes(e)),t.oddballs=e=>e&&e in a?a[e]:Object.keys(a).sort()},function(e){e.exports=JSON.parse('["400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","419","420","421","422","423","424","425","426","427","428","429","430","431","500","501","502","503","504","505","506","507","508","509","510","511","about","access","account","admin","anonymous","any","api","apps","attributes","auth","billing","blob","blog","bounty","branches","business","businesses","c","cache","case-studies","categories","central","certification","changelog","cla","cloud","codereview","collection","collections","comments","commit","commits","community","companies","compare","contact","contributing","cookbook","coupons","customer","customers","dashboard","dashboards","design","develop","developer","diff","discover","discussions","docs","downloads","downtime","editor","editors","edu","enterprise","events","explore","featured","features","files","fixtures","forked","garage","ghost","gist","gists","graphs","guide","guides","help","help-wanted","home","hooks","hosting","hovercards","identity","images","inbox","individual","info","integration","interfaces","introduction","invalid-email-address","investors","issues","jobs","join","journal","journals","lab","labs","languages","launch","layouts","learn","legal","library","linux","listings","lists","login","logos","logout","mac","maintenance","malware","man","marketplace","mention","mentioned","mentioning","mentions","migrating","milestones","mine","mirrors","mobile","navigation","network","new","news","none","nonprofit","nonprofits","notices","notifications","oauth","offer","open-source","organisations","organizations","orgs","pages","partners","payments","personal","plans","plugins","popular","popularity","posts","press","pricing","professional","projects","pulls","raw","readme","recommendations","redeem","releases","render","reply","repositories","resources","restore","revert","save-net-neutrality","saved","scraping","search","security","services","sessions","settings","shareholders","shop","showcases","signin","signup","site","spam","sponsors","ssh","staff","starred","stars","static","status","statuses","storage","store","stories","styleguide","subscriptions","suggest","suggestion","suggestions","support","suspended","talks","teach","teacher","teachers","teaching","teams","ten","terms","timeline","topic","topics","tos","tour","train","training","translations","tree","trending","updates","username","users","visualization","w","watching","wiki","windows","works-with","www0","www1","www2","www3","www4","www5","www6","www7","www8","www9"]')},function(e){e.exports=JSON.parse('{"avatars":{"reserved":true,"taken":true,"typical":true,"included":false},"assets":{"reserved":true,"taken":true,"typical":true,"included":false},"bookmarks":{"reserved":true,"taken":true,"typical":true,"included":false},"checks":{"reserved":true,"taken":true,"typical":true,"included":false},"conversations":{"reserved":true,"taken":true,"typical":true,"included":false},"labels":{"reserved":true,"taken":true,"typical":true,"included":false},"media":{"reserved":true,"taken":true,"typical":true,"included":false},"nodes":{"reserved":true,"taken":true,"typical":true,"included":false},"owners":{"reserved":true,"taken":true,"typical":true,"included":false},"page":{"reserved":true,"taken":true,"typical":true,"included":false},"registry":{"reserved":true,"taken":true,"typical":true,"included":false},"seats":{"reserved":true,"taken":true,"typical":true,"included":false},"shared":{"reserved":true,"taken":true,"typical":true,"included":false},"tasks":{"reserved":true,"taken":true,"typical":true,"included":false},"uploads":{"reserved":true,"taken":true,"typical":true,"included":false},"account":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/settings/profile","included":true},"apps":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/marketplace","included":true},"blog":{"reserved":true,"taken":false,"typical":false,"redirect":"https://blog.github.com","included":true},"c":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/contact","included":true},"contributing":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/about/careers","included":true},"customer":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/business/customers","included":true},"customers":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/business/customers","included":true},"developer":{"reserved":true,"taken":false,"typical":false,"redirect":"https://developer.github.com","included":true},"edu":{"reserved":true,"taken":false,"typical":false,"redirect":"https://education.github.com","included":true},"guides":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com","included":true},"help":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com","included":true},"launch":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/search","included":true},"mac":{"reserved":true,"taken":false,"typical":false,"redirect":"https://desktop.github.com","included":true},"mirrors":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/about-github-mirrors/","included":true},"pages":{"reserved":true,"taken":false,"typical":false,"redirect":"https://pages.github.com","included":true},"plans":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/pricing","included":true},"press":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/about/press","included":true},"readme":{"reserved":true,"taken":true,"typical":false,"redirect":"https://github.com/about","included":true},"repositories":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/trending","included":true},"resources":{"reserved":true,"taken":false,"typical":false,"redirect":"https://resources.github.com","included":true},"security":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/github-security/","included":true},"settings":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/settings/profile","included":true},"signup":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/join","included":true},"terms":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/github-terms-of-service/","included":true},"topic":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com/topics","included":true},"tos":{"reserved":true,"taken":false,"typical":false,"redirect":"https://help.github.com/articles/github-terms-of-service/","included":true},"training":{"reserved":true,"taken":false,"typical":false,"redirect":"https://services.github.com","included":true},"users":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com","included":true},"wiki":{"reserved":true,"taken":false,"typical":false,"redirect":"https://github.com","included":true},"windows":{"reserved":true,"taken":false,"typical":false,"redirect":"https://desktop.github.com","included":true},"collections":{"reserved":true,"taken":false,"typical":false,"included":true,"notes":"Curated lists of GitHub repos"},"hovercards":{"reserved":true,"taken":false,"typical":false,"included":true,"notes":"HTTP ERROR 406"},"inbox":{"reserved":true,"taken":true,"typical":false,"redirect":"https://github.com/410","included":true,"notes":"410 ERROR"},"invalid-email-address":{"reserved":true,"taken":true,"typical":false,"included":true,"notes":"HTTP ERROR 404"},"suggestions":{"reserved":true,"taken":false,"typical":false,"included":true},"suspended":{"reserved":true,"taken":true,"typical":false,"redirect":"https://github.com","included":true,"notes":"Page behaviour depends on whether you\'re logged in or if your account is actually suspended"},"case-studies":{"reserved":false,"taken":true,"typical":false,"included":true},"watching":{"reserved":false,"taken":true,"typical":false,"included":true},"save-net-neutrality":{"reserved":false,"taken":true,"typical":false,"included":true},"ghost":{"reserved":false,"taken":true,"typical":true,"included":true},"status":{"reserved":true,"taken":false,"typical":false,"included":true}}')},function(e,t,r){"use strict";r.r(t);var n=r(0);function a(e=location.pathname){try{e=new URL(e).pathname}catch(e){}return e.replace(/^[/]|[/]$/g,"")}function i(e=location.pathname){return l(e=a(e))?e.split("/",2).join("/"):null}function s(e=location.pathname){if(!l(e=a(e)))return null;let t=e.match(/^[^/]+[/][^/]+[/]?(.*)$/);return t?t[1]:null}function l(e=location.pathname){let t=(e=a(e)).substring(0,e.indexOf("/"));return/^[^/]+\/[^/]+/.test(e)&&!Object(n.check)(t)&&!function(e=location.pathname){return/^((orgs[/][^/]+[/])?dashboard([/]index[/]\d+)?)?$/.test(a(e))}(e)&&!function(e=location.pathname){return/^([^/]+[/][^/]+\/)?notifications/.test(a(e))}(e)}function o(e=location.pathname){return/^(tree[/][^/]+)?$/.test(s(e))}function c(e=location.pathname){return/^tree\//.test(s(e))}function u(e=location.pathname){return/^blob\//.test(s(e))}function d(e=location.pathname){return function(e=location.pathname){return(s(e)||"").startsWith("raw/")}(e)||function(e=location.pathname){return(s(e)||"").startsWith("archive/")}(e)||function(e=location.pathname){return(s(e)||"").startsWith("releases/download/")}(e)}function p(e=location.pathname){return/^projects\/\d+$/.test(s(e))}function m(e=location.pathname){return/#[^\/]*$/.test(e)}function h(e,t){try{return new URL(e).host==t}catch(e){return!1}}function f(e=location.pathname,t=location.host,r=location.protocol){return function(e){try{return new URL(e),!0}catch(e){return!1}}(e)?e:`${r}//${t}/${e=a(e)}`}function y(e=window.location.href){return h(e,"github.com")}function g(e,t){if(e instanceof HTMLElement&&(function(e){return!!e&&"function"==typeof e[Symbol.iterator]}(t.children)&&(e.append(...t.children),delete t.children),t.attributes&&"object"==typeof t.attributes)){for(let r in t.attributes)e.setAttribute(r,t.attributes[r]);delete t.attributes}for(let r in t){let n=e[r],a=t[r];a&&"object"==typeof a?(null==n&&(n=e[r]={}),g(n,a)):e[r]=t[r]}}function v(e){return b("style",{type:"text/css",children:[e]})}function b(e="div",t){"string"==typeof t&&(t={className:t}),t=t||{};let r=document.createElement(e);return g(r,t),r}class x{isApplieble(e=window.location.href,t=null){return!0}waitUntilFixerReady(e=window.location.href,t=null){return!0}apply(e=window.location.href,t=null){}}function w(e){return new Promise(t=>{setTimeout(t,e)})}async function k(e,t,r){let n=new Date;for(;!e()&&new Date-n!!e.querySelector(t),r,n)}async function q(e){"string"==typeof e?e={selectors:[...arguments]}:e instanceof Node&&(e={container:arguments[0],selectors:[...arguments].splice(1)}),(e={container:document,interval:100,timeout:1500,selectors:[],...e}).selector&&(e.selectors=[e.selector]),e.selectors&&!Array.isArray(e.selectors)&&(e.selectors=[...e.selectors]);let t=await Promise.all(e.selectors.map(t=>S(e.container,t,e.interval,e.timeout)));return t.every(e=>e)}async function E(e){!function(){let e=document.querySelector(".progress-pjax-loader");if(e){const t=1200,r=100;e.firstElementChild.style.width=0,e.style.opacity="100%";for(let n=0;ne.firstElementChild.style.width=r+"%",n)}setTimeout(()=>e.style.opacity=0,t+r)}}();let t=await fetch(e);return{document:(new DOMParser).parseFromString(await t.text(),"text/html"),url:t.url}}function _(e){return e.src||e.getAttribute("data-src")}async function A(e=window.location.href,t=!0){let r=function(e=location.pathname){return!a(e)}(),n=p(),i=await E(e),s=i.document.querySelector("main");if(s.style.display="none",r){document.querySelector("body > div.application-main").prepend(b("div",{className:"",attributes:{itemscope:"",itemtype:"http://schema.org/SoftwareSourceCode"},children:[b("main")]}))}let l=document.querySelector("main");if(l.parentElement.insertBefore(s,l),await T(i.url),l.replaceWith(s),r){let e=document.querySelector("body > div.application-main");for(let t of[...e.children].splice(1))e.removeChild(t);document.body.className="logged-in env-production page-responsive intent-mouse"}else n&&(s.parentElement.className="");s.style.display="",document.head.querySelector("title").innerText=i.document.head.querySelector("title").innerText;let o=document.querySelector("header"),c=i.document.querySelector("header");o&&c&&o.replaceWith(c);let u=[...document.querySelectorAll("script")],d=[...i.document.querySelectorAll("script")].map(_).filter(e=>!u.some(t=>_(t)==e)).map(e=>b("script",{src:e}));document.body.append(...d),t&&function(e){try{history.pushState(null,null,e)}catch(t){location.hash="#"+e}}(i.url)}var B=[new class extends x{apply(){document.head.append(v(".topic-tag {\n display: inline-block !important;\n padding: .3em .9em !important;\n margin: 0 .5em .5em 0 !important;\n white-space: nowrap !important;\n border-radius: 3px !important;\n line-height: 1.5 !important;\n font-size: 12px !important;\n border: none !important;\n }"))}},new class extends x{apply(){document.head.append(v("\n .overall-summary {\n border-radius: 3px !important;\n }\n\n .repository-lang-stats-graph {\n border-bottom-left-radius: 3px !important;\n border-bottom-right-radius: 3px !important;\n }\n\n .repository-lang-stats-graph .language-color:first-child {\n border-bottom-left-radius: 3px !important;\n }\n\n .repository-lang-stats-graph .language-color:last-child {\n border-bottom-right-radius: 3px !important;\n }\n "))}},new class extends x{apply(){document.head.append(v("\n .btn {\n border-radius: 3px !important;\n }\n\n .repository-content .file-navigation .btn {\n padding: 3px 10px !important;\n font-size: 12px !important;\n line-height: 20px !important;\n font-weight: 600 !important;\n }\n\n #branch-select-menu svg {\n display: none !important;\n }\n\n #branch-select-menu .btn > span {\n font-weight: 600 !important;\n }\n\n .pagehead-actions .btn {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n padding: 3px 10px !important;\n }\n\n .pagehead-actions a.social-count {\n border-top-right-radius: 3px !important;\n border-bottom-right-radius: 3px !important;\n padding: 3px 10px !important;\n }\n "))}},new class extends x{apply(){document.head.append(v("img.avatar, img.avatar-user, a.avatar-user {\n border-radius: 3px !important;\n }"))}},new class extends x{apply(){document.head.append(v("\n div.Box, .markdown-body pre {\n border-radius: 3px !important;\n }\n \n div.Box-header {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n }\n "))}},new class extends x{isApplieble(e){return l(e)&&!p(e)}waitUntilFixerReady(){return q("main:nth-child(1) .container-xl")}apply(){[...document.querySelectorAll("main .container-xl")].forEach(e=>e.className="container-lg clearfix new-discussion-timeline px-3")}},new class extends x{isApplieble(e){return l(e)}waitUntilFixerReady(){return q("main:nth-child(1) > div:nth-child(1)")}apply(e){let t=document.querySelector("main > div");p(e)||(t.className="pagehead repohead hx_repohead readability-menu bg-gray-light pb-0 pt-3",t.firstElementChild.className="d-flex container-lg mb-4 px-3"),t.querySelector("nav").className="js-repo-nav js-sidenav-container-pjax clearfix hx_reponav reponav px-3 container-lg",t.querySelector("nav > ul").className="list-style-none",[...t.querySelectorAll("nav > ul > li")].forEach(e=>{e.className="";let t=e.querySelector("a"),r=t.classList.contains("selected");t.className="js-selected-navigation-item reponav-item"+(r?" selected":"")})}},new class extends x{isApplieble(e){return o(e)||c(e)||u(e)}waitUntilFixerReady(){return q("main:nth-child(1) #branch-select-menu span.css-truncate-target")}apply(){let e=document.querySelector("#branch-select-menu span.css-truncate-target");e.parentElement.insertBefore(b("i",{className:"d-none d-lg-inline",innerText:"Branch: "}),e)}},new class extends x{isApplieble(e){return o(e)||c(e)}waitUntilFixerReady(e){let t=["main:nth-child(1) .repository-content .Box relative-time","main:nth-child(1) .repository-content .Box div.flex-shrink-0:not(.hx_avatar_stack_commit)"];return o(e)&&(t.push("main:nth-child(1) .repository-content .file-navigation > :not(#branch-select-menu) svg.octicon-git-branch"),t.push("main:nth-child(1) .repository-content .Box ul.list-style-none svg.octicon-history")),q(...t)}apply(e,t){o(e)&&this._backupDetails(t),this._moveCommitComments(),this._moveCommitDetails(),this._removeSecondCommitTitle()}_backupDetails(e){let t=document.querySelector(".repository-content .file-navigation > :not(#branch-select-menu) svg.octicon-git-branch").parentElement;t.id="backup-branches";let r=t.parentElement;r.parentElement.removeChild(r),e.append(t);let n=document.querySelector(".repository-content .Box ul.list-style-none svg.octicon-history").parentElement;n.id="backup-commits";let a=n.parentElement.parentElement;a.parentElement.removeChild(a),e.append(n)}_moveCommitComments(){let e=document.querySelector("main:nth-child(1) .repository-content .Box .Box-header svg.octicon-comment");if(e){let t=e.parentElement;t.className="no-wrap muted-link text-inherit ml-2";let r=document.querySelector(".repository-content .Box .Box-header a.commit-author").parentElement;r.parentElement.insertBefore(t,r.nextSibling)}}_moveCommitDetails(){let e=document.querySelector(".repository-content .Box relative-time").parentElement.parentElement,t=document.querySelector(".repository-content .Box div.flex-shrink-0:not(.hx_avatar_stack_commit)");for(let e of[...t.children])t.removeChild(e);let r=e.querySelector(".text-mono");r.classList.remove("ml-2");let n=b("div",{className:"css-truncate css-truncate-overflow text-gray",children:["Latest commit ",r," ",e.querySelector("relative-time")]});t.append(n),e.parentElement.removeChild(e)}_removeSecondCommitTitle(){let e=document.querySelector(".repository-content .Box .Box-header .Details-content--hidden a.text-bold");e&&e.parentElement.parentElement.removeChild(e.parentElement)}},new class extends x{isApplieble(e){return o(e)}waitUntilFixerReady(){return q({selectors:["main:nth-child(1) .flex-shrink-0.col-12.col-md-3 .Progress"],timeout:300})}apply(){let e=b("div","d-flex repository-lang-stats-graph"),t=b("ol","repository-lang-stats-numbers"),r=b("details",{className:"details-reset mb-3",children:[b("summary",{title:"Click for language details",children:[e]}),b("div",{className:"repository-lang-stats",children:[t]})]}),n=[...document.querySelector(".flex-shrink-0.col-12.col-md-3 .Progress").parentElement.nextElementSibling.children];for(let r of n.map(this._extractLanguageData)){let n=b("span",{className:"language-color",attributes:{"aria-label":`${r.name} ${r.percent}`,itemprop:"keywords"},innerText:r.name,style:{width:r.percent,backgroundColor:r.color}});e.append(n);let a=b(r.link?"a":"span",{href:r.link,children:[b("span",{className:"color-block language-color",style:{backgroundColor:r.color}}),b("span",{className:"lang",innerText:` ${r.name} `}),b("span",{className:"percent",innerText:r.percent})]});t.append(b("li",{children:[a]}))}document.querySelector(".repository-content").prepend(r)}_extractLanguageData(e){return e.querySelector("a")?{name:e.querySelector("span").innerText,percent:e.querySelectorAll("span")[1].innerText,color:e.querySelector("svg").style.color,link:e.querySelector("a").href}:{name:e.querySelectorAll("span")[1].innerText,percent:e.querySelectorAll("span")[2].innerText,color:e.querySelector("svg").style.color,link:""}}},new class extends x{isApplieble(e){return o(e)}apply(e,t){let r=document.querySelector(".repository-content details summary div.repository-lang-stats-graph"),n=b("ul",{className:"numbers-summary",children:[this._createCommitsSummaryElement(t),this._createBranchesSummaryElement(t),this._createPackagesSummaryElement(e),this._createReleasesSummaryElement(e),this._createContributorsSummaryElement(e),this._createLicenseSummaryElement()].filter(e=>e)});document.querySelector(".repository-content").prepend(b("div",{className:"overall-summary "+(r?"border-bottom-0 mb-0 rounded-bottom-0":"mb-3"),children:[n]}))}_createCommitsSummaryElement(e){let t=e.querySelector("#backup-commits"),r=t.querySelector("strong").innerText,n=t.href;return this._createSummaryElement('',n,"commit",r)}_createBranchesSummaryElement(e){let t=e.querySelector("#backup-branches"),r=t.querySelector("strong").innerText,n=t.href;return this._createSummaryElement('',n,"branch",r,"es")}_createPackagesSummaryElement(e){return this._createSummaryElementFromRightBar(e,'',"package","s",0,"",!1)}_createReleasesSummaryElement(e){return this._createSummaryElementFromRightBar(e,'',"release")}_createContributorsSummaryElement(e){return this._createSummaryElementFromRightBar(e,'',"contributor","s",1,"graphs/")}_createLicenseSummaryElement(){let e=document.querySelector(".flex-shrink-0.col-12.col-md-3 svg.octicon-law");if(e){let t=e.parentElement.href,r=e.parentElement.innerText.trim().replace(" License",""),n='';return this._createSummaryElement(n,t,r)}return null}_createSummaryElementFromRightBar(e,t,r,n="s",a=0,s="",l=!0){let o,c,u=r+n,d=[...document.querySelectorAll(".flex-shrink-0.col-12.col-md-3 div.BorderGrid-cell")].find(e=>{let t=e.querySelector("a");return t&&t.href.endsWith(u)});return d||l?(d?(o=(d.querySelector("span.Counter")||{}).innerText||0,c=d.querySelector("a").href):(o=a,c=i(e)+"/"+s+u),this._createSummaryElement(t,c,r,o,n)):null}_createSummaryElement(e,t,r,n=-1,a="s"){let i=e+"\n";return-1==n?i+=r:(i+=`${n}`,i+="\n",i+=r,1!=n&&(i+=a)),b("li",{children:[b("a",{href:t,innerHTML:i})]})}},new class extends x{isApplieble(e){return o(e)}waitUntilFixerReady(){return q({selectors:["main:nth-child(1) .repository-content a.topic-tag.topic-tag-link"],timeout:300})}apply(){let e=document.querySelector("main:nth-child(1) .repository-content a.topic-tag.topic-tag-link");e&&document.querySelector(".repository-content").prepend(b("div",{className:"repository-topics-container mt-2 mb-3 js-topics-list-container",children:[e.parentElement]}))}},new class extends x{isApplieble(e){return o(e)}waitUntilFixerReady(){return q({selectors:["main:nth-child(1) .flex-shrink-0.col-12.col-md-3 .f4"],timeout:300})}apply(){let e=document.querySelector(".repository-content"),t=document.querySelector(".flex-shrink-0.col-12.col-md-3 .f4"),r=e.querySelector("div.list-topics-container.f6");t&&e.prepend(b("div",{className:r?"":"mb-3",children:[b("div",{className:"f4",innerHTML:t.innerHTML})]}))}},new class extends x{isApplieble(e){return o(e)}waitUntilFixerReady(){return q({selectors:["main:nth-child(1) .flex-shrink-0.col-12.col-md-3 details"],timeout:300})}apply(){let e=document.querySelector(".flex-shrink-0.col-12.col-md-3 details");e&&document.querySelector(".repository-content").prepend(e)}},new class extends x{isApplieble(e){return o(e)}waitUntilFixerReady(){return q("main:nth-child(1) .flex-shrink-0.col-12.col-md-3")}apply(){let e=document.querySelector(".repository-content"),t=document.querySelector(".flex-shrink-0.col-12.col-md-9.mb-4.mb-md-0"),r=document.querySelector(".gutter-condensed.gutter-lg.d-flex.flex-column.flex-md-row");e.append(...t.children),r.parentElement.removeChild(r)}},new class extends x{isApplieble(e){return o(e)||c(e)}waitUntilFixerReady(){return q({selectors:["main:nth-child(1) #readme"],timeout:300})}apply(){let e=document.querySelector("#readme");if(e){e.className="Box md js-code-block-container Box--condensed",e.querySelector(".Box-header").className="Box-header d-flex flex-items-center flex-justify-between";let t='',r=e.querySelector(".Box-title.pr-3");r.innerHTML=t+r.innerHTML}}},new class extends x{apply(){this._setupObserver(),this._fixAll()}_needToBeFixed(e){return!e.hasAttribute("defreshed")&&e.href&&!m(e.href)&&(!!(t=e.href)&&(t.startsWith("/")||h(t,location.host)))&&l(e.href)&&!d(e.href)&&!p(e.href);var t}_fix(e){e.setAttribute("defreshed",""),e.addEventListener("click",(async function(e){e.metaKey||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),A(f(this.href)))}))}_fixAll(){[...document.querySelectorAll("a")].filter(this._needToBeFixed).forEach(this._fix)}_setupObserver(){window.defreshObserver||(window.defreshObserver=new MutationObserver(()=>this._fixAll()),window.defreshObserver.observe(document.body,{childList:!0,subtree:!0}))}},new class extends x{apply(){window.onpopstate=function(){let e=document.location.href;y(e)&&l(e)&&!m(e)?A(e,!1):window.location.href=document.location.href}}}];async function T(e=window.location.href){let t=document.createElement("backup");for(let r of B)if(r.isApplieble(e,t)&&await r.waitUntilFixerReady(e,t))try{r.apply(e,t)}catch(e){console.log("Fixer exception: ",e)}}!window.defreshed&&y()&&(window.defreshed=!0,T())}]); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,r){"use strict";const n=r(3),a=r(4);t.all=n,t.check=e=>(e=(e||"").toString().toLowerCase(),n.includes(e)),t.oddballs=e=>e&&e in a?a[e]:Object.keys(a).sort()},function(e,t,r){"use strict";var n=r(2),a=r.n(n)()(!1);a.push([e.i,"body .rounded-1{border-radius:3px !important}.btn{border-radius:3px !important}.repository-content .file-navigation .btn{padding:3px 10px !important;font-size:12px !important;line-height:20px !important;font-weight:600 !important}#branch-select-menu>.btn>svg{display:none !important}#branch-select-menu>.btn>span{font-weight:600 !important}.subnav-item:first-child,.subnav-search-context .btn,.BtnGroup-item:first-child,.BtnGroup-parent:first-child .BtnGroup-item,.input-group .input-group-button:first-child .btn,.btn.btn-with-count{border-top-left-radius:3px !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom-left-radius:3px !important}.subnav-item:last-child,.subnav-search-context+.subnav-search .subnav-search-input,.BtnGroup-item:last-child,.BtnGroup-parent:last-child .BtnGroup-item,.input-group .input-group-button:last-child .btn{border-top-left-radius:0 !important;border-top-right-radius:3px !important;border-bottom-right-radius:3px !important;border-bottom-left-radius:0 !important}img.avatar,img.avatar-user,a.avatar-user{border-radius:3px !important}body:not(.page-profile) img.avatar,body:not(.page-profile) img.avatar-user,body:not(.page-profile) a.avatar-user{background-color:transparent !important}.Box{border-radius:3px !important}.Box-header,:not(li).Box-row:first-of-type,.Box--danger li.Box-row:first-of-type{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.markdown-body pre{border-radius:3px !important}.dropdown-menu,.SelectMenu-modal{border-radius:3px !important}.SelectMenu-modal .SelectMenu-tab{border-top-left-radius:4px !important;border-top-right-radius:4px !important}nav.menu{border-radius:3px !important}nav.menu>*:first-child{border-top-left-radius:3px !important;border-top-right-radius:3px !important}nav.menu>*:last-child{border-bottom-left-radius:3px !important;border-bottom-right-radius:3px !important}input[type='text'].form-control,input[type='url'].form-control,textarea.form-control,label.form-control,div.tag-input.form-control,select.form-select{border-radius:3px !important}textarea.form-control.js-quick-submit{border-top-left-radius:3px !important;border-top-right-radius:3px !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}text-expander+label.drag-and-drop,text-expander+label.drag-and-drop>input{border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:3px !important;border-bottom-right-radius:3px !important}.pagehead-actions .btn{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;padding:3px 10px !important}.pagehead-actions a.social-count{border-top-right-radius:3px !important;border-bottom-right-radius:3px !important;padding:3px 10px !important}div.overall-summary{border-radius:3px !important}div.repository-lang-stats-graph{border-bottom-left-radius:3px !important;border-bottom-right-radius:3px !important}div.repository-lang-stats-graph>span.language-color:first-child{border-bottom-left-radius:3px !important}div.repository-lang-stats-graph>span.language-color:last-child{border-bottom-right-radius:3px !important}a.topic-tag{border:none !important;display:inline-block !important;padding:.3em .9em !important;margin:0 .5em .5em 0 !important;white-space:nowrap !important;line-height:1.5 !important;font-size:12px !important;border-radius:3px !important}li.topic-tag-action{border-radius:3px !important}.IssueLabel{border-radius:2px !important}.IssueLabel--big.lh-condensed,.State{border-radius:3px !important}.timeline-comment{border-radius:3px !important}.timeline-comment-header,.previewable-comment-form .comment-form-head.tabnav{border-top-left-radius:3px !important;border-top-right-radius:3px !important}.timeline-comment-header .tabnav-tab,.previewable-comment-form .comment-form-head.tabnav .tabnav-tab{border-top-left-radius:4px !important;border-top-right-radius:4px !important}.h-card .avatar-before-user-status{border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.h-card .user-status-container{border-top:0 !important}.dropdown-menu .js-user-status-container{border-radius:3px !important}body.page-profile .graph-before-activity-overview{border-radius:3px !important}body.page-profile .contribution-activity li>.js-year-link{border-radius:3px !important}\n",""]),t.a=a},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=(o=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(i).concat([a]).join("\n")}var o,s,l;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var i=0;i{setTimeout(t,e)})}async function S(e,t,r){let n=new Date;for(;new Date-n!!q(e.querySelector(t))||null:()=>k()?q(e.querySelector(t)):!!q(e.querySelector(t))||null,r,n)}function E(e,t,r,n,a){return S(a?()=>!!e.querySelector(t)||null:()=>k()?!!e.querySelector(t):!!e.querySelector(t)||null,r,n)}async function B(e,t){let r=e[0];return"string"==typeof r?r={selectors:[...e]}:r instanceof Node&&(r={container:e[0],selectors:[...e].splice(1)}),r={container:document,interval:100,timeout:1500,dynamic:!1,selectors:[],...r},r.selector&&(r.selectors=[r.selector]),r.selectors&&!Array.isArray(r.selectors)&&(r.selectors=[...r.selectors]),(await Promise.all(r.selectors.map(e=>t(r.container,e,r.interval,r.timeout,r.dynamic)))).every(e=>e)}function A(e){return"string"==typeof e?e={selectors:[...arguments]}:e instanceof Node&&(e={container:arguments[0],selectors:[...arguments].splice(1)}),e.interval=0,e.timeout=0,N(e)}function N(...e){return B(e,_)}var T=r(1);class j{constructor(e){this.storage=e}setItem(e,t){this.storage[e]=t}getItem(e){return this.storage[e]}}var C=new class{constructor(e){this.storage=e}setItem(e,t){this.storage.setItem(e,JSON.stringify(t))}getItem(e){let t=this.storage.getItem(e);return"string"!=typeof t?null:JSON.parse(t)}}(window.localStorage||window.sessionStorage||new j({}));class P{constructor(e,t,r,n){this.name=e,this.title=t,this.description=r,this.defaultValue=n,Object.freeze(this)}get value(){let e=C.getItem(this.name);return null==e?this.defaultValue:e}set value(e){if(typeof e!=typeof this.defaultValue||Array.isArray(e)!=Array.isArray(this.defaultValue))throw new Error("Invalid type.");C.setItem(this.name,e)}}let R=[new P("useCSS","Use old css styles","This will revert old css styles where it's possible. For example, it will unround edges of avatars and containers.",!0),new P("defreshProfilePage","Defresh profile page","This will roll back the changes of the profile page interface.",!0),new P("keepProfilePageIcons","Don't remove tab icons on the profile page","If you want to keep tab icons on the profile page, enable this option.",!1),new P("defreshProfilePageUserStatus","Defresh status appearance on the profile page","If you prefer the way the status looked before, then this option's for you.",!0),new P("jumpToTop","Jump to the page's top after loading","If you want to preserve the scroll position after page load, you can disable this option.",!0)];for(let e of[...R])R[e.name]=e;var L=R;class M{isApplieble(e=window.location.href,t=null){return!0}waitUntilFixerReady(e=window.location.href,t=null){return!0}apply(e=window.location.href,t=null){}}function z(e,t){return t=t||e.method,fetch(e.action,{method:t,body:new URLSearchParams(new FormData(e))})}async function O(e){!function(){let e=document.querySelector(".progress-pjax-loader");if(e){const t=1200,r=100;e.firstElementChild.style.width=0,e.style.opacity="100%";for(let n=0;ne.firstElementChild.style.width=r+"%",n)}setTimeout(()=>e.style.opacity=0,t+r)}}();let t=await fetch(e);return{document:(new DOMParser).parseFromString(await t.text(),"text/html"),url:t.url}}function U(e){return e.src||e.getAttribute("data-src")}function D(e){document.body.className=e.body.className,document.head.querySelector("title").innerText=e.head.querySelector("title").innerText,function(e){let t=document.querySelector("header"),r=e.querySelector("header");t&&r&&t.replaceWith(r)}(e),function(e){let t=[...document.querySelectorAll("script")],r=[...e.querySelectorAll("script")].map(U).filter(e=>!t.some(t=>U(t)==e)).map(e=>x("script",{src:e}));document.body.append(...r)}(e)}async function F(e=window.location.href,t=!0){let r=function(e=location.pathname){return!a(e)}(),n=p(),i=await O(e),o=i.document.querySelector("main");if(o.style.display="none",r){document.querySelector("body > div.application-main").prepend(x("div",{className:"",attributes:{itemscope:"",itemtype:"http://schema.org/SoftwareSourceCode"},children:[x("main")]}))}let s=document.querySelector("main");if(s.parentElement.insertBefore(o,s),await H(i.url),s.replaceWith(o),r){let e=document.querySelector("body > div.application-main");for(let t of[...e.children].splice(1))e.removeChild(t)}else n&&(o.parentElement.className="");o.style.display="",L.jumpToTop.value&&window.scrollTo(0,0),D(i.document),t&&function(e){try{history.pushState(null,null,e)}catch(t){location.hash="#"+e}}(i.url)}var G=[new class extends M{isApplieble(){return L.useCSS.value}waitUntilFixerReady(){return S(()=>!!document.head||null,(e={interval:100,timeout:3e3,...e}).interval,e.timeout);var e}apply(){if(document.querySelector("head > style[defreshed]"))return;let e=x("style",{type:"text/css",children:[T.a.toString()]});e.setAttribute("defreshed",""),document.head.append(e)}},new class extends M{isApplieble(e){return h(e)}waitUntilFixerReady(){return N(".Subhead--spacious")}apply(){let e=document.querySelector(".Subhead--spacious"),t=x("div",{className:"Subhead Subhead--spacious",children:[x("h2",{className:"Subhead-heading",innerText:"GitHub-Defreshed settings"})]}),r=x("button",{className:"btn",type:"submit",innerText:"Update preferences"});r.addEventListener("click",(function(e){e.preventDefault(),location.reload()}));let n=x("form",{className:"edit_user",children:[...this.generateSettings().filter(e=>e),r]});e.parentElement.insertBefore(t,e),e.parentElement.insertBefore(n,e)}generateSettings(){return L.map(e=>this.generateProperty(e))}generateProperty(e){switch(typeof e.defaultValue){case"boolean":return this.generateBooleanProperty(e);default:return null}}generateBooleanProperty(e){let t=x("input",{id:"github-defreshed_"+e.name,type:"checkbox",checked:e.value});t.addEventListener("change",(function(t){e.value=this.checked}));let r=x("label",{for:t.id,innerText:e.title}),n=e.description?x("span",{className:"note",innerText:e.description}):null;return x("div",{className:"form-checkbox mt-0",children:[t,r,n].filter(e=>e)})}},new class extends M{isApplieble(e){return s(e)&&!p(e)}waitUntilFixerReady(){return function(...e){return B(e,E)}("main:nth-child(1) .container-xl")}apply(){document.querySelector("main .container-xl").className="container-lg clearfix new-discussion-timeline px-3"}},new class extends M{isApplieble(e){return s(e)}waitUntilFixerReady(){return N("main:nth-child(1) > div > nav")}apply(e){let t=document.querySelector("main > div > nav").parentElement;p(e)||(t.className="pagehead repohead hx_repohead readability-menu bg-gray-light pb-0 pt-3",t.firstElementChild.className="d-flex container-lg mb-4 px-3"),t.querySelector("nav").className="js-repo-nav js-sidenav-container-pjax clearfix hx_reponav reponav px-3 container-lg",t.querySelector("nav > ul").className="list-style-none",[...t.querySelectorAll("nav > ul > li")].forEach(e=>{e.className="";let t=e.querySelector("a"),r=t.classList.contains("selected");t.className="js-selected-navigation-item reponav-item"+(r?" selected":"")})}},new class extends M{isApplieble(e){return l(e)||c(e)||u(e)}waitUntilFixerReady(){return N("main:nth-child(1) #branch-select-menu","main:nth-child(1) #branch-select-menu span.css-truncate-target")}apply(){let e=document.querySelector("#branch-select-menu span.css-truncate-target");e.parentElement.insertBefore(x("i",{className:"d-none d-lg-inline",innerText:"Branch: "}),e)}},new class extends M{isApplieble(e){return l(e)||c(e)}waitUntilFixerReady(e){let t=["main:nth-child(1) .repository-content .Box relative-time","main:nth-child(1) .repository-content .Box div.flex-shrink-0:not(.hx_avatar_stack_commit)"];return l(e)&&(t.push("main:nth-child(1) .repository-content .file-navigation > :not(#branch-select-menu) svg.octicon-git-branch"),t.push("main:nth-child(1) .repository-content .Box ul.list-style-none svg.octicon-history")),N({selectors:t,dynamic:!0})}apply(e,t){l(e)&&this._backupDetails(t),this._moveCommitBuildStatuses(),this._moveCommitComments(),this._moveCommitDetails(),this._removeSecondCommitTitle()}_backupDetails(e){let t=document.querySelector(".repository-content .file-navigation > :not(#branch-select-menu) svg.octicon-git-branch").parentElement;t.id="backup-branches";let r=t.parentElement;r.parentElement.removeChild(r),e.append(t);let n=document.querySelector(".repository-content .Box ul.list-style-none svg.octicon-history").parentElement;n.id="backup-commits";let a=n.parentElement.parentElement;a.parentElement.removeChild(a),e.append(n)}_getBuildStatuses(){return document.querySelector("main:nth-child(1) .repository-content .Box .Box-header include-fragment")||document.querySelector("main:nth-child(1) .repository-content .Box .Box-header details.commit-build-statuses")}_moveCommitBuildStatuses(){if(this._getBuildStatuses()){let e=document.querySelector(".repository-content .Box .Box-header .commit-author").parentElement;e.parentElement.insertBefore(x("div",{className:"ml-1",children:[this._getBuildStatuses()]}),e.nextSibling)}}_moveCommitComments(){let e=document.querySelector("main:nth-child(1) .repository-content .Box .Box-header svg.octicon-comment");if(e){let t=e.parentElement;t.className="no-wrap muted-link text-inherit ml-2";let r=document.querySelector(".repository-content .Box .Box-header a.commit-author").parentElement;r.parentElement.insertBefore(t,r.nextSibling)}}_moveCommitDetails(){let e=document.querySelector(".repository-content .Box relative-time").parentElement.parentElement,t=document.querySelector(".repository-content .Box div.flex-shrink-0:not(.hx_avatar_stack_commit)");for(let e of[...t.children])t.removeChild(e);let r=e.querySelector(".text-mono");r.classList.remove("ml-2");let n=x("div",{className:"css-truncate css-truncate-overflow text-gray",children:["Latest commit ",r," ",e.querySelector("relative-time")]});t.append(n),e.parentElement.removeChild(e)}_removeSecondCommitTitle(){let e=document.querySelector(".repository-content .Box .Box-header .Details-content--hidden a.text-bold");e&&e.parentElement.parentElement.removeChild(e.parentElement)}},new class extends M{isApplieble(e){return l(e)}async waitUntilFixerReady(){return await N("main:nth-child(1) .BorderGrid-row:last-child")&&await A("main:nth-child(1) .BorderGrid-row .Progress")}apply(){let e=x("div","d-flex repository-lang-stats-graph"),t=x("ol","repository-lang-stats-numbers"),r=x("details",{className:"details-reset mb-3",children:[x("summary",{title:"Click for language details",children:[e]}),x("div",{className:"repository-lang-stats",children:[t]})]}),n=[...document.querySelector("main .BorderGrid-row .Progress").parentElement.nextElementSibling.children];for(let r of n.map(this._extractLanguageData)){let n=x("span",{className:"language-color",attributes:{"aria-label":`${r.name} ${r.percent}`,itemprop:"keywords"},innerText:r.name,style:{width:r.percent,backgroundColor:r.color}});e.append(n);let a=x(r.link?"a":"span",{href:r.link,children:[x("span",{className:"color-block language-color",style:{backgroundColor:r.color}}),x("span",{className:"lang",innerText:` ${r.name} `}),x("span",{className:"percent",innerText:r.percent})]});t.append(x("li",{children:[a]}))}document.querySelector(".repository-content").prepend(r)}_extractLanguageData(e){return e.querySelector("a")?{name:e.querySelector("span").innerText,percent:e.querySelectorAll("span")[1].innerText,color:e.querySelector("svg").style.color,link:e.querySelector("a").href}:{name:e.querySelectorAll("span")[1].innerText,percent:e.querySelectorAll("span")[2].innerText,color:e.querySelector("svg").style.color,link:""}}},new class extends M{isApplieble(e){return l(e)}apply(e,t){let r=document.querySelector(".repository-content details summary div.repository-lang-stats-graph"),n=x("ul",{className:"numbers-summary",children:[this._createCommitsSummaryElement(t),this._createBranchesSummaryElement(t),this._createPackagesSummaryElement(e),this._createReleasesSummaryElement(e),this._createContributorsSummaryElement(e),this._createLicenseSummaryElement()].filter(e=>e)});document.querySelector(".repository-content").prepend(x("div",{className:"overall-summary "+(r?"border-bottom-0 mb-0 rounded-bottom-0":"mb-3"),children:[n]}))}_createCommitsSummaryElement(e){let t=e.querySelector("#backup-commits"),r=t.querySelector("strong").innerText,n=t.href;return this._createSummaryElement('',n,"commit",r)}_createBranchesSummaryElement(e){let t=e.querySelector("#backup-branches"),r=t.querySelector("strong").innerText,n=t.href;return this._createSummaryElement('',n,"branch",r,"es")}_createPackagesSummaryElement(e){return this._createSummaryElementFromRightBar(e,'',"package","s",0,"",!1)}_createReleasesSummaryElement(e){return this._createSummaryElementFromRightBar(e,'',"release")}_createContributorsSummaryElement(e){return this._createSummaryElementFromRightBar(e,'',"contributor","s",1,"graphs/")}_createLicenseSummaryElement(){let e=document.querySelector(".flex-shrink-0.col-12.col-md-3 svg.octicon-law");if(e){let t=e.parentElement.href,r=e.parentElement.innerText.trim().replace(" License",""),n='';return this._createSummaryElement(n,t,r)}return null}_createSummaryElementFromRightBar(e,t,r,n="s",a=0,o="",s=!0){let l,c,u=r+n,d=[...document.querySelectorAll(".flex-shrink-0.col-12.col-md-3 div.BorderGrid-cell")].find(e=>{let t=e.querySelector("a");return t&&t.href.endsWith(u)});return d||s?(d?(l=(d.querySelector("span.Counter")||{}).innerText||0,c=d.querySelector("a").href):(l=a,c=i(e)+"/"+o+u),this._createSummaryElement(t,c,r,l,n)):null}_createSummaryElement(e,t,r,n=-1,a="s"){let i=e+"\n";return-1==n?i+=r:(i+=`${n}`,i+="\n",i+=r,1!=n&&(i+=a)),x("li",{children:[x("a",{href:t,innerHTML:i})]})}},new class extends M{isApplieble(e){return l(e)}async waitUntilFixerReady(){return await N("main:nth-child(1) .repository-content .BorderGrid-row")&&await A("main:nth-child(1) .repository-content .BorderGrid-cell .topic-tag")}apply(){let e=document.querySelector("main .repository-content .BorderGrid-cell .topic-tag");document.querySelector("main .repository-content").prepend(x("div",{className:"repository-topics-container mt-2 mb-3 js-topics-list-container",children:[e.parentElement]}))}},new class extends M{isApplieble(e){return l(e)}waitUntilFixerReady(){return N("main:nth-child(1) .repository-content .BorderGrid-row")}apply(){let e=document.querySelector("main .repository-content"),t=e.querySelector(".BorderGrid-cell"),r=t.querySelector(".f4"),n=t.querySelector(".topic-tag"),a=n?n.parentElement:null,i=t.querySelector(".octicon-link");i&&(i=i.parentElement.querySelector("a"));let o=i?i.href:"";e.prepend(x("div",{className:a?"":"mb-3",children:[x("div",{className:"f4",children:[x("span",{className:"text-gray-dark mr-2",innerHTML:r.innerHTML}),o?x("span",{children:[x("a",{href:o,title:o,role:"link",target:"_blank",rel:"noopener noreferrer",innerText:o})]}):null].filter(e=>e)})]}))}},new class extends M{isApplieble(e){return l(e)}async waitUntilFixerReady(){return await N("main:nth-child(1) .repository-content .BorderGrid-row")&&await A("main:nth-child(1) .repository-content .BorderGrid-row:nth-child(1) details")}apply(){let e=document.querySelector("main .repository-content .BorderGrid-row:nth-child(1) details");e&&document.querySelector("main .repository-content").prepend(e)}},new class extends M{isApplieble(e){return l(e)}waitUntilFixerReady(){return N("main:nth-child(1) .repository-content")}apply(){let e=document.querySelector(".repository-content"),t=e.querySelector(".gutter-condensed"),r=t.firstElementChild;e.append(...r.children),t.parentElement.removeChild(t)}},new class extends M{isApplieble(e){return l(e)||c(e)}async waitUntilFixerReady(){return await N("main:nth-child(1) .repository-content")&&await A("main:nth-child(1) #readme")}apply(){let e=document.querySelector("#readme");e.className="Box md js-code-block-container Box--condensed",e.querySelector(".Box-header").className="Box-header d-flex flex-items-center flex-justify-between";let t=e.querySelector(".Box-title.pr-3");t.innerHTML=''+t.innerHTML}},new class extends M{isApplieble(e){return L.defreshProfilePage.value&&f(e)}waitUntilFixerReady(){return N("main:nth-child(1) nav","main:nth-child(1) div.js-profile-editable-area > :not(.vcard-details)[class]")}apply(e){let t=document.querySelector("main div.js-profile-editable-area > :not(.vcard-details)[class]"),r=document.querySelector("main nav");r.style.overflow="hidden",r.append(...this._generateTabs(t,e)),t.parentElement.removeChild(t),L.keepProfilePageIcons.value||[...r.querySelectorAll("svg")].forEach(e=>e.style.display="none")}_generateTabs(e,t){let r=["stars","followers","following"],n=[null,null,''];return[...e.querySelectorAll("a")].filter(e=>r.includes(this._getTabName(e.href))).sort((e,t)=>r.indexOf(this._getTabName(e.href))-r.indexOf(this._getTabName(t.href))).map(e=>this._generateTab(t,e,n[r.indexOf(this._getTabName(e.href))])).filter(e=>e)}_getTabName(e){let t=e.indexOf("?");return-1==t?"":new URLSearchParams(e.substring(t)).get("tab")}_generateTab(e,t,r=null){let n=t.querySelector("svg");!n&&r&&(n=x("div",{innerHTML:r}).querySelector("svg"));let a=this._getTabName(t.href).trim();a=" "+a[0].toUpperCase()+a.slice(1)+" ";let i=t.querySelector("span"),o=i&&i.innerText?i.innerText.trim():"0",s="0"==o?null:x("span",{className:"Counter",title:o,innerText:o});return x("a",{href:t.href,className:"UnderlineNav-item"+(this._getTabName(e)==this._getTabName(t.href)?" selected":""),children:[n,a,s].filter(e=>e)})}},new class extends M{isApplieble(e){return L.defreshProfilePage.value&&L.defreshProfilePageUserStatus.value&&f(e)}waitUntilFixerReady(){return A("main:nth-child(1) .user-status-container")}apply(){let e=document.querySelector("main .user-status-container"),t=e.querySelector("img")||e.querySelector("g-emoji"),r=e.querySelector(".user-status-message-wrapper"),n=r?r.innerText.trim():"",a=!!e.querySelector(".bg-yellow-light"),i=e.querySelector("details-dialog");this._fixDetails(i);let o=this._createStatusContainer(t,n,a,i);e.replaceWith(o);let s=document.querySelector("main img.avatar");s&&s.classList.add("avatar-before-user-status")}_createStatusContainer(e,t,r=!1,n=null){return x(n?"details":"div",{className:"user-status-container border position-relative hide-sm hide-md"+(n?" details-reset details-overlay details-overlay-dark":""),children:[x(n?"summary":"div",{className:"d-flex",children:[x("div",{className:"d-flex p-2 width-full border-0 rounded-bottom-0"+(r?" user-status-container-border-busy bg-yellow-light border-yellow":""),children:[x("div",{className:"flex-self-start mr-1 ml-1",children:[x("div",{children:[e]})]}),x("div",{className:"user-status-message-wrapper f6 mt-1 text-gray-dark ws-normal",children:[x("div",{children:[x("div",{innerText:t})]})]})]})]}),n].filter(e=>e)})}_fixDetails(e){e&&(this._fixDetailsFragments(e),this._fixDetailsEmojis(e),this._fixDetailsButtons(e))}_fixDetailsFragments(e){for(let t of[...e.querySelectorAll("include-fragment")])t.setAttribute("src",t.getAttribute("data-url"))}_fixDetailsEmojis(e){let t=e.querySelector(".js-user-status-custom-emoji"),r=e.querySelector("form").emoji;e.querySelector(".btn-open-emoji-picker").addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();let a=e.querySelector("emoji-picker");a&&(this._fixEmojiPicker(t,r,a),a.open())})}_fixEmojiPicker(e,t,r){if(!r.fixed){for(let n of[...r.querySelectorAll(".js-emoji-button")])n.addEventListener("click",(function(n){n.preventDefault(),t.value=this.getAttribute("value");let a=this.children[0].cloneNode(!0);a.removeAttribute("width"),a.removeAttribute("height"),e.children[0].replaceWith(x("div",{children:[a]})),r.close()}));r.fixed=!0}}_fixDetailsButtons(e){let t=e.querySelector("form button[type='submit']"),r=t.parentElement.querySelector("button:not([type='submit'])");t.addEventListener("click",(async function(e){e.preventDefault(),await z(this.form),location.reload()})),r.addEventListener("click",(async function(e){e.preventDefault();let t=this.form;t.emoji.value="",t.message.value="",t.limited_availability.value="0",await z(this.form),location.reload()}))}},new class extends M{isApplieble(e){return L.defreshProfilePage.value&&f(e)}async waitUntilFixerReady(){return await N("main:nth-child(1) .h-card")&&await A("main:nth-child(1) #blob-more-options-details")}apply(){let e=document.querySelector("#blob-more-options-details"),t=e.querySelector("details").parentElement;t.querySelector("summary").className="btn-link text-small muted-link my-1",document.querySelector("main .h-card").append(x("div",{className:"pt-3",children:[t]})),e.parentElement.remove()}},new class extends M{apply(){this._setupObserver(),this._fixAll()}_needToBeFixed(e){return!e.hasAttribute("defreshed")&&e.href&&!m(e.href)&&(!!(t=e.href)&&(t.startsWith("/")||y(t,location.host)))&&(s(e.href)||h(e.href)||f(e.href))&&!d(e.href)&&!p(e.href);var t}_fix(e){e.setAttribute("defreshed",""),e.addEventListener("click",(async function(e){e.metaKey||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),F(g(this.href)))}))}_fixAll(){[...document.querySelectorAll("a")].filter(this._needToBeFixed).forEach(this._fix)}_setupObserver(){window.defreshObserver||(window.defreshObserver=new MutationObserver(()=>this._fixAll()),window.defreshObserver.observe(document.body,{childList:!0,subtree:!0}))}},new class extends M{apply(){window.onpopstate=function(){let e=document.location.href;b(e)&&s(e)&&!m(e)?F(e,!1):window.location.href=document.location.href}}}];async function H(e=window.location.href){let t=document.createElement("backup");for(let r of G)if(r.isApplieble(e,t)&&await r.waitUntilFixerReady(e,t))try{r.apply(e,t)}catch(e){console.log("Fixer exception: ",e)}}!window.defreshed&&b()&&(window.defreshed=!0,H())}]); \ No newline at end of file