Skip to content

Instantly share code, notes, and snippets.

@sbliven
Created November 11, 2025 10:49
Show Gist options
  • Select an option

  • Save sbliven/f8a10160e9f4d1915c0f1e1322a6070a to your computer and use it in GitHub Desktop.

Select an option

Save sbliven/f8a10160e9f4d1915c0f1e1322a6070a to your computer and use it in GitHub Desktop.
A userscript to experiment with modifying the RDS Explorer css. Install with greasemonkey, tampermonkey, or another userscript manager.
// ==UserScript==
// @name RDS Explorer small tags
// @namespace http://tampermonkey.net/
// @version 2025-11-11
// @description Test CSS changes eg to reduce tag size
// @author Spencer Bliven
// @match https://open-research-data-portal.ch/rds-explorer/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=open-research-data-portal.ch
// @grant none
// ==/UserScript==
(function() {
'use strict';
const STYLE_ID = "USERSCRIPT_RDS_EXPLORER_INJECTED";
const css = `
.elementor-3067 .elementor-element.elementor-element-ac2d916 .jet-check-list__item-content {
padding: 0 3px;
margin: 0 3px 3px 0;
font-size: 70%;
line-height: 1.65em;
}
.elementor-3067 .elementor-element.elementor-element-a68fcb0 {
--min-height: 0px;
}
/* Disable wrapping between tag groups */
/*.elementor-3067 .elementor-element.elementor-element-ac2d916 {
flex-direction: column !important;
}*/
`;
function addStyle() {
if (document.getElementById(STYLE_ID)) return;
const style = document.createElement('style');
style.id = STYLE_ID;
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
// If head exists, insert there; otherwise insert at documentElement to try to run early
const parent = document.head || document.documentElement;
parent.appendChild(style);
}
function removeStyle() {
const el = document.getElementById(STYLE_ID);
if (el) el.remove();
}
console.log("Running RDS changes");
addStyle();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment