Venk's Clean PubMed

Clean up 2020 update of PubMed

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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";
    }
})();