Skip to content

Instantly share code, notes, and snippets.

@jifunks
Last active July 13, 2020 18:24
Show Gist options
  • Save jifunks/fe01fb61dc4e0a7952225b7b2b086c00 to your computer and use it in GitHub Desktop.
Save jifunks/fe01fb61dc4e0a7952225b7b2b086c00 to your computer and use it in GitHub Desktop.
Medium.com uses design and typography to legitimize ideas that might not deserve legitimacy. This script kills Medium's design so that critical thinking takes precedence over eye candy.
// ==UserScript==
// @name Remove Legitimacy From Medium
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Medium.com frames everyone's opinions in a way that gives them legitimacy in the subconscious. In reality, they are no more than blog posts. This script serves to strip any form of nice styling or legitimacy from Medium posts, and encourage critical thinking.
// @author Jake Funke
// @match medium.com/*
// @include https://*.medium.com/*
// @grant GM_addStyle
// @run-at document-idle
// @require http://code.jquery.com/jquery-latest.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
GM_addStyle(`
.body {
font-family: "Comic Sans MS", cursive, sans-serif;
}
.stripStyle > p {
font-family: "Comic Sans MS", cursive, sans-serif;
font-size: 14px;
}
.stripStyle {
font-family: "Comic Sans MS", cursive, sans-serif;
font-size: 14px;
}
.striph2 {
font-family: "Comic Sans MS", cursive, sans-serif;
font-size: 18px;
}
.striph1 {
font-family: "Comic Sans MS", cursive, sans-serif;
font-size: 22px;
}
.killStyle {
background-color: #ece7ff;
}
.articleBody {
margin-left: 5%;
}
.articleBody > p {
border-style: groove;
border-width: 7px;
border-color: white;
padding: 2%;
}
strong {
font-family: "Comic Sans MS", cursive, sans-serif !important;
}
a {
color: #00f !important;
}
`);
waitForKeyElements('article', afterRender);
function afterRender(jNode) {
var article = $('article').html();
$('body').replaceWith(article);
$('section div').addClass('articleBody');
$('h2').addClass('striph2');
$('h1').addClass('striph1');
$('section').addClass('killStyle');
$('div').addClass('killStyle');
$('blockQuote').addClass('stripStyle');
$('[data-selectable-paragraph]').addClass('stripStyle');
$('.branch-journeys-top').remove();
$('button').remove();
$('img').each(function() {
var fuckYouMediumNoscript = $(this)
.next('noscript')
.text();
$(this).replaceWith(fuckYouMediumNoscript);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment