This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste in youtube's subscription page's console | |
async function unsubscribeAll() { | |
const subscribedButtons = Array.from(document.querySelectorAll('button')) | |
.filter(btn => btn.innerText.trim() === 'Subscribed'); | |
console.log(`Found ${subscribedButtons.length} subscribed channels.`); | |
for (let i = 0; i < subscribedButtons.length; i++) { | |
subscribedButtons[i].click(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code taken from: https://github.com/jonasehrlich/chrometrace/blob/main/chrometrace/chrometrace.py#L555 | |
""" | |
idea: open file, and write "[" | |
from then on, when dumping a list of dict to json, remove first and last character as they will be "[" & "]". | |
Also append ", " to the end for next iteration. | |
on end, remove the last 2 bytes (since ", " was added) and write "]" | |
""" | |
class _TraceWriter: |