Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS: Ensure all variables are camelCased #1782

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions binderhub/static/js/src/loading.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* List of help messages we will cycle through randomly in the loading page
*/
const help_messages = [
const helpMessages = [
'New to Binder? Check out the <a target="_blank" href="https://mybinder.readthedocs.io/en/latest/">Binder Documentation</a> for more information.',
'You can learn more about building your own Binder repositories in <a target="_blank" href="https://docs.mybinder.org">the Binder community documentation</a>.',
'We use the <a target="_blank" href="https://repo2docker.readthedocs.io/">repo2docker</a> tool to automatically build the environment in which to run your code.',
Expand All @@ -26,7 +26,7 @@ export function nextHelpText() {
if (text !== null) {
if (!text.hasClass("longLaunch")) {
// Pick a random help message and update
msg = help_messages[Math.floor(Math.random() * help_messages.length)];
msg = helpMessages[Math.floor(Math.random() * helpMessages.length)];
} else {
msg =
"Your session is taking longer than usual to start!<br />Check the log messages below to see what is happening.";
Expand Down
12 changes: 5 additions & 7 deletions binderhub/static/js/src/repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ let configDict = {};
function setLabels() {
const provider = $("#provider_prefix").val();
const text = configDict[provider]["text"];
const tag_text = configDict[provider]["tag_text"];
const ref_prop_disabled = configDict[provider]["ref_prop_disabled"];
const label_prop_disabled = configDict[provider]["label_prop_disabled"];
const tagText = configDict[provider]["tag_text"];
const refPropDisabled = configDict[provider]["ref_prop_disabled"];
const labelPropDisabled = configDict[provider]["label_prop_disabled"];
const placeholder = "HEAD";

$("#ref")
.attr("placeholder", placeholder)
.prop("disabled", ref_prop_disabled);
$("label[for=ref]").text(tag_text).prop("disabled", label_prop_disabled);
$("#ref").attr("placeholder", placeholder).prop("disabled", refPropDisabled);
$("label[for=ref]").text(tagText).prop("disabled", labelPropDisabled);
$("#repository").attr("placeholder", text);
$("label[for=repository]").text(text);
}
Expand Down