mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-09 01:41:09 +02:00
perf: improve page loading time
This commit is contained in:
1 parent
8fdd6228e4
commit
22a28a913d
9 files changed
+2795
-209
No files matched your search
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* Bootstrap v4.4.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unsLine truncated
|
||||
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
|
||||
@@ -3,12 +3,12 @@
|
||||
"short_name": "Anonymous Github",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"src": "/favicon/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-256x256.png",
|
||||
"src": "/favicon/android-chrome-256x256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
+6
-48
@@ -33,54 +33,7 @@
|
||||
<meta name="msapplication-config" content="/favicon/browserconfig.xml" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="/css/font-awesome.min.css" />
|
||||
|
||||
<link rel="stylesheet" href="/css/color-schema.css" />
|
||||
<link rel="stylesheet" href="/css/style.css" />
|
||||
<link rel="stylesheet" href="/css/notebook.css" />
|
||||
<link rel="stylesheet" href="/css/katex.min.css" />
|
||||
<link rel="stylesheet" href="/css/github-markdown.min.css" />
|
||||
|
||||
<!-- JS -->
|
||||
<script src="/script/external/angular.min.js"></script>
|
||||
<script src="/script/external/angular-translate.min.js"></script>
|
||||
<script src="/script/external/angular-translate-loader-static-files.min.js"></script>
|
||||
<script src="/script/external/angular-sanitize.min.js"></script>
|
||||
<script src="/script/external/angular-route.min.js"></script>
|
||||
|
||||
<script src="/script/external/jquery-3.4.1.min.js"></script>
|
||||
<script src="/script/external/popper.min.js"></script>
|
||||
<script src="/script/external/bootstrap.min.js"></script>
|
||||
|
||||
<!-- PDF -->
|
||||
<script src="/script/external/pdf.compat.js"></script>
|
||||
<script src="/script/external/pdf.js"></script>
|
||||
|
||||
<!-- Code -->
|
||||
<script src="/script/external/ace/ace.js"></script>
|
||||
<script src="/script/external/ui-ace.min.js"></script>
|
||||
<script src="/script/langColors.js"></script>
|
||||
|
||||
<!-- Notebook -->
|
||||
<script src="/script/external/github-emojis.js"></script>
|
||||
<script src="/script/external/marked-emoji.js"></script>
|
||||
<script src="/script/external/marked.min.js"></script>
|
||||
<script src="/script/external/purify.min.js"></script>
|
||||
<script src="/script/external/ansi_up.min.js"></script>
|
||||
<script src="/script/external/prism.min.js"></script>
|
||||
<script src="/script/external/katex.min.js"></script>
|
||||
<script src="/script/external/katex-auto-render.min.js"></script>
|
||||
<script src="/script/external/notebook.min.js"></script>
|
||||
|
||||
<script src="/script/external/org.js"></script>
|
||||
|
||||
<!-- Anonymous GitHub scripts -->
|
||||
<script src="/script/utils.js"></script>
|
||||
<script src="/script/ng-pdfviewer.min.js"></script>
|
||||
<script src="/script/admin.js"></script>
|
||||
<script src="/script/app.js"></script>
|
||||
<link rel="stylesheet" href="/css/all.min.css" />
|
||||
</head>
|
||||
<body keypress-events class="d-flex flex-column">
|
||||
<ng-include src="'partials/header.htm'"></ng-include>
|
||||
@@ -115,6 +68,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/script/bundle.min.js"></script>
|
||||
<script>
|
||||
ace.config.set("basePath", "/script/external/ace/");
|
||||
PDFJS.workerSrc = "/script/external/pdf.worker.js";
|
||||
</script>
|
||||
<script src="https://storage.ko-fi.com/cdn/scripts/overlay-widget.js"></script>
|
||||
<script>
|
||||
kofiWidgetOverlay.draw("tdurieux", {
|
||||
|
||||
+131
-151
@@ -7,133 +7,138 @@ angular
|
||||
"pascalprecht.translate",
|
||||
"admin",
|
||||
])
|
||||
.config(function ($routeProvider, $locationProvider, $translateProvider) {
|
||||
$translateProvider.useStaticFilesLoader({
|
||||
prefix: "/i18n/locale-",
|
||||
suffix: ".json",
|
||||
});
|
||||
|
||||
$translateProvider.preferredLanguage("en");
|
||||
|
||||
$routeProvider
|
||||
.when("/", {
|
||||
templateUrl: "/partials/home.htm",
|
||||
controller: "homeController",
|
||||
title: "Anonymous GitHub",
|
||||
})
|
||||
.when("/dashboard", {
|
||||
templateUrl: "/partials/dashboard.htm",
|
||||
controller: "dashboardController",
|
||||
title: "Dashboard - Anonymous GitHub",
|
||||
})
|
||||
.when("/pr-dashboard", {
|
||||
templateUrl: "/partials/pr-dashboard.htm",
|
||||
controller: "prDashboardController",
|
||||
title: "Pull Request Dashboard - Anonymous GitHub",
|
||||
})
|
||||
.when("/anonymize/:repoId?", {
|
||||
templateUrl: "/partials/anonymize.htm",
|
||||
controller: "anonymizeController",
|
||||
title: "Anonymize - Anonymous GitHub",
|
||||
})
|
||||
.when("/pull-request-anonymize/:pullRequestId?", {
|
||||
templateUrl: "/partials/anonymizePullRequest.htm",
|
||||
controller: "anonymizePullRequestController",
|
||||
title: "Anonymize - Anonymous GitHub",
|
||||
})
|
||||
.when("/status/:repoId", {
|
||||
templateUrl: "/partials/status.htm",
|
||||
controller: "statusController",
|
||||
title: "Repository status - Anonymous GitHub",
|
||||
})
|
||||
.when("/conferences", {
|
||||
templateUrl: "/partials/conferences.htm",
|
||||
controller: "conferencesController",
|
||||
title: "Conferences - Anonymous GitHub",
|
||||
})
|
||||
.when("/conference/new", {
|
||||
templateUrl: "/partials/newConference.htm",
|
||||
controller: "newConferenceController",
|
||||
title: "Add a conference - Anonymous GitHub",
|
||||
})
|
||||
.when("/conference/:conferenceId/edit", {
|
||||
templateUrl: "/partials/newConference.htm",
|
||||
controller: "newConferenceController",
|
||||
title: "Edit conference - Anonymous GitHub",
|
||||
})
|
||||
.when("/conference/:conferenceId", {
|
||||
templateUrl: "/partials/conference.htm",
|
||||
controller: "conferenceController",
|
||||
title: "Conference - Anonymous GitHub",
|
||||
})
|
||||
.when("/faq", {
|
||||
templateUrl: "/partials/faq.htm",
|
||||
controller: "faqController",
|
||||
title: "FAQ - Anonymous GitHub",
|
||||
})
|
||||
.when("/profile", {
|
||||
templateUrl: "/partials/profile.htm",
|
||||
controller: "profileController",
|
||||
title: "Profile - Anonymous GitHub",
|
||||
})
|
||||
.when("/claim", {
|
||||
templateUrl: "/partials/claim.htm",
|
||||
controller: "claimController",
|
||||
title: "Claim repository - Anonymous GitHub",
|
||||
})
|
||||
.when("/pr/:pullRequestId", {
|
||||
templateUrl: "/partials/pullRequest.htm",
|
||||
controller: "pullRequestController",
|
||||
title: "Anonymized Pull Request - Anonymous GitHub",
|
||||
reloadOnUrl: false,
|
||||
})
|
||||
.when("/r/:repoId/:path*?", {
|
||||
templateUrl: "/partials/explorer.htm",
|
||||
controller: "exploreController",
|
||||
title: "Anonymized Repository - Anonymous GitHub",
|
||||
reloadOnUrl: false,
|
||||
})
|
||||
.when("/repository/:repoId/:path*?", {
|
||||
templateUrl: "/partials/explorer.htm",
|
||||
controller: "exploreController",
|
||||
title: "Anonymized Repository - Anonymous GitHub",
|
||||
reloadOnUrl: false,
|
||||
})
|
||||
.when("/admin/", {
|
||||
templateUrl: "/partials/admin/repositories.htm",
|
||||
controller: "repositoriesAdminController",
|
||||
title: "Repositories Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/users", {
|
||||
templateUrl: "/partials/admin/users.htm",
|
||||
controller: "usersAdminController",
|
||||
title: "Users Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/users/:username", {
|
||||
templateUrl: "/partials/admin/user.htm",
|
||||
controller: "userAdminController",
|
||||
title: "User Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/conferences", {
|
||||
templateUrl: "/partials/admin/conferences.htm",
|
||||
controller: "conferencesAdminController",
|
||||
title: "Conferences Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/queues", {
|
||||
templateUrl: "/partials/admin/queues.htm",
|
||||
controller: "queuesAdminController",
|
||||
title: "Queues Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/404", {
|
||||
templateUrl: "/partials/404.htm",
|
||||
title: "Page not found - Anonymous GitHub",
|
||||
})
|
||||
.otherwise({
|
||||
templateUrl: "/partials/404.htm",
|
||||
title: "Page not found - Anonymous GitHub",
|
||||
.config([
|
||||
"$routeProvider",
|
||||
"$locationProvider",
|
||||
"$translateProvider",
|
||||
function ($routeProvider, $locationProvider, $translateProvider) {
|
||||
$translateProvider.useStaticFilesLoader({
|
||||
prefix: "/i18n/locale-",
|
||||
suffix: ".json",
|
||||
});
|
||||
$locationProvider.html5Mode(true);
|
||||
})
|
||||
|
||||
$translateProvider.preferredLanguage("en");
|
||||
|
||||
$routeProvider
|
||||
.when("/", {
|
||||
templateUrl: "/partials/home.htm",
|
||||
controller: "homeController",
|
||||
title: "Anonymous GitHub",
|
||||
})
|
||||
.when("/dashboard", {
|
||||
templateUrl: "/partials/dashboard.htm",
|
||||
controller: "dashboardController",
|
||||
title: "Dashboard - Anonymous GitHub",
|
||||
})
|
||||
.when("/pr-dashboard", {
|
||||
templateUrl: "/partials/pr-dashboard.htm",
|
||||
controller: "prDashboardController",
|
||||
title: "Pull Request Dashboard - Anonymous GitHub",
|
||||
})
|
||||
.when("/anonymize/:repoId?", {
|
||||
templateUrl: "/partials/anonymize.htm",
|
||||
controller: "anonymizeController",
|
||||
title: "Anonymize - Anonymous GitHub",
|
||||
})
|
||||
.when("/pull-request-anonymize/:pullRequestId?", {
|
||||
templateUrl: "/partials/anonymizePullRequest.htm",
|
||||
controller: "anonymizePullRequestController",
|
||||
title: "Anonymize - Anonymous GitHub",
|
||||
})
|
||||
.when("/status/:repoId", {
|
||||
templateUrl: "/partials/status.htm",
|
||||
controller: "statusController",
|
||||
title: "Repository status - Anonymous GitHub",
|
||||
})
|
||||
.when("/conferences", {
|
||||
templateUrl: "/partials/conferences.htm",
|
||||
controller: "conferencesController",
|
||||
title: "Conferences - Anonymous GitHub",
|
||||
})
|
||||
.when("/conference/new", {
|
||||
templateUrl: "/partials/newConference.htm",
|
||||
controller: "newConferenceController",
|
||||
title: "Add a conference - Anonymous GitHub",
|
||||
})
|
||||
.when("/conference/:conferenceId/edit", {
|
||||
templateUrl: "/partials/newConference.htm",
|
||||
controller: "newConferenceController",
|
||||
title: "Edit conference - Anonymous GitHub",
|
||||
})
|
||||
.when("/conference/:conferenceId", {
|
||||
templateUrl: "/partials/conference.htm",
|
||||
controller: "conferenceController",
|
||||
title: "Conference - Anonymous GitHub",
|
||||
})
|
||||
.when("/faq", {
|
||||
templateUrl: "/partials/faq.htm",
|
||||
controller: "faqController",
|
||||
title: "FAQ - Anonymous GitHub",
|
||||
})
|
||||
.when("/profile", {
|
||||
templateUrl: "/partials/profile.htm",
|
||||
controller: "profileController",
|
||||
title: "Profile - Anonymous GitHub",
|
||||
})
|
||||
.when("/claim", {
|
||||
templateUrl: "/partials/claim.htm",
|
||||
controller: "claimController",
|
||||
title: "Claim repository - Anonymous GitHub",
|
||||
})
|
||||
.when("/pr/:pullRequestId", {
|
||||
templateUrl: "/partials/pullRequest.htm",
|
||||
controller: "pullRequestController",
|
||||
title: "Anonymized Pull Request - Anonymous GitHub",
|
||||
reloadOnUrl: false,
|
||||
})
|
||||
.when("/r/:repoId/:path*?", {
|
||||
templateUrl: "/partials/explorer.htm",
|
||||
controller: "exploreController",
|
||||
title: "Anonymized Repository - Anonymous GitHub",
|
||||
reloadOnUrl: false,
|
||||
})
|
||||
.when("/repository/:repoId/:path*?", {
|
||||
templateUrl: "/partials/explorer.htm",
|
||||
controller: "exploreController",
|
||||
title: "Anonymized Repository - Anonymous GitHub",
|
||||
reloadOnUrl: false,
|
||||
})
|
||||
.when("/admin/", {
|
||||
templateUrl: "/partials/admin/repositories.htm",
|
||||
controller: "repositoriesAdminController",
|
||||
title: "Repositories Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/users", {
|
||||
templateUrl: "/partials/admin/users.htm",
|
||||
controller: "usersAdminController",
|
||||
title: "Users Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/users/:username", {
|
||||
templateUrl: "/partials/admin/user.htm",
|
||||
controller: "userAdminController",
|
||||
title: "User Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/conferences", {
|
||||
templateUrl: "/partials/admin/conferences.htm",
|
||||
controller: "conferencesAdminController",
|
||||
title: "Conferences Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/admin/queues", {
|
||||
templateUrl: "/partials/admin/queues.htm",
|
||||
controller: "queuesAdminController",
|
||||
title: "Queues Admin - Anonymous GitHub",
|
||||
})
|
||||
.when("/404", {
|
||||
templateUrl: "/partials/404.htm",
|
||||
title: "Page not found - Anonymous GitHub",
|
||||
})
|
||||
.otherwise({
|
||||
templateUrl: "/partials/404.htm",
|
||||
title: "Page not found - Anonymous GitHub",
|
||||
});
|
||||
$locationProvider.html5Mode(true);
|
||||
},
|
||||
])
|
||||
.filter("humanFileSize", function () {
|
||||
return humanFileSize;
|
||||
})
|
||||
@@ -2442,28 +2447,3 @@ angular
|
||||
getConference();
|
||||
},
|
||||
]);
|
||||
function humanFileSize(bytes, si = false, dp = 1) {
|
||||
const thresh = si ? 1000 : 1024;
|
||||
|
||||
bytes = bytes / 8;
|
||||
|
||||
if (Math.abs(bytes) < thresh) {
|
||||
return bytes + "B";
|
||||
}
|
||||
|
||||
const units = si
|
||||
? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
||||
: ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
||||
let u = -1;
|
||||
const r = 10 ** dp;
|
||||
|
||||
do {
|
||||
bytes /= thresh;
|
||||
++u;
|
||||
} while (
|
||||
Math.round(Math.abs(bytes) * r) / r >= thresh &&
|
||||
u < units.length - 1
|
||||
);
|
||||
|
||||
return bytes.toFixed(dp) + "" + units[u];
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
!function(me){"use strict";function i(e){if(!ye(e))return rn;C(e.objectMaxDepth)&&(rn.objectMaxDepth=x(e.objectMaxDepth)?e.objectMaxDepth:NaN),C(e.urlErrorParamsEnabled)&&A(e.urlErrorParamsEnabled)&&(rn.urlErrorParamsEnabled=e.urlErrorParamsEnabled)}function x(e){return b(e)&&0<e}function T(s,o){return o=o||Error,function(){var e=arguments[0];for(t="["+(s?s+":":"")+e+"] http://errors.angularjs.org/1.8.2/"+(s?s+"/":"")+e,e=1;e<arguments.length;e++){var t=t+(1==e?"?":"&")+"p"+(e-1)+"=",i=encodeURIComponent,n=arguments[e];t+=i(n="function"==typeof n?n.toString().replace(/ \{[\s\S]*$/,""):void 0===n?"undefined":"string"!=typeof n?JSON.stringify(n):n)}return new o(t)}}function L(e){var t;return null!=e&&!h(e)&&(xe(e)||we(e)||Ce&&e instanceof Ce||b(t="length"in Object(e)&&e.length)&&(0<=t&&t-1 in e||"function"==typeof e.item))}function fe(e,t,i){if(e)if($e(e))for(s in e)"prototype"!==s&&"length"!==s&&"name"!==s&&e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else if(xe(e)||L(e))for(var n="object"!=typeof e,s=0,o=e.length;s<o;s++)(n||s in e)&&t.call(i,e[s],s,e);else if(e.forEach&&e.forEach!==fe)e.forEach(t,i,e);else if(l(e))for(s in e)t.call(i,e[s],s,e);else if("function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else for(s in e)cn.call(e,s)&&t.call(i,e[s],s,e);return e}function r(e,t,i){for(var n=Object.keys(e).sort(),s=0;s<n.length;s++)t.call(i,e[n[s]],n[s])}function k(i){return function(e,t){i(t,e)}}function g(e,t,i){for(var n=e.$$hashKey,s=0,o=t.length;s<o;++s){var r=t[s];if(ye(r)||$e(r))for(var a=Object.keys(r),c=0,l=a.length;c<l;c++){var u=a[c],h=r[u];i&&ye(h)?$(h)?e[u]=new Date(h.valueOf()):m(h)?e[u]=new RegExp(h):h.nodeName?e[u]=h.cloneNode(!0):M(h)?e[u]=h.clone():"__proto__"!==u&&(ye(e[u])||(e[u]=xe(h)?[]:{}),g(e[u],[h],!0)):e[u]=h}}return n?e.$$hashKey=n:delete e.$$hashKey,e}function be(e){return g(e,un.call(arguments,1),!1)}function n(e){return g(e,un.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function Re(e,t){return be(Object.create(e),t)}function S(){}function Le(e){return e}function _(e){return function(){return e}}function u(e){return $e(e.toString)&&e.toString!==v}function ve(e){return void 0===e}function C(e){return void 0!==e}function ye(e){return null!==e&&"object"==typeof e}function l(e){return null!==e&&"object"==typeof e&&!gn(e)}function we(e){return"string"==typeof e}function b(e){return"number"==typeof e}function $(e){return"[object Date]"===v.call(e)}function xe(e){return Array.isArray(e)||e instanceof Array}function Me(e){switch(v.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return e instanceof Error}}function $e(e){return"function"==typeof e}function m(e){return"[object RegExp]"===v.call(e)}function h(e){return e&&e.window===e}function Oe(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"boolean"==typeof e}function M(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function ke(e){return je(e.nodeName||e[0]&&e[0].nodeName)}function Ie(e,t){t=e.indexOf(t);return 0<=t&&e.splice(t,1),t}function O(e,i,t){function s(e,t,i){if(--i<0)return"...";var n=t.$$hashKey;if(xe(e))for(var s=0,o=e.length;s<o;s++)t.push(r(e[s],i));else if(l(e))for(s in e)t[s]=r(e[s],i);else if(e&&"function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&(t[s]=r(e[s],i));else for(s in e)cn.call(e,s)&&(t[s]=r(e[s],i));return n?t.$$hashKey=n:delete t.$$hashKey,t}function r(e,t){if(!ye(e))return e;if(-1!==(i=o.indexOf(e)))return a[i];if(h(e)||Oe(e))throw pn("cpws");var i=!1,n=function(e){switch(v.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(r(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":var t;return e.slice?e.slice(0):(t=new ArrayBuffer(e.byteLength),new Uint8Array(t).set(new Uint8Array(e)),t);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":return(t=new RegExp(e.source,e.toString().match(/[^/]*$/)[0])).lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if($e(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===n&&(n=xe(e)?[]:Object.create(gn(e)),i=!0),o.push(e),a.push(n),i?s(e,n,t):n}var n,o=[],a=[];if(t=x(t)?t:NaN,i){if((n=i)&&b(n.length)&&bn.test(v.call(n))||"[object ArrayBuffer]"===v.call(i))throw pn("cpta");if(e===i)throw pn("cpi");return xe(i)?i.length=0:fe(i,function(e,t){"$$hashKey"!==t&&delete i[t]}),o.push(e),a.push(i),s(e,i,t)}return r(e,t)}function De(e,t){return e===t||e!=e&&t!=t}function Ae(e,t){if(e===t)return!0;if(null!==e&&null!==t){if(e!=e&&t!=t)return!0;var i,n=typeof e;if(n===typeof t&&"object"===n){if(!xe(e)){if($(e))return!!$(t)&&De(e.getTime(),t.getTime());if(m(e))return!!m(t)&&e.toString()===t.toString();Line truncated
|
||||
${e}</blockquote>
|
||||
`}html(e,t){return e}heading(e,t,i){return`<h${t}>${e}</h${t}>
|
||||
`}hr(){return"<hr>\n"}list(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e,t,i){return`<li>${e}</li>
|
||||
`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
|
||||
`}table(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&`<tbody>${t}</tbody>`)+"</table>\n"}tablerow(e){return`<tr>
|
||||
${e}</tr>
|
||||
`}tablecell(e,t){var i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+e+`</${i}>
|
||||
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,i){var n=c(e);if(null===n)return i;let s='<a href="'+(e=n)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+i+"</a>"}image(e,t,i){var n=c(e);if(null===n)return i;let s=`<img src="${e=n}" alt="${i}"`;return t&&(s+=` title="${t}"`),s+=">"}text(e){return e}}class R{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class L{options;renderer;textRenderer;constructor(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new E,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new R}static parse(e,t){return new L(t).parse(e)}static parseInline(e,t){return new L(t).parseInline(e)}parse(n,s=!0){let o="";for(let i=0;i<n.length;i++){var r=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const n=r,s=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(n.type)){o+=s||"";continue}}switch(r.type){case"space":continue;case"hr":o+=this.renderer.hr();continue;case"heading":{const n=r;o+=this.renderer.heading(this.parseInline(n.tokens),n.depth,this.parseInline(n.tokens,this.textRenderer).replace(F,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":{const n=r;o+=this.renderer.code(n.text,n.lang,!!n.escaped);continue}case"table":{const n=r;let e="",t="";for(let e=0;e<n.header.length;e++)t+=this.renderer.tablecell(this.parseInline(n.header[e].tokens),{header:!0,align:n.align[e]});e+=this.renderer.tablerow(t);let i="";for(let e=0;e<n.rows.length;e++){const o=n.rows[e];t="";for(let e=0;e<o.length;e++)t+=this.renderer.tablecell(this.parseInline(o[e].tokens),{header:!1,align:n.align[e]});i+=this.renderer.tablerow(t)}o+=this.renderer.table(e,i);continue}case"blockquote":{const n=r,s=this.parse(n.tokens);o+=this.renderer.blockquote(s);continue}case"list":{const n=r,s=n.ordered,e=n.start,a=n.loose;let i="";for(let t=0;t<n.items.length;t++){const o=n.items[t],c=o.checked,l=o.task;let e="";if(o.task){const n=this.renderer.checkbox(!!c);a?0<o.tokens.length&&"paragraph"===o.tokens[0].type?(o.tokens[0].text=n+" "+o.tokens[0].text,o.tokens[0].tokens&&0<o.tokens[0].tokens.length&&"text"===o.tokens[0].tokens[0].type&&(o.tokens[0].tokens[0].text=n+" "+o.tokens[0].tokens[0].text)):o.tokens.unshift({type:"text",text:n+" "}):e+=n+" "}e+=this.parse(o.tokens,a),i+=this.renderer.listitem(e,l,!!c)}o+=this.renderer.list(i,s,e);continue}case"html":{const n=r;o+=this.renderer.html(n.text,n.block);continue}case"paragraph":{const n=r;o+=this.renderer.paragraph(this.parseInline(n.tokens));continue}case"text":{let e=r,t=e.tokens?this.parseInline(e.tokens):e.text;for(;i+1<n.length&&"text"===n[i+1].type;)e=n[++i],t+="\n"+(e.tokens?this.parseInline(e.tokens):e.text);o+=s?this.renderer.paragraph(t):t;continue}default:{const n='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return o}parseInline(t,i){i=i||this.renderer;let n="";for(let e=0;e<t.length;e++){var s=t[e];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const t=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=t||"";continue}}switch(s.type){case"escape":{const t=s;n+=i.text(t.text);break}case"html":{const t=s;n+=i.html(t.text);break}case"link":{const t=s;n+=i.link(t.href,t.title,this.parseInline(t.tokens,i));break}case"image":{const t=s;n+=i.image(t.href,t.title,t.text);break}case"strong":{const t=s;n+=i.strong(this.parseInline(t.tokens,i));break}case"em":{const t=s;n+=i.em(this.parseInline(t.tokens,i));break}case"codespan":{const t=s;n+=i.codespan(t.text);break}case"br":n+=i.br();break;case"del":{const t=s;n+=i.del(this.parseInline(t.tokens,i));break}case"text":{const t=s;n+=i.text(t.text);break}default:{const t='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}}class M{options;constructor(e){this.options=e||t.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ce{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(T.lex,L.parse);parseInline=this.#e(T.lexInline,L.parseInline);Parser=L;Renderer=E;TextRenderer=RLine truncated
|
||||
+32
-7
@@ -1,3 +1,29 @@
|
||||
function humanFileSize(bytes, si = false, dp = 1) {
|
||||
const thresh = si ? 1000 : 1024;
|
||||
|
||||
bytes = bytes / 8;
|
||||
|
||||
if (Math.abs(bytes) < thresh) {
|
||||
return bytes + "B";
|
||||
}
|
||||
|
||||
const units = si
|
||||
? ["kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
||||
: ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"];
|
||||
let u = -1;
|
||||
const r = 10 ** dp;
|
||||
|
||||
do {
|
||||
bytes /= thresh;
|
||||
++u;
|
||||
} while (
|
||||
Math.round(Math.abs(bytes) * r) / r >= thresh &&
|
||||
u < units.length - 1
|
||||
);
|
||||
|
||||
return bytes.toFixed(dp) + "" + units[u];
|
||||
}
|
||||
|
||||
function urlRel2abs(url) {
|
||||
/* Only accept commonly trusted protocols:
|
||||
* Only data-image URLs are accepted, Exotic flavours (escaped slash,
|
||||
@@ -110,14 +136,13 @@ function parseGithubUrl(url) {
|
||||
}
|
||||
}
|
||||
|
||||
marked.use(
|
||||
markedEmoji({
|
||||
emojis: githubEmojis,
|
||||
unicode: false,
|
||||
})
|
||||
);
|
||||
|
||||
function renderMD(md, baseUrlValue) {
|
||||
marked.use(
|
||||
markedEmoji({
|
||||
emojis: githubEmojis,
|
||||
unicode: false,
|
||||
})
|
||||
);
|
||||
md = contentAbs2Relative(md);
|
||||
const renderer = new marked.Renderer();
|
||||
|
||||
|
||||
Reference in new issue
Block a user