wallabag-ui-fix.js
· 1.7 KiB · JavaScript
Raw
// ==UserScript==
// @name Wallabag UI fix
// @namespace https://fabiomanganiello.com/
// @version 0.1
// @description Make the Wallabag UI better.
// @author Fabio Manganiello
// @match https://CHANGE_ME_WITH_YOUR_WALLABAG_URL/*
// @icon
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Remove the footer
const footer = document.getElementsByTagName('footer')[0];
if (footer) {
footer.style.display = 'none';
}
// Better header
const nav = document.getElementsByTagName('nav')[0];
if (nav) {
const header = document.getElementsByClassName('nav-panels')[0];
if (header) {
header.style.background = 'white';
header.style.color = 'black';
[...header.querySelectorAll('a')].forEach((a) => a.style.color = 'black');
[...document.querySelectorAll('a.card-title')].forEach((link) => { link.style.color = '#808080'; link.style.fontWeight = '500'});
}
}
const content = document.getElementById('content');
if (content) {
content.style.background = 'white';
}
const articleContainer = document.getElementById('article');
if (articleContainer) {
articleContainer.style.boxShadow = 'none';
}
const article = document.getElementsByTagName('article')[0];
if (article) {
article.style.fontFamily = '-apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Open Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif';
article.style.fontSize = '18px';
article.style.fontWeight = 400;
article.style.textAlign = 'justify';
article.style.padding = '1.5em';
article.style.lineHeight = '1.75em';
article.style.textRendering = 'optimizeLegibility';
}
})();
| 1 | // ==UserScript== |
| 2 | // @name Wallabag UI fix |
| 3 | // @namespace https://fabiomanganiello.com/ |
| 4 | // @version 0.1 |
| 5 | // @description Make the Wallabag UI better. |
| 6 | // @author Fabio Manganiello |
| 7 | // @match https://CHANGE_ME_WITH_YOUR_WALLABAG_URL/* |
| 8 | // @icon |
| 9 | // @grant none |
| 10 | // ==/UserScript== |
| 11 | |
| 12 | (function() { |
| 13 | 'use strict'; |
| 14 | |
| 15 | // Remove the footer |
| 16 | const footer = document.getElementsByTagName('footer')[0]; |
| 17 | if (footer) { |
| 18 | footer.style.display = 'none'; |
| 19 | } |
| 20 | |
| 21 | // Better header |
| 22 | const nav = document.getElementsByTagName('nav')[0]; |
| 23 | if (nav) { |
| 24 | const header = document.getElementsByClassName('nav-panels')[0]; |
| 25 | if (header) { |
| 26 | header.style.background = 'white'; |
| 27 | header.style.color = 'black'; |
| 28 | [...header.querySelectorAll('a')].forEach((a) => a.style.color = 'black'); |
| 29 | [...document.querySelectorAll('a.card-title')].forEach((link) => { link.style.color = '#808080'; link.style.fontWeight = '500'}); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | const content = document.getElementById('content'); |
| 34 | if (content) { |
| 35 | content.style.background = 'white'; |
| 36 | } |
| 37 | |
| 38 | const articleContainer = document.getElementById('article'); |
| 39 | if (articleContainer) { |
| 40 | articleContainer.style.boxShadow = 'none'; |
| 41 | } |
| 42 | |
| 43 | const article = document.getElementsByTagName('article')[0]; |
| 44 | if (article) { |
| 45 | article.style.fontFamily = '-apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Open Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'; |
| 46 | article.style.fontSize = '18px'; |
| 47 | article.style.fontWeight = 400; |
| 48 | article.style.textAlign = 'justify'; |
| 49 | article.style.padding = '1.5em'; |
| 50 | article.style.lineHeight = '1.75em'; |
| 51 | article.style.textRendering = 'optimizeLegibility'; |
| 52 | } |
| 53 | })(); |