summaryrefslogtreecommitdiff
path: root/mac/.qutebrowser/greasemonkey/dir.css.js
blob: 59ed68e17fddc3ef7809c772542a806c59447af0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// ==UserScript==
// @name        local directory
// @include     file://*/
// ==/UserScript==

/* ~/.config/qutebrowser/greasemonkey/dir.css.js :: */

var header = document.getElementById('header');
var text = header.textContent.slice(9);
header.textContent = text;
document.title = text;

if (text != '/') {
    var table = document.getElementsByTagName('table')[0];
    var row = table.insertRow(1);
    var cell = row.insertCell();
    var a = document.createElement('a');
    var updir = document.createTextNode('../');
    a.href = '../';
    a.appendChild(updir);
    cell.appendChild(a);
};

GM_addStyle(`
    * {
        border: none !important;
        margin: 0px !important;
        padding: 0px !important;
        color: var(--color-fg) !important;
        background: var(--color-bg) !important;
        font-family: var(--font-family) !important;
        font-size: var(--font-size) !important;
        text-decoration: none !important;
    }

    body {
        display: block !important;
        color: var(--color-fg) !important;
        background-color: var(--color-bg) !important;
        font-style: none !important;
        font-weight: normal !important;
        padding-left: 1ch !important;
        padding-right: 1ch !important;
    }

    h1 {
        border-color: var(--color-heading) !important;
        color: var(--color-heading) !important;
        display: table !important;
        font-weight: bold !important;
        border-bottom: solid !important;
        border-width: 2ch !important;
        border-image: var(--box1-heading) !important;
    }

    a {
        color: var(--color-link) !important ;
    }

    a:hover {
        color: var(--color-active) !important;
    }

    td {
        padding-right: 2ch !important;
    }

    #parentDirLinkBox, #parentDirLink, #parentDirText,
    thead, #theader, td:nth-child(2), td:nth-child(3) {
        display: none !important;
    }
`);