Skip to content

Instantly share code, notes, and snippets.

@CAYdenberg
Last active February 6, 2024 10:51
Show Gist options
  • Save CAYdenberg/9e467d52182b88114297a33061547c60 to your computer and use it in GitHub Desktop.
Save CAYdenberg/9e467d52182b88114297a33061547c60 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Obscure journal names in PubMed
// @namespace http://tampermonkey.net/
// @version 2024-02-01
// @description try to take over the world!
// @author You
// @match https://pubmed.ncbi.nlm.nih.gov/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=nih.gov
// @grant none
// ==/UserScript==
const SELECTORS = [
".docsum-journal-citation",
".journal-actions-trigger",
".link-item",
".identifier.doi",
".citation-doi"
].join(', ');
(function() {
'use strict';
document.querySelectorAll(SELECTORS).forEach(el => {
el.style.filter = 'blur(6px)';
});
})();
@lpanebr
Copy link

lpanebr commented Feb 5, 2024

Tweaked to also remove information that shows on mouse over and also to handle full text pages on PMC.

// ==UserScript==
// @name         Obscure journal names in PubMed
// @namespace    http://tampermonkey.net/
// @version      2024-02-01
// @description  try to take over the world!
// @author       You
// @match        https://pubmed.ncbi.nlm.nih.gov/*
// @match        https://www.ncbi.nlm.nih.gov/pmc/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=nih.gov
// @grant        none
// ==/UserScript==

const SELECTORS = [
    ".citation-default", // pmc
    ".usa-breadcrumb", // pmc
    ".citation-default", // pmc
    ".courtesy-note", // pmc
    ".pmc-page-banner img", // pmc
    ".linkout-category-links",
    ".docsum-journal-citation",
    ".journal-actions-trigger",
    ".link-item",
    ".identifier.doi",
    ".citation-doi"
].join(', ');

(function() {
    'use strict';

    document.querySelectorAll(SELECTORS).forEach(el => {
        el.style.filter = 'blur(6px)';
        el.title = '';
        el.src = '';
        el.href = '';
    });
})();

@lpanebr
Copy link

lpanebr commented Feb 5, 2024

Same as before but also blurs authors.

// ==UserScript==
// @name         Obscure journal names in PubMed
// @namespace    http://tampermonkey.net/
// @version      2024-02-01
// @description  try to take over the world!
// @author       You
// @match        https://pubmed.ncbi.nlm.nih.gov/*
// @match        https://www.ncbi.nlm.nih.gov/pmc/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=nih.gov
// @grant        none
// ==/UserScript==

const SELECTORS = [
    // authors
    ".authors-list",
    ".docsum-authors",
    ".contrib-group", // pmc
    // journals
    ".citation-default", // pmc
    ".usa-breadcrumb", // pmc
    ".citation-default", // pmc
    ".courtesy-note", // pmc
    ".pmc-page-banner img", // pmc
    ".linkout-category-links",
    ".docsum-journal-citation",
    ".journal-actions-trigger",
    ".link-item",
    ".identifier.doi",
    ".citation-doi"
].join(', ');

(function() {
    'use strict';

    document.querySelectorAll(SELECTORS).forEach(el => {
        el.style.filter = 'blur(6px)';
        el.title = '';
        el.src = '';
        el.href = '';
    });
})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment