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
iFrames = [] | |
iFramesInner = [] | |
filterOut = [ // does not work with YT-DL | |
"mycloud", | |
"vidzi", | |
"vidbull", | |
"fmoviesfree", | |
"vidcloud", | |
"streamcherry", | |
"vidup", |
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
Array.prototype.myMap = function (callback, thisArg) { | |
if (!thisArg) thisArg = this | |
if (!Array.isArray(thisArg)) throw new Error('Not an Array') | |
if (typeof callback !== 'function') throw new Error('Callback must be a function') | |
const newArray = [] | |
for (let i = 0; i < thisArg.length; i++) { | |
newArray.push(callback(thisArg[i], i, thisArg)) | |
} | |
return newArray | |
} |
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
function reOrganizeQuotes(quotes) { | |
// from { quote: author} | |
// to { author: [quote] } | |
const newObj = {} | |
Object.entries(quotes).forEach(([key, value]) => { | |
newObj[value] === undefined ? | |
newObj[value] = [key] : | |
newObj[value].push(key) |
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
// ==UserScript== | |
// @name Youtube playlist link fix & prevent autoplays | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2.0 | |
// @description Change playlist title link to playlist page instead of first item in playlist & prevent autoplays | |
// @author Fraasi | |
// @match https://www.youtube.com/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== |
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
function msToTime(duration) { | |
// from https://stackoverflow.com/questions/19700283/how-to-convert-time-milliseconds-to-hours-min-sec-format-in-javascript | |
var milliseconds = parseInt((duration%1000)/100) | |
, seconds = parseInt((duration/1000)%60) | |
, minutes = parseInt((duration/(1000*60))%60) | |
, hours = parseInt((duration/(1000*60*60))%24); | |
hours = (hours < 10) ? "0" + hours : hours; | |
minutes = (minutes < 10) ? "0" + minutes : minutes; | |
seconds = (seconds < 10) ? "0" + seconds : seconds; | |
return hours + ":" + minutes + ":" + seconds + "." + milliseconds; |
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
// couldn't get scraper to get the data so I just used console | |
// easy to tweak for your own codepen page | |
// get data from console in 'https://codepen.io/Fraasi/pens/public/?grid_type=list'; | |
// var aNodes = document.querySelectorAll('tr > td.title a') | |
// var pens = {}; | |
// aNodes.forEach( a => { pens[a.innerText] = a.href; }) | |
// copy(pens) | |
var pens = { | |
"D3 zoomable-draggable datapoint map":"https://codepen.io/Fraasi/pen/zwgdyV", |
NewerOlder