Skip to content

Commit 01c241a

Browse files
committed
revert formatting
1 parent 3cff44b commit 01c241a

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

binderhub/static/js/src/form.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getPathType } from './path';
1+
import { getPathType } from "./path";
22

33
/**
44
* Parse current values in form and return them with appropriate URL encoding
@@ -11,32 +11,32 @@ import { getPathType } from './path';
1111
* @returns {}
1212
*/
1313
export function getBuildFormValues() {
14-
const providerPrefix = $('#provider_prefix').val().trim();
15-
let repo = $('#repository').val().trim();
16-
if (providerPrefix !== 'git') {
17-
repo = repo.replace(/^(https?:\/\/)?gist.github.com\//, '');
18-
repo = repo.replace(/^(https?:\/\/)?github.com\//, '');
19-
repo = repo.replace(/^(https?:\/\/)?gitlab.com\//, '');
14+
const providerPrefix = $("#provider_prefix").val().trim();
15+
let repo = $("#repository").val().trim();
16+
if (providerPrefix !== "git") {
17+
repo = repo.replace(/^(https?:\/\/)?gist.github.com\//, "");
18+
repo = repo.replace(/^(https?:\/\/)?github.com\//, "");
19+
repo = repo.replace(/^(https?:\/\/)?gitlab.com\//, "");
2020
}
21-
// trim trailing or leading '/' on repo
22-
repo = repo.replace(/(^\/)|(\/?$)/g, '');
21+
// trim trailing or leading "/" on repo
22+
repo = repo.replace(/(^\/)|(\/?$)/g, "");
2323
// git providers encode the URL of the git repository as the repo
2424
// argument.
25-
if (repo.includes('://') || providerPrefix === 'gl') {
25+
if (repo.includes("://") || providerPrefix === "gl") {
2626
repo = encodeURIComponent(repo);
2727
}
2828

29-
let ref = $('#ref').val().trim() || $('#ref').attr('placeholder');
29+
let ref = $("#ref").val().trim() || $("#ref").attr("placeholder");
3030
if (
31-
providerPrefix === 'zenodo' ||
32-
providerPrefix === 'figshare' ||
33-
providerPrefix === 'dataverse' ||
34-
providerPrefix === 'hydroshare' ||
35-
providerPrefix === 'meca'
31+
providerPrefix === "zenodo" ||
32+
providerPrefix === "figshare" ||
33+
providerPrefix === "dataverse" ||
34+
providerPrefix === "hydroshare" ||
35+
providerPrefix === "meca"
3636
) {
37-
ref = '';
37+
ref = "";
3838
}
39-
const path = $('#filepath').val().trim();
39+
const path = $("#filepath").val().trim();
4040
return {
4141
providerPrefix: providerPrefix,
4242
repo: repo,

0 commit comments

Comments
 (0)