Skip to content

Instantly share code, notes, and snippets.

View imteekay's full-sized avatar
⚛️
compiling compilers

TK imteekay

⚛️
compiling compilers
View GitHub Profile
// add style to body
document.getElementsByTagName('body')[0].style = 'text-align: center; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-top: 100px;'
// remove first two <td>
document.getElementsByTagName('td')[0].remove()
document.getElementsByTagName('td')[0].remove()
// remove first link (Paul Graham)
@imteekay
imteekay / distractionless-medium.js
Created August 20, 2022 17:49
Making the Medium reading experience distractionless.
// Remove left and right content
const main = document.getElementsByTagName('main')[0];
const body = document.getElementsByTagName('body')[0];
const newBody = document.createElement('body');
newBody.appendChild(main);
body.replaceWith(newBody);
// Remove "More From Author" in the footer
function getAllTagsWithText(tag, text) {

Keybase proof

I hereby claim:

  • I am imteekay on github.
  • I am imteekay (https://keybase.io/imteekay) on keybase.
  • I have a public key ASC2GOTQGLnATvyn9c3ZPjn9wm1DDR8FNY13fRXRbiNSgwo

To claim this, I am signing this object:

@imteekay
imteekay / globo-trash-recycle.js
Last active February 14, 2021 13:07
Remove entertainment and sports from globo page
const entertainmentTrash = document.querySelectorAll('[data-tracking-action="entretenimento"]');
const sportsTrash = document.querySelectorAll('[data-tracking-action="esporte"]')
const trash = [...entertainmentTrash, ...sportsTrash];
trash.forEach(t => t.remove());
assertions: {
'resource-summary:script:size': [
'error',
{ maxNumericValue: 1000000 },
],
'resource-summary:image:size': [
'error',
{ maxNumericValue: 100000 },
],
'resource-summary:total:size': [
import { LIFECYCLE, MetaPayload } from 'redux-pack';
// Type of computed property's value is '"success"', which is not assignable to type 'LIFECYCLEValues'.
const payloadMeta: MetaPayload<{}> = {
'redux-pack/LIFECYCLE': LIFECYCLE.SUCCESS
};
// Works fine!
const payloadMeta: MetaPayload<{}> = {
'redux-pack/LIFECYCLE': 'succes' // typo!
const lockedProblems = document.querySelectorAll('[data-original-title="Subscribe to unlock"]');
lockedProblems.forEach(problem => {
problem.parentElement.parentElement.parentElement.parentElement.remove();
});
await open(newArticlePath);
const {
newArticlePath,
imageCoverExamplePath,
imageCoverPath,
assetsFolder,
imageCoverFileName
}: ArticlePaths = buildPaths(newArticleFolderPath);
type ArticlePaths = {
newArticlePath: string;
imageCoverExamplePath: string;
imageCoverPath: string;
assetsFolder: string;
imageCoverFileName: string;
};