My Technical Notes

Tuesday, 3 January 2017

Userscript for the Use the Index Luke! site


// ==UserScript==
// @name       Use The Index Luke Prettifier
// @namespace  http://use.i.E.your.homepage/
// @version    0.1
// @description  enter something useful
// @match      http://use-the-index-luke.com/*
// @copyright  2012+, You
// ==/UserScript==


$(function() {
    
    function addCss(cssStyles) {
        var styleElem = $('<style>').attr('type', 'text/css').text(cssStyles);
        $('head').append(styleElem);
    }
    
    var cssStyles = 
        [
         'body { background-color: #f8f8f8 }',
   '#content, .region-sidebar-second .text-standard { font-family : "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif }',
   'p { text-align: justify, line-height: 1.7em }',
            '#block-block-22, #block-block-28, #block-views-authorsbio-block_1, #page-closure { display: none; }'
        ].join('\n');

    if (true)
        addCss(cssStyles);
});

No comments: