Skip to content

Instantly share code, notes, and snippets.

@prinsss
Last active September 6, 2023 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prinsss/f0a40f132239fab5eaa2b984e045f4c8 to your computer and use it in GitHub Desktop.
Save prinsss/f0a40f132239fab5eaa2b984e045f4c8 to your computer and use it in GitHub Desktop.
A more informative list view for Pocket. Always show the tags of saved items instead of hovering to show.
// ==UserScript==
// @name Show Pocket Tags
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Always show the tags of items saved in Pocket. No more hovering!
// @author You
// @match *://getpocket.com/*
// @icon https://getpocket.com/favicon.ico
// @grant none
// ==/UserScript==
(function () {
'use strict';
function addGlobalStyle(css = '') {
const target = document.head || document.body;
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css.replace(/;/g, ' !important;');
target.append(style);
}
function DOMContentLoaded() {
addGlobalStyle(`
.footer .details {
display: flex;
flex-direction: column;
line-height: 1;
}
.footer .details .context {
margin-top: 4px;
}
.footer .time-to-read {
height: 20px;
line-height: 20px;
}
.footer .card-tags {
position: relative;
height: 20px;
color: transparent;
}
.footer .tags-container {
display: flex;
padding: 0;
background-color: transparent;
box-shadow: none;
width: max-content;
border-radius: 0;
left: 0;
bottom: unset;
top: 0px;
}
.footer .tags-container .icon {
display: none;
}
.footer .tags-container .tags-list {
padding-left: 0;
}
.footer .tags-container .tag {
margin-bottom: 0;
}
.footer .tags-container .tag a {
height: 20px;
line-height: 20px;
}
`);
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', DOMContentLoaded);
} else {
DOMContentLoaded();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment