Skip to content

Instantly share code, notes, and snippets.

@alteredorange
alteredorange / Youtube Subs to RSS.js
Created December 6, 2021 20:50 — forked from jeb5/Youtube Subs to OPML.js
Youtube Subscriptions to RSS feed
let rssText = [...document.querySelectorAll("#main-link.channel-link")].map((e) => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
return "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
}).join("\n")
if (rssText) {
navigator.clipboard.writeText(rssText).then(
() => alert("A list of channel RSS feeds has been copied to the clipboard. \nPaste these into rssmix.com to generate a single RSS feed, or opml-gen.ovh to generate an OPML file.")
).catch(
() => {
console.log(rssText)
@alteredorange
alteredorange / rollup.config.js
Created April 3, 2020 22:10 — forked from evdama/rollup.config.js
rollup.config.js for sapper, tailwind and firebase
// @ts-nocheck TODO: remove at some point
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import config from 'sapper/config/rollup.js';
import getPreprocessor from 'svelte-preprocess'
import path from 'path'
import pkg from './package.json';
import postcss from 'rollup-plugin-postcss'
import replace from 'rollup-plugin-replace';