Skip to content

Instantly share code, notes, and snippets.

@tomasr8
Last active January 22, 2025 09:32
Show Gist options
  • Save tomasr8/640b51f51b00b61373f3b404f2c17316 to your computer and use it in GitHub Desktop.
Save tomasr8/640b51f51b00b61373f3b404f2c17316 to your computer and use it in GitHub Desktop.
edh.user.js
// ==UserScript==
// @name EDH (do not open document links in a new tab by default)
// @version 1
// @match https://edh.cern.ch/Search/*
// @grant none
// @run-at document-idle
// ==/UserScript==
const docLinks = [...document.querySelectorAll('a[target="Document"]')]
docLinks.forEach(node => node.removeAttribute('target'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment