Skip to content

Instantly share code, notes, and snippets.

@seandrickson
seandrickson / userscript-common-fns.js
Last active August 23, 2023 13:36
Userscript Common Functions
const $ = (s, p = document) => p.querySelector(s);
const $$ = (s, p = document) => [...p.querySelectorAll(s)];
const delay = (t, v) => new Promise((res) => setTimeout(res, t, v));
const $when = (sel) =>
new Promise((res) => {
if ($(sel)) return res($(sel));
new MutationObserver((_, ob) => {
/* on all urls starting with: https://jira.*/secure/RapidBoard.jspa */
/* Use story points from extra fields for Kanban boards */
.ghx-plan-extra-fields {
display: block !important;
height: 0 !important;
margin: 0 !important;
}
/* For use on URLs starting with: https://jira.*/secure/RapidBoard.jspa */
/* Use story points from extra fields for Kanban boards */
.ghx-extra-fields {
display: block !important;
height: 0 !important;
margin: 0 !important;
}
.ghx-issue .ghx-extra-fields .ghx-extra-field:not([data-tooltip^="Story Points:"]),
@seandrickson
seandrickson / Jira-Simple-Agile-Board.css
Last active December 5, 2019 20:40
Userstyle to organize the Jira agile board to make it a little cleaner and minimal
/* For use on URLs starting with: https://jira.*/secure/RapidBoard.jspa */
/* Use story points from extra fields for Kanban boards */
.ghx-extra-fields {
display: block !important;
height: 0 !important;
margin: 0 !important;
}
.ghx-issue .ghx-extra-fields .ghx-extra-field:not([data-tooltip^="Story Points:"]),
@seandrickson
seandrickson / courier-new-neue.css
Last active February 21, 2018 15:43
Courier New Neue Userstyle
/* Some websites provide Courier New as their code font...this changes that to something better */
@font-face {
font-family: Courier New;
src: local("Consolas");
}
@font-face {
font-family: Courier;
src: local("Consolas");
@seandrickson
seandrickson / Polygon-NoComments.css
Last active August 29, 2015 14:01
Userstyle to remove comments from Polygon
/* For people like me who already spend too much time
on Polygon that don't want to get sucked in even further... */
#article-comments,
.polygon-comments-with-sidebar,
#follow-bar {
display: none;
}
@seandrickson
seandrickson / TheVerge-NoComments.css
Created May 16, 2014 16:22
Userstyle to remove comments from The Verge
/* For those people that already spend too much time on The Verge */
#comments,
.widget-recent-discussions,
aside.entry-unrelated {
display: none;
}
aside.rightcol {
padding-bottom: 0;
@seandrickson
seandrickson / HackerNews-Restyle.css
Last active December 20, 2015 06:18
A userstyle to Hacker News (http://news.ycombinator.com) which tries to keep the feel of the original but with better readability. Specifically, it sets a max-width and better font sizes.
html {
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-family: Verdana, sans-serif;
font-size: 16px;
line-height: 1.5;
}
*,
*:before,