This commit is contained in:
tdurieux
2021-03-16 11:23:16 +01:00
parent 141d016aae
commit a2d0f0b212
475 changed files with 23855 additions and 3869 deletions
+6 -1
View File
@@ -1 +1,6 @@
<h1>404</h1>
<div class="container-fluid main">
<ng-include src="'partials/header.htm'"></ng-include>
<div class="row center">
<div class="container text-center"><h1 class="display-1">404</h1></div>
</div>
</div>
+488
View File
@@ -0,0 +1,488 @@
<div class="container-fluid main">
<ng-include src="'partials/header.htm'"></ng-include>
<div class="row center">
<div
class="col-9 p-2 preview markdown-body"
ng-bind-html="html_readme"
ng-if="html_readme"
></div>
<div class="col shadow overflow-auto h-100 d-flex align-content-end">
<div
class="p-0 py-2 m-auto"
ng-class="{'card': !repoUrl, 'w-50': !repoUrl,'container': repoUrl}"
>
<form
class="form needs-validation"
ng-class="{'card-body': !repoUrl}"
name="anonymize"
novalidate
>
<h5 class="card-title">Annoymize a reposiotry</h5>
<h6 class="card-subtitle mb-2 text-muted">
Fill the information to annoymize! It will only take 5min.
</h6>
<div class="form-group">
<label for="repoUrl">Type the url of your repository</label>
<input
type="text"
class="form-control"
name="repoUrl"
id="repoUrl"
ng-class="{'is-invalid': anonymize.repoUrl.$invalid}"
ng-model="repoUrl"
ng-model-options="{ debounce: {default: 1000, blur: 0, click: 0}, updateOn: 'default blur click' }"
ng-change="repoSelected()"
/>
<div
class="invalid-feedback"
ng-show="anonymize.repoUrl.$error.github"
>
Please provide a valid Github url, e.g.,
https://github.com/owner/repo.
</div>
<div
class="invalid-feedback"
ng-show="anonymize.repoUrl.$error.missing"
>
{{repoUrl}} does not exist or is not accessible
</div>
<div
class="invalid-feedback"
ng-show="anonymize.repoUrl.$error.used"
>
{{repoUrl}} is already anonymized
</div>
</div>
<div class="form-group" ng-hide="repoUrl">
<label for="repositories">Or select one of your repository</label>
<div class="input-group mb-3">
<select
class="form-control"
id="repositories"
name="repositories"
ng-model="repoUrl"
ng-change="repoSelected()"
>
<option selected value="">None</option>
<option
ng-repeat="repo in repositories|orderBy:'full_name'"
value="https://github.com/{{ repo.full_name }}"
ng-bind="repo.full_name"
></option>
</select>
<div class="input-group-append">
<button
class="btn btn-outline-secondary"
ng-click="getRepositories(true)"
title="Refresh!"
data-toggle="tooltip"
data-placement="bottom"
>
<i class="fa fa-undo"></i>
</button>
</div>
</div>
</div>
<div ng-show="repoUrl">
<div class="form-group">
<label for="branch">Branch</label>
<div class="input-group mb-3">
<select
class="form-control"
id="branch"
name="branch"
ng-model="branch"
>
<option
ng-repeat="b in branches"
ng-bind="b.name"
value="{{b.name}}"
></option>
</select>
<div class="input-group-append">
<button
class="btn btn-outline-secondary"
ng-click="getBranches(true)"
title="Refresh!"
data-toggle="tooltip"
data-placement="bottom"
>
<i class="fa fa-undo"></i>
</button>
</div>
</div>
<small class="form-text text-muted"
>The branch to anonymize</small
>
</div>
<div class="form-group">
<label for="commit">Commit</label>
<input
class="form-control"
id="commit"
name="commit"
ng-model="commit"
/>
<small class="form-text text-muted"
>The commit to anonymize</small
>
</div>
<div class="form-group">
<label for="repoId">Anonymize repository id</label>
<input
type="text"
class="form-control"
name="repoId"
id="repoId"
ng-class="{'is-invalid': anonymize.repoId.$invalid}"
ng-model="repoId"
ng-model-options="{ debounce: {default: 1000, blur: 0, click: 0}, updateOn: 'default blur click' }"
/>
<small id="idHelp" class="form-text text-muted"
>Id used in the url:
https://anonymous.4open.science/r/{{repoId}}</small
>
<div
class="invalid-feedback"
ng-show="anonymize.repoId.$error.format"
>
Repository id can only contain letters and numbers
</div>
<div
class="invalid-feedback"
ng-show="anonymize.repoId.$error.used"
>
{{repoId}} is already used
</div>
</div>
<div class="form-group">
<label for="terms">Terms to anonymize</label>
<textarea
class="form-control"
id="terms"
name="terms"
rows="3"
ng-model="terms"
ng-model-options="{ debounce: 250 }"
></textarea>
<small id="termsHelp" class="form-text text-muted"
>One term per line. Each term will be replaced by XXX</small
>
<div
class="invalid-feedback"
ng-show="anonymize.terms.$error.format"
>
Terms are in an invalid format
</div>
</div>
<div class="accordion mb-3" id="options">
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button
class="btn btn-block text-left"
type="button"
data-toggle="collapse"
data-target="#collapseOne"
aria-expanded="true"
aria-controls="collapseOne"
>
Rendering options
</button>
</h2>
</div>
<div
id="collapseOne"
class="collapse show"
aria-labelledby="headingOne"
data-parent="#options"
>
<div class="card-body">
<div class="form-group">
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="link"
name="link"
ng-model="options.link"
/>
<label class="form-check-label" for="link"
>Keep links</label
>
<small id="termsHelp" class="form-text text-muted"
>Keep or remove all the links.</small
>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="image"
name="image"
ng-model="options.image"
/>
<label class="form-check-label" for="image"
>Display images</label
>
<small id="termsHelp" class="form-text text-muted"
>Images are not anonymized</small
>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="pdf"
name="pdf"
ng-model="options.pdf"
/>
<label class="form-check-label" for="pdf"
>Display PDFs</label
>
<small id="termsHelp" class="form-text text-muted"
>PDF are not anonymized</small
>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="notebook"
name="notebook"
ng-model="options.notebook"
/>
<label class="form-check-label" for="notebook"
>Display Notebooks</label
>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingTwo">
<h2 class="mb-0">
<button
class="btn btn-block text-left collapsed"
type="button"
data-toggle="collapse"
data-target="#collapseTwo"
aria-expanded="false"
aria-controls="collapseTwo"
>
Features
</button>
</h2>
</div>
<div
id="collapseTwo"
class="collapse"
aria-labelledby="headingTwo"
data-parent="#options"
>
<div class="card-body">
<div class="form-group">
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="page"
name="page"
ng-model="options.page"
ng-disabled="!details.has_pages"
/>
<label class="form-check-label" for="page"
>Github page</label
>
<small id="termsHelp" class="form-text text-muted"
>Enable anonymized Github pages. It will be available
at https://anonymous.4open.science/w/{{repoId}}</small
>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="loc"
name="loc"
ng-model="options.loc"
/>
<label class="form-check-label" for="page"
>Line of code</label
>
<small id="termsHelp" class="form-text text-muted"
>Display the number of line of code in the
reposiotry</small
>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingThree">
<h2 class="mb-0">
<button
class="btn btn-block text-left collapsed"
type="button"
data-toggle="collapse"
data-target="#collapseThree"
aria-expanded="false"
aria-controls="collapseThree"
>
Expiration
</button>
</h2>
</div>
<div
id="collapseThree"
class="collapse"
aria-labelledby="headingThree"
data-parent="#options"
>
<div class="card-body">
<div class="form-group">
<label for="expiration">Expiration options</label>
<select
class="form-control"
id="expiration"
name="expiration"
ng-model="options.expirationMode"
>
<option value="never" selected>Never expire</option>
<option value="redirect">Redirect to GitHub</option>
<option value="remove"
>Remove anonymized repository</option
>
</select>
<small class="form-text text-muted"
>Define the expiration strategy for the
repository.</small
>
</div>
<div
class="form-group"
id="expiration-date-form"
ng-hide="options.expirationMode=='never'"
>
<label for="expirationDate">Expiration date</label>
<input
class="form-control .form-control-lg"
type="date"
name="expirationDate"
id="expirationDate"
ng-model="options.expirationDate"
/>
<small
class="form-text text-muted"
ng-show="options.expirationMode=='remove'"
>The date when the anonymized repository will be
removed.</small
>
<small
class="form-text text-muted"
ng-show="options.expirationMode=='redirect'"
>The date when the anonymized repository will be
redirected.</small
>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header" id="headingFour">
<h2 class="mb-0">
<button
class="btn btn-block text-left collapsed"
type="button"
data-toggle="collapse"
data-target="#headingFour"
aria-expanded="false"
aria-controls="headingFour"
>
Advance options
</button>
</h2>
</div>
<div
id="headingFour"
class="collapse"
aria-labelledby="headingThree"
data-parent="#options"
>
<div class="card-body">
<div class="form-group">
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
id="update"
name="update"
ng-model="options.update"
/>
<label class="form-check-label" for="update"
>Auto update</label
>
<small id="termsHelp" class="form-text text-muted"
>Automatically update the anonymized repository with
the latest commit of the repository. The repository is
updated once per hour maximum.</small
>
</div>
</div>
<div class="form-group">
<label for="mode">Proxy mode</label>
<select
class="form-control"
id="mode"
name="mode"
ng-model="options.mode"
>
<option value="stream" selected>Stream</option>
<option value="download">Download</option>
</select>
<small class="form-text text-muted"
>How the repository will be anonymized. Stream mode will
request the content on the flight. This is the only
option for repositories bigger than 10mb. Download will
download the repository the repository on the
anonymous.4open.science server, it is faster and offer
more features.</small
>
</div>
</div>
</div>
</div>
</div>
</div>
<button
id="submit"
type="submit"
class="btn btn-primary"
ng-click="anonymizeRepo($event)"
ng-show="repoUrl"
ng-if="!isUpdate"
>
Annoymize
</button>
<button
id="submit"
type="submit"
class="btn btn-primary"
ng-click="updateRepo($event)"
ng-show="repoUrl"
ng-if="isUpdate"
>
Update
</button>
</form>
</div>
</div>
</div>
</div>
+60
View File
@@ -0,0 +1,60 @@
<div class="container-fluid main">
<ng-include src="'partials/header.htm'"></ng-include>
<div class="row center">
<div class="col shadow overflow-auto h-100 d-flex ">
<div class="card w-50 m-auto">
<form
class="form needs-validation card-body"
name="claimForm"
novalidate
>
<h5 class="card-title">Claim an annoymized reposiotry</h5>
<h6 class="card-subtitle mb-2 text-muted">
Claim the ownership of an exisiting annoymized reposiotry.
</h6>
<div class="form-row">
<div class="col form-group">
<label for="repoUrl">Type the url of your repository</label>
<input
type="text"
class="form-control"
name="repoUrl"
id="repoUrl"
required
ng-class="{'is-invalid': claimForm.repoUrl.$invalid}"
ng-model="repoUrl"
/>
<div class="invalid-feedback"
ng-show="claimForm.repoUrl.$error.not_found">The repository is not found.</div>
</div>
</div>
<div class="form-group">
<label for="repoId">Anonymize repository id</label>
<input
type="text"
class="form-control"
name="repoId"
id="repoId"
required
ng-model="repoId"
ng-class="{'is-invalid': claimForm.repoId.$invalid}"
/>
<small id="idHelp" class="form-text text-muted"
>The id is in the repository
https://anonymous.4open.science/r/{id}</small
>
</div>
<button
id="submit"
type="submit"
class="btn btn-primary"
ng-click="claim()"
>
Claim
</button>
</form>
</div>
</div>
</div>
</div>
+188
View File
@@ -0,0 +1,188 @@
<div class="container-fluid main">
<ng-include src="'partials/header.htm'"></ng-include>
<div class="row center">
<div class="leftCol shadow p-1 h-100 overflow-auto">
<h3>Filters</h3>
<h5>Status</h5>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
ng-model="filters.status.ready"
id="ready"
/>
<label class="form-check-label" for="ready"> Ready </label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
ng-model="filters.status.expired"
id="expired"
/>
<label class="form-check-label" for="expired"> Expired </label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
ng-model="filters.status.removed"
id="removed"
/>
<label class="form-check-label" for="removed"> Removed </label>
</div>
</div>
<div class="col h-100 overflow-auto">
<div class="row">
<div class="col p-2">
<form>
<div class="form-row">
<div class="col">
<input
type="search"
class="form-control"
id="search"
placeholder="Search repository..."
ng-model="search"
/>
</div>
<div class="col">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text" for="Order">Order</label>
</div>
<select class="custom-select" ng-model="orderBy">
<option value="repoId">Repository ID</option>
<option value="fullName">Repository</option>
<option value="-anonymizeDate">Anonymize Date</option>
<option value="-status">Status</option>
<option value="-lastView">Last View</option>
<option value="-pageView">Page View</option>
</select>
</div>
</div>
<div class="col text-right">
<a
class="btn btn-secondary"
href="/claim"
title="Claim the ownership of an existing anonymized repository."
data-toggle="tooltip"
data-placement="bottom"
>
Claim repository
</a>
<a class="btn btn-primary" href="/anonymize">
Annoymize repository
</a>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col p-2">
<table class="table repositories">
<thead class="thead-light">
<tr>
<th scope="col">#</th>
<th scope="col">Repository ID</th>
<th scope="col">Anonymized repository</th>
<th scope="col">Branch</th>
<!-- <th scope="col">Commit</th> -->
<th scope="col" class="text-center"># Terms</th>
<th scope="col" class="text-center">Status</th>
<th scope="col" class="text-center">Anonymize date</th>
<th scope="col" class="text-center"># Views</th>
<th scope="col" class="text-center">Last view</th>
<th scope="col" class="text-right">Actions</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat="repo in repositories| filter:repoFiler| orderBy:orderBy"
>
<th scope="row">{{$index + 1}}</th>
<td>
<a href="/r/{{repo.repoId}}" target="__self"
>{{repo.repoId}}</a
>
</td>
<td>
<a href="https://github.com/{{repo.fullName}}"
>{{repo.fullName}}</a
>
</td>
<td>{{repo.branch}}</td>
<!-- <td>{{repo.commit.substring(0, 6)}}</td> -->
<td class="text-center">{{repo.terms.length}}</td>
<td class="text-center">{{repo.status}}</td>
<td class="text-center">{{repo.anonymizeDate | date}}</td>
<td class="text-center">{{repo.pageView}}</td>
<td class="text-center">{{repo.lastView | date}}</td>
<td class="text-right">
<div class="dropdown">
<button
class="btn btn-secondary dropdown-toggle"
type="button"
id="dropdownMenuButton"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
Actions
</button>
<div
class="dropdown-menu"
aria-labelledby="dropdownMenuButton"
>
<a
class="dropdown-item"
href="/anonymize/{{repo.repoId}}"
target="_self"
>Edit</a
>
<a
class="dropdown-item"
href="#"
ng-show="repo.status == 'ready'"
ng-click="updateRepository(repo)"
>Force update</a
>
<a
class="dropdown-item"
href="#"
ng-show="repo.status == 'removed'"
ng-click="updateRepository(repo)"
>Enable</a
>
<a
class="dropdown-item"
href="#"
ng-show="repo.status != 'removed'"
ng-click="removeRepository(repo)"
>Remove</a
>
<a
class="dropdown-item"
href="/r/{{repo.repoId}}"
target="_self"
>View</a
>
<a
class="dropdown-item"
href="/w/{{repo.repoId}}"
target="_self"
ng-if="repo.options.page"
>View GitHub Page</a
>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
+9 -3
View File
@@ -1,4 +1,10 @@
<pre ng-if="type == 'text'" ng-bind="content" class="file-content"></pre>
<div ng-if="type == 'html'" ng-bind-html="content" class="file-content"></div>
<pre ng-if="type == 'code'"><code class="hljs" ng-bind="content"></code></pre>
<div ng-if="type == 'text'" ng-model="content" ui-ace="aceOption"></div>
<div ng-if="type == 'html'" ng-bind-html="content" class="file-content markdown-body"></div>
<div ng-if="type == 'code'" ui-ace="aceOption" ng-model="content"></div>
<img ng-if="type == 'image'" class="image-content" ng-src="{{url}}"></img>
<div class="h-100 overflow-auto" ng-if="type == 'pdf'">
<pdfviewer class="h-100 overflow-auto" src="{{url}}" id="viewer"></pdfviewer>
</div>
<div ng-if="type == 'IPython'"><notebook file="url"></notebook></div>
<div ng-if="type == 'error'" class="file-error" ng-bind="content"></div>
<div ng-if="content == null" class="file-error">Empty file!</div>
+187
View File
@@ -0,0 +1,187 @@
<div class="container-fluid main">
<ng-include src="'partials/header.htm'"></ng-include>
<div class="row center">
<div class="container px-md-3 px-sm-0">
<section
class="accordion-section clearfix mt-3"
aria-label="Question Accordions"
>
<div class="container">
<h2>Frequently Asked Questions</h2>
<div
class="panel-group"
id="accordion"
role="tablist"
aria-multiselectable="true"
>
<div class="panel panel-default">
<div class="panel-heading p-3 mb-3" role="tab" id="heading0">
<h3 class="panel-title">
<a
class="collapsed"
role="button"
title=""
data-toggle="collapse"
data-parent="#accordion"
href="#collapse0"
aria-expanded="true"
aria-controls="collapse0"
>
Can I download the repository?
</a>
</h3>
</div>
<div
id="collapse0"
class="panel-collapse collapse"
role="tabpanel"
aria-labelledby="heading0"
>
<div class="panel-body px-3 mb-4">
<p>
It is currently not possible to download an anonymized
repository. It is technically possible to implement but
would require much more processing and storage. I am
currently not able to provide this option due to the
increase cost.
</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading p-3 mb-3" role="tab" id="heading1">
<h3 class="panel-title">
<a
class="collapsed"
role="button"
title=""
data-toggle="collapse"
data-parent="#accordion"
href="#collapse1"
aria-expanded="true"
aria-controls="collapse1"
>
Which file formats are supported?
</a>
</h3>
</div>
<div
id="collapse1"
class="panel-collapse collapse"
role="tabpanel"
aria-labelledby="heading1"
>
<div class="panel-body px-3 mb-4">
<p>
Anonymous Github is able to display pure textual files, such as text or source code. It can also render images, PDFs, and notbooks.
However, only textual based files are anonymized. Anonymous Github considers the following file format as textual:
</p>
<p>
<ul>
<li ng-repeat="format in supportedFileTypes" ng-bind="format"></li>
</ul>
</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading p-3 mb-3" role="tab" id="heading2">
<h3 class="panel-title">
<a
class="collapsed"
role="button"
title=""
data-toggle="collapse"
data-parent="#accordion"
href="#collapse2"
aria-expanded="true"
aria-controls="collapse2"
>
How much is cost?
</a>
</h3>
</div>
<div
id="collapse2"
class="panel-collapse collapse"
role="tabpanel"
aria-labelledby="heading2"
>
<div class="panel-body px-3 mb-4">
<p>
Anonymous Github is free to use, however the server costs me hundreds of dollars per year, a small donation to cover to cost is largely appricated.
</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading p-3 mb-3" role="tab" id="heading3">
<h3 class="panel-title">
<a
class="collapsed"
role="button"
title=""
data-toggle="collapse"
data-parent="#accordion"
href="#collapse3"
aria-expanded="true"
aria-controls="collapse3"
>
Data privacy?
</a>
</h3>
</div>
<div
id="collapse3"
class="panel-collapse collapse"
role="tabpanel"
aria-labelledby="heading3"
>
<div class="panel-body px-3 mb-4">
<p>
The data stored on Anonymous Github are never used or shared in any cases.
When a repository is removed or expired only the configuration of the repository is conserved to be able to restore easily the reposiotry and to ensure that no future repository will use the same repository id.
</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading p-3 mb-3" role="tab" id="heading4">
<h3 class="panel-title">
<a
class="collapsed"
role="button"
title=""
data-toggle="collapse"
data-parent="#accordion"
href="#collapse4"
aria-expanded="true"
aria-controls="collapse4"
>
Privacy of the viewer?
</a>
</h3>
</div>
<div
id="collapse4"
class="panel-collapse collapse"
role="tabpanel"
aria-labelledby="heading4"
>
<div class="panel-body px-3 mb-4">
<p>
No information is collected on the viewer of the repositories.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
+106
View File
@@ -0,0 +1,106 @@
<div class="row top navbar navbar-expand-lg navbar-dark">
<div class="container-fluid">
<div class=""><a class="navbar-brand" href="">Anonymous GitHub</a></div>
<div class="col">
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbar"
aria-controls="navbar"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav mr-auto smooth-scroll">
<li class="nav-item" ng-if="!user">
<a class="nav-link" ng-class="{'active': path == '/'}" href="/">
Home
</a>
</li>
<li class="nav-item" ng-if="user">
<a
class="nav-link"
ng-class="{'active': path == '/dashboard'}"
href="/dashboard"
>
Home
</a>
</li>
<li class="nav-item" ng-if="user">
<a
class="nav-link"
ng-class="{'active':path == '/anonymize'}"
href="/anonymize"
>Annoymize</a
>
</li>
<li class="nav-item">
<a class="nav-link" ng-class="{'active':path == '/faq'}" href="/faq"
>FAQ</a
>
</li>
<li class="nav-item">
<a
class="nav-link"
target="_blank"
href="https://github.com/tdurieux/anonymous_github/issues/new"
data-offset="30"
>Report an issue
</a>
</li>
<li class="nav-item" ng-if="!user">
<a
class="nav-link"
target="_self"
href="/github/login"
data-offset="30"
>Login
</a>
</li>
<li class="nav-item">
<a
class="nav-link nav-icon"
target="_blank"
href="https://github.com/tdurieux/anonymous_github/"
data-offset="30"
><i class="fa fa-github" aria-hidden="true"></i
></a>
</li>
<li class="nav-item dropdown" ng-if="user">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbarDropdownMenuLink"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<!-- <img
height="30"
class="d-inline-block align-middle"
src="{{user.photo}}"
ng-if="user.photo"
data-offset="30"
/> -->
{{user.username}}
<!-- <span ng-bind="user.username"></span> -->
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<!-- <a class="dropdown-item" href="/profile">My Profile</a> -->
<a class="dropdown-item" href="/dashboard">Projects</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="/api/user/logout" target="__self"
>Logout</a
>
</div>
</li>
</ul>
<ul class="navbar-nav"></ul>
</div>
</div>
</div>
</div>
+104 -313
View File
@@ -1,53 +1,8 @@
<!-- Main navigation -->
<header class="d-flex">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark fixed-top scrolling-navbar">
<div class="container">
<a class="navbar-brand" href="#">Anonymous GitHub</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarTogglerDemo02"
aria-controls="navbarTogglerDemo02"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mr-auto smooth-scroll">
<li class="nav-item">
<a class="nav-link" href="#home"
>Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#usage" data-offset="90">Usage</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#features" data-offset="90">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#about" data-offset="90">About</a>
</li>
<li class="nav-item">
<a
class="nav-link nav-icon"
href="https://github.com/tdurieux/anonymous_github/"
data-offset="30"
><i class="fa fa-github" aria-hidden="true"></i
></a>
</li>
<li class="nav-link">{{user.username}}</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<ng-include src="'partials/header.htm'"></ng-include>
<div
id="home"
class="view rgba-gradient d-flex align-self-stretch justify-content-center align-items-center"
class="row view rgba-gradient d-flex align-self-stretch justify-content-center align-items-center"
>
<!-- Content -->
<div class="container px-md-3 px-sm-0">
@@ -63,290 +18,126 @@
<h4 class="subtext-header mt-2 mb-4">
Double-blind your repository in 5 min!
</h4>
<input
id="url_input"
type="text"
placeholder="Repository URL..."
name="githubRepository"
class="white_border"
value=""
/>
or
<span ng-if="!user">
<a href="github/login" class="white_border">Login to GitHub</a>
<a href="/github/login" target="_self" class="p-2 white_border"
>Login with GitHub to anonymize</a
>
</span>
<span ng-if="user">
<a href="/myrepo" class="white_border">List my repositories</a>
</span>
or
<button id="edit-button" class="white_border">
Edit your existing repository
</button>
</div>
<!--Grid column-->
</div>
<div class="row add_form">
<div class="col-md-12 mb-4 white-text fadeIn">
<div class="alert alert-danger" role="alert">
The repository has to be public,
<a href="github/login">login to GitHub</a> for private
repositories!
</div>
</div>
<div class="col-md-12 mb-4 white-text fadeIn">
<div class="form-group">
<label for="ignoredTerms"
>The text to remove from the repository will be replaced by
XXX.</label
>
<small id="ignoredTermsHelp" class="form-text text-muted"
>One term per line (case insensitive).</small
>
<textarea
class="form-control .form-control-lg"
name="terms"
id="ignoredTerms"
rows="5"
></textarea>
</div>
<div class="form-group">
<label for="expiration">Expiration options</label>
<select class="form-control" id="expiration" name="expiration">
<option value="never">Never</option>
<option value="redirect"
>Redirect to the GitHub repository</option
>
<option value="remove">Remove anonymized repository</option>
</select>
</div>
<div
class="form-group"
id="expiration-date-form"
style="display: none;"
>
<label for="date">Expiration date.</label>
<small class="form-text text-muted"
>When the anonymous repository.</small
>
<input
class="form-control .form-control-lg"
type="date"
name="expiration_date"
id="date"
value=""
/>
</div>
<button id="submit" type="submit" class="white_border">
Submit</button
>`
<button id="delete" class="white_border" style="color: red;">
Delete</button
>`
</div>
</div>
</form>
<form class="row edit_form" style="display: none;">
<h2>Edit Anonymized Repository</h2>
<div class="col-md-12 mb-4 white-text fadeIn">
<div class="form-group">
<label>Repository ID</label>
<input
class="form-control .form-control-lg"
type="text"
name="id"
id="id"
/>
</div>
<div class="form-group">
<label>Repository URL</label>
<input
class="form-control .form-control-lg"
type="url"
name="githubRepository"
id="url"
value=""
/>
</div>
<button type="submit" class="white_border">Submit</button>
<button id="edit_cancel" type="submit" class="white_border">
Cancel</button
>`
</div>
</form>
<!--Grid row-->
</div>
<!-- Content -->
</div>
</header>
<main>
<div class="container">
<!--Grid row-->
<div class="row py-5">
<div class="col-md-12">
<h2 id="usage">Usage</h2>
<div class="card-text mb-auto">
<ol>
<li>
Fill the Github repo URL
</li>
<li>
Complete the list of terms that will be anonymized.
<span class="text-muted"
>The anonymization of the content is done by replacing all
occurrences of words in a list by "XXX".The word list typically
contains the institution name, author names, logins,
etc...</span
>
</li>
<li>
Define if you want an expiration date for your anonymized
repository. You can keep it for ever, remove the repository after
a specific date or redirect the user to the GitHub repository.
</li>
</ol>
As result, a unique url is created with the content of your
repository, for example,
<a
href="http://anonymous.4open.science/repository/840c8c57-3c32-451e-bf12-0e20be300389/"
>http://anonymous.4open.science/repository/840c8c57-3c32-451e-bf12-0e20be300389/</a
>.
</div>
</div>
<!--Grid column-->
<div class="col-md-12">
<h2 id="features">Features</h2>
</div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Anonymized</h3>
<p class="card-text mb-auto">
Anonymous GitHub Anonymizes the content of the repository but also
hide the issues, pull-requests, history. This way you are sure
that your repository stays anonymized.
</p>
<main>
<div class="container">
<!--Grid row-->
<div class="row py-5">
<div class="col-md-12">
<h2 id="usage">Usage</h2>
<div class="card-text mb-auto">
<ol>
<li>
<a href="/github/login">Login</a> with Github access your
dashboard and anonymize your repositories.
</li>
<li>Complete the list of terms that will be anonymized.</li>
<li>Anonymize and share your link in your double-blind paper.</li>
</ol>
Example of an annoymized repository:
<a
href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"
>https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/</a
>.
</div>
</div>
</div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Always up-to-date</h3>
<p class="card-text mb-auto">
Anonymous GitHub follows to track of the changes on your
repository and updates the anonymous version automatically.
</p>
<!--Grid column-->
<div class="col-md-12"><h2 id="features">Features</h2></div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Easy</h3>
<p class="card-text mb-auto">
In three clicks, you anonymize your repository. It makes it an
easy and quick step to do before the submission of paper.
</p>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Fast</h3>
<p class="card-text mb-auto">
With Anonymous GitHub, it requires only 5min to anonymize your
repository. No more time lost to create a anonymized version of
your repository.
</p>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Always up-to-date</h3>
<p class="card-text mb-auto">
Anonymous GitHub tracks the changes on your repository and
updates the anonymous version automatically.
</p>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Open-source</h3>
<p class="card-text mb-auto">
Anonymous GitHub is open-source, you can easily deploy it for your
conference and simplify the life of your authors.
</p>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Support many file formats</h3>
<p class="card-text mb-auto">
Anonymous GitHub renders mainly file, from source code to
images, notebook or PDF.
</p>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<h2 id="about">Metrics</h2>
</div>
<div class="col-md-12">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-auto text-center">2609 Anonymized Repositories</h3>
<p class="card-text mb-auto">
<strong></strong>
</p>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-0">Open-source</h3>
<p class="card-text mb-auto">
Anonymous GitHub is open-source
<a
class="nav-icon"
target="_blank"
href="https://github.com/tdurieux/anonymous_github/"
data-offset="30"
><i class="fa fa-github" aria-hidden="true"></i></a
>, you can easily deploy it for your conference and simplify the
life of your authors.
</p>
</div>
</div>
</div>
<div class="col-md-12"><h2 id="about">Metrics</h2></div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-auto text-center">
{{stat.nbRepositories}} Anonymized Repositories
</h3>
</div>
</div>
</div>
<div class="col-md-6">
<div
class="row no-gutters border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"
>
<div class="col p-4 d-flex flex-column position-static">
<h3 class="mb-auto text-center">{{stat.nbUsers}} Users</h3>
</div>
</div>
</div>
<!--Grid column-->
</div>
<!--Grid column-->
<!--Grid row-->
</div>
<!--Grid row-->
</div>
</main>
<script>
if ($("#url_input")[0].value != "") {
$(".view").addClass("active");
}
$("#url_input").on("focus", (e) => {
$(".view").addClass("active");
});
if ($("#expiration")[0].value == "never") {
$("#expiration-date-form").hide();
} else {
$("#expiration-date-form").show();
}
$("#expiration").change((e) => {
value = e.currentTarget.value;
if (value == "never") {
$("#expiration-date-form").hide();
} else {
$("#expiration-date-form").show();
}
});
if ($(document).scrollTop() < 35) {
$(".navbar").removeClass("top-nav-collapse");
} else {
$(".navbar").addClass("top-nav-collapse");
}
$(document).scroll((e) => {
if ($(document).scrollTop() < 35) {
$(".navbar").removeClass("top-nav-collapse");
} else {
$(".navbar").addClass("top-nav-collapse");
}
});
$("#edit_cancel").on("click", (e) => {
e.preventDefault();
$(".edit_form").hide();
$(".main-options").show();
return false;
});
$("#delete").on("click", (e) => {
e.preventDefault();
if (confirm("Are you sure you want to delete the repository?")) {
$("#expiration")[0].value = "remove";
var date = new Date();
date.setDate(date.getDate() - 1);
$("#date")[0].value = date.toISOString().split("T")[0];
$("#submit").click();
}
return false;
});
$("#edit-button").on("click", (e) => {
e.preventDefault();
$(".view").removeClass("active");
$(".edit_form").show();
$(".main-options").hide();
$("#id").focus();
return false;
});
</script>
</main>
</div>
+4
View File
@@ -0,0 +1,4 @@
<div class="container d-flex h-100">
<h1 class="display-1 m-auto" ng-if="!error">Loading...</h1>
<h1 class="display-1 m-auto" ng-if="error" ng-bind="error"></h1>
</div>
-23
View File
@@ -1,23 +0,0 @@
<div class="container" style="margin-top: 70px;">
<div class="list-group">
<div
class="list-group-item list-group-item-action"
ng-repeat="repo in repos"
>
<div class="d-flex mb-12 justify-content-between">
<h5 class="mb-1">{{ repo.full_name }}</h5>
<small>
{{ repo.private? "Private": "Public" }}
</small>
</div>
<p class="mb-1" ng-if="repo.description">{{ repo.description }}</p>
<div class="mb-1">
<a
class="btn btn-primary anonymize-btn"
href="/?githubRepository=https://github.com/{{ repo.full_name }}&id={{ repo.uuid }}"
>Anonymize</a
>
</div>
</div>
</div>
</div>