Dark Vanity

Dark theme for vanity

// ==UserScript==
// @name         Dark Vanity
// @namespace    https://www.arxiv-vanity.com/
// @version      0.1
// @description  Dark theme for vanity
// @author       Sangjee Dondrub <sangjeedondrub@live.com>
// @match        https://www.arxiv-vanity.com/papers/*
// @resource     REMOTE_CSS https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.0.0/dist/css/bootstrap-dark.min.css
// @grant        GM_getResourceText
// @grant        GM_addStyle
// @icon         data:image/ico;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAWb0lEQVR4AdzUA5Qjy9vH8W93V3ecmSSTMZez//XutfG3bdu2bdu2bdvGmuMJO0m7q97MxXv27LXPmc85T1dXPb+gqbHKPGj9xR97wuCd7zuRHvUKPX0qs2MAegVEMWqPzcLhOdpBi2bQ1Gt+rSJ+cNorWE1+5f3zQcV00UxkU+nkUA4KJqQEtA1CTaGyOrKjEQUxYRyZorthtXhP5cc77z1wqpnL5LDyKYxyCnIChAadmECPISUgMlCuRiB9X3Q3rBYpI3G3yewYZjqBkUlCqVsJg0vEEqlLlKUhBcS6QqIQK5vVYjCRvEcpU8YwTaxcAtI6CB1CiQxjIkMR6yA1UDoEKkSsbFaD98x8L3eP8TO35c0MuqEjsglI6KBrECniICLWJUpTxEgiGRF2S6xsVgMrmb9NWRRJaALRLT0pQAekhEARehEyVsRx3K2ISMbE3RIrm9VAaf6+amwTRSFJ3QRL/P/Vxw2IggCp5CUnIIojwijAj33EymY1uF/2lH9/1z7wnNHq8JtuXypjWQLQIZKoVkgURMRhSNStIPAJooBIBoiVzWpxW330zd+q/H6vm44/c/7kRbmhzDhWIFCdGGIJobrsJPjd8ggDF7GyWU12kvtWdf+e/CfM+rM2Ht3wurXZYdNqSizdQoskgecTBj5B4OHIKCG6G1Yj49+zb2l4qSeWztq6ZtY+yuzCARpeg6DjqHanqs216xz3OkL8yauwGqWyxthje9ZNTE2tZyoxwT/t3/KO/b/790xn6Y6xpo1GXhA1HGd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xK31ZR7yyVsPnuTYLbyOfktWOHYcMJyH/p+Fv4vCzaTn/wSewXAel4TKUElCrQGFNlCY3y8q+0SjP34t6ZicyL+LlaMLW4iJf9vkPWFtfx201aCCRZTbtDk39sCOxNVlRliVVUZhmKTfwOVlSg6ek5pF6zMAL9f4+N2H8HPhbPqHlCkVH5RmKwvTeQoI0USqx8PaxVZqUBFGOr+GvNPxbP+Bya4Mv+bxLFpaWcZuOVZFQYIBtERUmjYSxqjLw0/fs5Bo6TQsNn2v4nDhICcKkhubVJHyjnf15DrzmE1wuVXUlpFgVVSErYaVaFnX0S7IiM5U+ijS8nzPxC679hOs04wvOtvjczzyjs9CjRYUmMiOsUAJpKnxpbhC9KXpvpKjICoHIYjMfFHlJGpfEcUEelURhhpdkznWStgdJ+mvAp1odl096/T9d966NXn65TAAAAABJRU5ErkJggg==
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    var authors = document.querySelector('.ltx_authors')
    authors.innerHTML = authors.innerHTML.replace(/  /g, ', ')

    // Load remote CSS
    // vanity uses bootstrap
    // Black theme for Boostrap
    // @see https://github.com/Tampermonkey/tampermonkey/issues/835
    const myCss = GM_getResourceText("REMOTE_CSS");
    GM_addStyle(myCss);

    // customized
    GM_addStyle ( `
    div.ltx_page_content, div.ltx_title_document, .ltx_bibitem{
     font-family: "Merriweather", "Open Sans", "Book Antiqua" ! important;
     font-size: large !important;
     background: black;
    }

    .ltx_personname {
      font-family: "Merriweather", "Open Sans", "Book Antiqua" !important;
      font-size: large !mportant;
      font-size: 0.8em !important;
    }
    p {
      text-align: justify !important;
    }
    p.ltx_align_center {
      text-align: center !important;
    }
    article.ltx_document {
      background: black !important;
      color: white !important;
    }

    cite {
       color: #7c7ec1 !important;
    }

    img {
      background: lightgray !important;
      max-width: 700px !important;
      height: auto !important;
      display: block !important;
      margin: auto !important;
    }

    figure.ltx_figure figcaption {
      display: block !important;
      max-width: 700px !important;
      margin:auto !important;
      text-align: justify !important;
      padding-top: 1em !important;
    }

    .ltx_border_tt, .ltx_border_t {
      border-top: 1px solid white !important;
    }

    .ltx_title, .ltx_title_section {
      margin-bottom: 1em !important;
      display: contents !important;
    }

    section.ltx_section {
      margin: 2em 0 !important;
    }

    .ltx_para, .ltx_abstract {
      width: 100% !important;
      margin-top: 0.5em !important;
     }

     .ltx_ERROR {
       display: none !important;
     }

     .ltx_authors {
        font-size: 1.0em !important;
     }

     .ltx_equation {
      position: relative !important;
     }

     .ltx_align_right {
       position: absolute !important;
       right: 10px !important;
     }

` );
})();