Skip to content

Instantly share code, notes, and snippets.

@andrewpomeroy
andrewpomeroy / bookmarklet.js
Last active October 28, 2024 01:01
Bookmarklet: OneTab export ➡️ Markdown links
javascript:(()%3D%3E%7Bfunction%20copyToClipboard(e)%7Bvar%20t%3Do%3D%3E%7Bdocument.removeEventListener(%22copy%22%2Ct%2C!0)%2Co.preventDefault()%3Blet%20n%3Do.clipboardData%3Bn.clearData()%2Cn.setData(%22text%2Fplain%22%2Ce)%7D%3Bdocument.addEventListener(%22copy%22%2Ct%2C!0)%2Cdocument.execCommand(%22copy%22)%7Dfunction%20main()%7Blet%20e%3Ddocument.querySelectorAll(%22.tabGroup%20.tabLink%22)%3Bif(!e.length)return%20void%20alert(%22No%20tabs%20found%22)%3Bconst%20t%3DArray.from(e).map((e%3D%3E%60%5B%24%7Be.textContent%7D%5D(%24%7Be.href%7D)%60)).join(%22%5Cn%5Cn%22)%3Bconsole.log(t)%2CcopyToClipboard(t)%7Dmain()%3B%7D)()%3B
@andrewpomeroy
andrewpomeroy / automate-sky-follower-bridge.js
Last active November 19, 2023 08:45
Automate migration of Twitter -> Bluesky follows, using the Chrome extension Sky Follower Bridge
// 1. Grab the Chrome extension from https://chrome.google.com/webstore/detail/sky-follower-bridge/behhbpbpmailcnfbjagknjngnfdojpko
// 2. Open up the "Following" tab your Twitter profile
// 3. Activate the extension, follow its instructions. You should start seeing "Follow on bluesky" buttons show up on the page next to some of your follows.
// 4. Open up the Chrome console (Cmd+Option+J on Mac, Ctrl+Shift+J on Windows)
// 5. Paste the big ol' code snippet below into the console and hit Enter
// NOTE: You'll need to keep this window upfront and active, so you may need to change your laptop's lock-screen / power settings to make sure it doesn't go to sleep while this process is running
var loop = () => {
const buttons = Array.from(document.querySelectorAll('.action-button:not(.action-button__being):not(.action-button__just-applied)'));
@andrewpomeroy
andrewpomeroy / input.scss
Created May 13, 2022 21:47
Generated by SassMeister.com.
:root {
--some-color: red;
}
.normal {
color: rgba(255,255,255,.2);
}
.BIGTIME {
color: rgba(var(--some-color), var(--some-color), var(--some-color), .2);
}