Spaces:
Running
Running
Commit ·
386bfc2
1
Parent(s): 90814e3
Add copy button to citation field
Browse filesFiles changed (3)
- assets/app.js+42
- assets/style.css+12
- index.html+5-2
372 unmodified lines373374375376377378379380381382383372 unmodified lines});}// ---- start ----function start() {readHash();initTabs();initCite();initTheme();fetch('data/meta.json', { cache: 'no-cache' }).then(function (response) {372 unmodified lines373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425372 unmodified lines});}// ---- "Copy" button of the BibTeX entry ----// The Space runs inside an iframe on huggingface.co, where navigator.clipboard can be blocked:// fall back to selecting the text and document.execCommand('copy').function copyText(text) {function fallback() {var area = document.createElement('textarea');area.value = text;area.setAttribute('readonly', '');area.style.position = 'fixed';area.style.opacity = '0';document.body.appendChild(area);area.select();var ok = false;try { ok = document.execCommand('copy'); } catch (e) { ok = false; }area.remove();return ok ? Promise.resolve() : Promise.reject(new Error('copy failed'));}if (navigator.clipboard && window.isSecureContext) {return navigator.clipboard.writeText(text).catch(fallback);}return fallback();}function initCopyCitation() {var button = $('copy-citation');button.addEventListener('click', function () {copyText($('citation-bibtex').textContent).then(function () {button.textContent = 'Copied!';}, function () {button.textContent = 'Press Ctrl+C'; // nothing could copy: leave the text selected insteadvar range = document.createRange();range.selectNodeContents($('citation-bibtex'));var selection = window.getSelection();selection.removeAllRanges();selection.addRange(range);}).then(function () {button.classList.add('is-copied');setTimeout(function () { button.textContent = 'Copy'; button.classList.remove('is-copied'); }, 2000);});});}// ---- start ----function start() {readHash();initTabs();initCite();initCopyCitation();initTheme();fetch('data/meta.json', { cache: 'no-cache' }).then(function (response) {
202 unmodified lines203204205202 unmodified lines@media (max-width: 360px) {.tabs button { font-size: 0.8rem; padding: 8px 2px; }}202 unmodified lines203204205206207208209210211212213214215216217202 unmodified lines@media (max-width: 360px) {.tabs button { font-size: 0.8rem; padding: 8px 2px; }}/* Copy button in the top-right corner of the BibTeX entry. */.citation-box { position: relative; }.citation-box pre { padding-right: 84px; }.copy-button {position: absolute; top: 8px; right: 8px;font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--fg); background: var(--bg);border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer;}.copy-button:hover { border-color: var(--accent); color: var(--accent); }.copy-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }.copy-button.is-copied { border-color: var(--accent); color: var(--accent); }
3 unmodified lines45678910229 unmodified lines2402412422432442452462472482492502512523 unmodified lines<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><!-- Bumped with every data refresh (shown in the header). --><meta name="selectarena-version" content="0.7.2"><title>SelectArena Leaderboard</title><meta name="description" content="Leaderboard of feature selection methods on real-world tabular data."><link rel="icon" type="image/svg+xml" href="assets/logo.svg">229 unmodified lines<footer><h2 id="citation">Citation</h2><p>If you use SelectArena in your research, please cite our <a href="https://arxiv.org/abs/2610.13644" target="_blank" rel="noopener">paper</a>:</p><pre class="citation">@article{schaefer2026selectarena,title = {SelectArena: A Modern Benchmark for Feature Selection on Real-world Tabular Data},author = {Sch{\"a}fer, Bastian and Matus, Dominika and Purucker, Lennart and Knauer, Ricardo andRodner, Erik and Hutter, Frank and Sokolov, Anton and Liefooghe, Arnaud},journal = {arXiv preprint arXiv:2610.13644},year = {2026}}</pre></footer></div><script src="assets/app.js"></script>3 unmodified lines45678910229 unmodified lines2402412422432442452462472482492502512522532542553 unmodified lines<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><!-- Bumped with every data refresh (shown in the header). --><meta name="selectarena-version" content="0.7.3"><title>SelectArena Leaderboard</title><meta name="description" content="Leaderboard of feature selection methods on real-world tabular data."><link rel="icon" type="image/svg+xml" href="assets/logo.svg">229 unmodified lines<footer><h2 id="citation">Citation</h2><p>If you use SelectArena in your research, please cite our <a href="https://arxiv.org/abs/2610.13644" target="_blank" rel="noopener">paper</a>:</p><div class="citation-box"><button type="button" class="copy-button" id="copy-citation" aria-label="Copy the BibTeX entry">Copy</button><pre class="citation" id="citation-bibtex">@article{schaefer2026selectarena,title = {SelectArena: A Modern Benchmark for Feature Selection on Real-world Tabular Data},author = {Sch{\"a}fer, Bastian and Matus, Dominika and Purucker, Lennart and Knauer, Ricardo andRodner, Erik and Hutter, Frank and Sokolov, Anton and Liefooghe, Arnaud},journal = {arXiv preprint arXiv:2610.13644},year = {2026}}</pre></div></footer></div><script src="assets/app.js"></script>
assets/app.js+42
assets/style.css+12
index.html+5-2