Skip to content

Instantly share code, notes, and snippets.

View willsheppard's full-sized avatar

Will Sheppard willsheppard

View GitHub Profile
@willsheppard
willsheppard / pinboard-bookmarklet.js
Created January 17, 2024 16:15 — forked from jsit/pinboard-bookmarklet.js
Pinboard Bookmarklet -- Use text selection for description if available, otherwise use meta description, and include referrer in description if exists.
javascript: q = location.href;
q = q.replace(/[?&]utm_[^&]*/g, "");
q = q.replace(/[?&]mc_[^&]*/g, "");
q = q.replace(/[?&]src=[^&]*/g, "");
q = q.replace(/[?&]ref=[^&]*/g, "");
desc = "";
if (document.getElementsByName("description").length > 0) {
desc = document.getElementsByName("description")[0].getAttribute("content")
"\n\n"
} else if (document.getElementsByName("Description").length > 0) {
@willsheppard
willsheppard / ms_ssi.js
Created May 26, 2023 08:53 — forked from emlyn/ms_ssi.js
I keep getting shown the "Stay signed in" page on Microsoft domains, even when I select "don't show this again" - this script will automatically click on "yes" for you every time the page comes up.
// ==UserScript==
// @name Stay signed in to MS
// @description Automatically click "yes" on the Microsoft "stay signed in" page that keeps appearing.
// @downloadURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js
// @updateURL https://gist.github.com/emlyn/2f0c9702bd83fe7d232ed58626c90ac7/raw/ms_ssi.js
// @namespace https://gist.github.com/emlyn/
// @version 0.2
// @author Emlyn Corrin
// @match https://login.microsoftonline.com/login.srf
// @icon https://c.s-microsoft.com/favicon.ico?v2