Skip to content

Instantly share code, notes, and snippets.

View einarmagnus's full-sized avatar

Einar Magnús Boson einarmagnus

View GitHub Profile
/*
Get a list of your Facebook friends and how many friends in common you have.
This works in Chrome, Edge, and Safari, and probably most other browsers too.
It should work in Firefox around xmas 2023 when they too have
the `:has()` selector working (annouced release date is 17th of Dec)
- DON'T RUN SCRIPTS LIKE THIS FROM PEOPLE YOU DON'T KNOW OR TRUST. only do this if you know me, or can read code.
- go to https://www.facebook.com/me/friends
- press F12 (maybe fn+F12 if you have a fancy laptop), or right-click the page and chose "inspect".

Keybase proof

I hereby claim:

  • I am einarmagnus on github.
  • I am einarmagnus (https://keybase.io/einarmagnus) on keybase.
  • I have a public key whose fingerprint is 6DF3 7762 8EDB 4F89 DAC0 3ABF D4B2 6FC4 11B1 AA45

To claim this, I am signing this object:

@einarmagnus
einarmagnus / bright_forms.user.js
Last active June 24, 2017 19:12
When applying a dark theme to your gtk-system, Fx will use it to render form elements. This gets ugly in webpages and too often a page specifies a dark color for input elelments w/o specifying a light color for the background which makes the text invisible. This fixes those issues by always inserting default colors for form elements.
// ==UserScript==
// @name bright forms
// @namespace einar
// @description Make all form elements default to light style to combat gtk theme
// @include *
// @version 1
// @grant none
// ==/UserScript==
function addDefaultCssRules(rule) {
var styleElement = document.createElement('style');