Enhance ar5iv.labs.arxiv.org/html/ with various tweaks and improvements.
ar5iv Plus by PRO-2684
Imported and mirrored from https://raw.githubusercontent.com/PRO-2684/gadgets/refs/heads/main/ar5iv_plus/ar5iv_plus.user.css
Details
AuthorPRO-2684
Licensegpl-3.0
Categoryarxiv
Created
Updated
Size2.9 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Visit GitHub repo for detailed documentation.
Source code
/* ==UserStyle==
@name ar5iv Plus
@namespace github.com/openstyles/stylus
@version 1.0.7
@description Enhance ar5iv.labs.arxiv.org/html/ with various tweaks and improvements.
@author PRO-2684
@license gpl-3.0
@preprocessor stylus
@var number stickyHeader "Sticky Header" [3, 0, 3, 1]
@var checkbox semiTransparent "Semi Transparent" 1
@var checkbox compact "Compact" 1
@var checkbox copyFix "Copy Fix" 0
@var checkbox zIndexFix "Z-Index Fix" 1
==/UserStyle== */
@-moz-document url-prefix("https://ar5iv.labs.arxiv.org/html/") {
@css {
:root {
--semi-transparent-background-color: rgb(from var(--background-color) r g b / 0.5);
}
}
makeSemiTransparent() {
backdrop-filter: blur(1px);
background-color: var(--semi-transparent-background-color);
}
setStickyHeader(top, zIndex) {
position: sticky;
if (semiTransparent) {
makeSemiTransparent();
} else {
background-color: var(--background-color);
}
top: top;
z-index: zIndex;
}
if (stickyHeader > 0) {
.ltx_title_paragraph {
margin-right: 0;
}
div.ltx_abstract > .ltx_title {
setStickyHeader(0, 4);
}
article > section {
> .ltx_title {
setStickyHeader(0, 3);
}
*[id] {
scroll-margin-top: 30.5px;
}
if (stickyHeader > 1) {
> section {
> .ltx_title {
setStickyHeader(30.5px, 2);
}
*[id] {
scroll-margin-top: 56.5px;
}
if (stickyHeader > 2) {
> section {
> .ltx_title {
setStickyHeader(56.5px, 1);
}
*[id] {
scroll-margin-top: 78px;
}
}
}
}
}
}
}
if (semiTransparent) {
.ar5iv-bibitem-preview, .ar5iv-button-close-preview {
makeSemiTransparent();
}
}
if (compact) {
.ltx_figure .ltx_caption, .ltx_table .ltx_caption {
margin-top: 0;
margin-bottom: 0;
}
.ar5iv-bibitem-preview {
min-height: unset;
}
}
if (copyFix) {
.ltx_enumerate > .ltx_item > .ltx_tag_item, .ltx_itemize > .ltx_item > .ltx_tag_item, .ltx_title > .ltx_tag {
user-select: none;
}
}
if (zIndexFix) {
.ltx_figure img:active, .ltx_p>img.ltx_graphics:active, .ltx_text>img.ltx_graphics:active {
z-index: 5;
}
}
}