Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Human-readable timestamps for project histories
docReady(() => {
timeAgo();
});
// toggle search panel behavior
docReady(() => {
if (document.querySelector(".-js-add-filter")) searchFilterToggle();
});
// Kick off the client side HTML includes.
docReady(HTMLInclude);
// Trigger our analytics code.
docReady(Analytics);
// Handle the JS based automatic form submission.
docReady(formUtils.submitTriggers);
docReady(formUtils.registerFormValidation);
docReady(Statuspage);
// Copy handler for copy tooltips, e.g.
// - the pip command on package detail page
// - the copy hash on package detail page
// - the copy hash on release maintainers page
docReady(() => {
let setCopiedTooltip = (e) => {
e.trigger.setAttribute("data-tooltip-label", "Copied!");
e.trigger.setAttribute("role", "alert");
e.clearSelection();
};
// Bind the dropdowns when the page is ready
docReady(bindDropdowns);
// Get modal keypress event listeners ready
docReady(BindModalKeys);
// Get filter pane keypress event listeners ready
docReady(BindFilterKeys);
// Get WebAuthn compatibility checks ready
docReady(GuardWebAuthn);
// Get WebAuthn provisioning ready
docReady(ProvisionWebAuthn);
// Get WebAuthn authentication ready
docReady(AuthenticateWebAuthn);
docReady(() => {
const tokenSelect = document.getElementById("token_scope");
if (tokenSelect === null) {
return;
}
tokenSelect.addEventListener("change", () => {
const tokenScopeWarning = document.getElementById("api-token-scope-warning");
if (tokenScopeWarning === null) {
return;
}
// toggle search panel behavior
docReady(() => {
if (document.querySelector(".-js-add-filter")) searchFilterToggle();
});
// Kick off the client side HTML includes.
docReady(HTMLInclude);
// Trigger our analytics code.
docReady(Analytics);
// Handle the JS based automatic form submission.
docReady(formUtils.submitTriggers);
docReady(formUtils.registerFormValidation);
docReady(Statuspage);
// Copy handler for copy tooltips, e.g.
// - the pip command on package detail page
// - the copy hash on package detail page
// - the copy hash on release maintainers page
docReady(() => {
let setCopiedTooltip = (e) => {
e.trigger.setAttribute("data-tooltip-label", "Copied!");
e.trigger.setAttribute("role", "alert");
e.clearSelection();
};
new Clipboard(".copy-tooltip").on("success", setCopiedTooltip);
let setOriginalLabel = (element) => {
element.setAttribute("data-tooltip-label", "Copy to clipboard");
trigger.dataset.dropdownBound = true;
}
}
};
// Bind the dropdowns when the page is ready
docReady(bindDropdowns);
// Get modal keypress event listeners ready
docReady(BindModalKeys);
// Get filter pane keypress event listeners ready
docReady(BindFilterKeys);
// Get WebAuthn compatibility checks ready
docReady(GuardWebAuthn);
// Get WebAuthn provisioning ready
docReady(ProvisionWebAuthn);
// Get WebAuthn authentication ready
docReady(AuthenticateWebAuthn);
docReady(() => {
const tokenSelect = document.getElementById("token_scope");
if (tokenSelect === null) {
return;
}
tokenSelect.addEventListener("change", () => {
const tokenScopeWarning = document.getElementById("api-token-scope-warning");
closeDropdown();
}
});
// Set the 'data-dropdownBound' attribute so we don't bind multiple
// handlers to the same trigger after the client-side-includes load
trigger.dataset.dropdownBound = true;
}
}
};
// Bind the dropdowns when the page is ready
docReady(bindDropdowns);
// Get modal keypress event listeners ready
docReady(BindModalKeys);
// Get filter pane keypress event listeners ready
docReady(BindFilterKeys);
// Get WebAuthn compatibility checks ready
docReady(GuardWebAuthn);
// Get WebAuthn provisioning ready
docReady(ProvisionWebAuthn);
// Get WebAuthn authentication ready
docReady(AuthenticateWebAuthn);
docReady(() => {
const tokenSelect = document.getElementById("token_scope");
document.getElementById("sticky-notifications").appendChild(warning_div);
}
});
// Human-readable timestamps for project histories
docReady(() => {
timeAgo();
});
// toggle search panel behavior
docReady(() => {
if (document.querySelector(".-js-add-filter")) searchFilterToggle();
});
// Kick off the client side HTML includes.
docReady(HTMLInclude);
// Trigger our analytics code.
docReady(Analytics);
// Handle the JS based automatic form submission.
docReady(formUtils.submitTriggers);
docReady(formUtils.registerFormValidation);
docReady(Statuspage);
// Copy handler for copy tooltips, e.g.
// - the pip command on package detail page
// - the copy hash on package detail page
// - the copy hash on release maintainers page
docReady(() => {
let setCopiedTooltip = (e) => {
// Set the 'data-dropdownBound' attribute so we don't bind multiple
// handlers to the same trigger after the client-side-includes load
trigger.dataset.dropdownBound = true;
}
}
};
// Bind the dropdowns when the page is ready
docReady(bindDropdowns);
// Get modal keypress event listeners ready
docReady(BindModalKeys);
// Get filter pane keypress event listeners ready
docReady(BindFilterKeys);
// Get WebAuthn compatibility checks ready
docReady(GuardWebAuthn);
// Get WebAuthn provisioning ready
docReady(ProvisionWebAuthn);
// Get WebAuthn authentication ready
docReady(AuthenticateWebAuthn);
docReady(() => {
const tokenSelect = document.getElementById("token_scope");
if (tokenSelect === null) {
return;
}
// Close the dropdown if the user presses the escape key
document.addEventListener("keydown", function(event) {
if (event.key === "Escape") {
closeDropdown();
}
});
// Set the 'data-dropdownBound' attribute so we don't bind multiple
// handlers to the same trigger after the client-side-includes load
trigger.dataset.dropdownBound = true;
}
}
};
// Bind the dropdowns when the page is ready
docReady(bindDropdowns);
// Get modal keypress event listeners ready
docReady(BindModalKeys);
// Get filter pane keypress event listeners ready
docReady(BindFilterKeys);
// Get WebAuthn compatibility checks ready
docReady(GuardWebAuthn);
// Get WebAuthn provisioning ready
docReady(ProvisionWebAuthn);
// Get WebAuthn authentication ready
docReady(AuthenticateWebAuthn);