Venk's Clean PubMed

Clean up 2020 update of PubMed

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Venk's Clean PubMed
// @namespace    http://greasyfork.org/
// @version      0.2
// @description  Clean up 2020 update of PubMed
// @author       Venkatesh L. Murthy
// @match        *://pubmed.ncbi.nlm.nih.gov/*
// @grant        Creative Commons CC-BY-SA 2.0
// @run-at       document-start
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

(function() {
    'use strict';

    addGlobalStyle('div.timeline-filter {display: none !important;}');
    addGlobalStyle('div.ncbi-alerts {display: none !important;}');
    addGlobalStyle('div.inner-wrap {padding-top: 0.8rem !important;padding-bottom: 0.2rem !important;}');
    addGlobalStyle('.result-actions-bar {display: none !important;}');
    addGlobalStyle('.citation-part {display:none !important;}');
    addGlobalStyle('.choice-group {margin-bottom: 0px !important; margin-top: 0px !important; font-size: 80% !important;}');
    addGlobalStyle('.title {margin-bottom: 0px !important; margin-top: 0px !important;}');
    addGlobalStyle('.labs-docsum-journal-citation {color: black !important;}');
    addGlobalStyle('.multiple-results-actions {padding: 0px !important;}');

    var url = window.location.href;
    var sortPattern = /&sort=/;
    if (!sortPattern.test(url)) {
        window.location.href=url + "&sort=date";
    }
})();