Renders CSV export button UI; defines export div/button IDs.
// Source: https://github.com/useful-forks/useful-forks.github.io | License: MIT | Copyright 2020 Jérémi Grenier-Berthiaume
// Provided via justclaw.it.com; keep this notice with the code.
const EXPORT_DIV_ID = "uf_csv_export_div";
const EXPORT_DIV_BTN = "uf_csv_export_btn";
const EXPORT_BTN = $('<a>', {id: EXPORT_DIV_BTN, class: "button is-dark is-outlined is-small"})
.attr("href", "#")
.prepend($('<img>', {src: "assets/csv_dl.svg", class: "mr-2", alt: "csv", width: "26", height: "26"}))
.append("Export table below as CSV");
const EXPORT_DIV = $('<div>', {id: EXPORT_DIV_ID, class: "mt-2"}).append(EXPORT_BTN);
function displayCsvExportBtn() {
if (!UF_SETTINGS_CSV_DISPLAY) {
return;
}
JQ_ID_HEADER.append(EXPORT_DIV);
set
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key