Skip to content

Instantly share code, notes, and snippets.

@MDFL64
Created March 14, 2024 19:34
Show Gist options
  • Save MDFL64/97a15a74d6cae0e601d57409c570d574 to your computer and use it in GitHub Desktop.
Save MDFL64/97a15a74d6cae0e601d57409c570d574 to your computer and use it in GitHub Desktop.
// NORMalizer SCRIPT
//
// this is a simple script that speeds up
// specified segments of the debate.
// (or any video, really)
//
// paste it into browser console to use.
//
// This works as-is, but I only recorded
// timestamps for the intro to demonstrate.
//
// script by /u/bone_ok
// timestamps collected by /u/birdbrainswagtrain using https://gist.github.com/MDFL64/824cfd71d31ed126b29eccd33c1daea5
// SETTINGS
//
// if you want to listen to the debate in 2x
// and finkle in 4x, set these to 2 & 4
var standard_speed = 1.5;
var finkle_speed = 3;
// TIME RANGES
//
// the ranges below are the start and end
// timestamps (in seconds) for when finkle
// rambles.
//
// They need to be listed in chronological
// order, in the format shown (no comma on
// the last line)
//
// For adding additional ranges, you can get
// the timestamps by pausing at the start/end
// of a ramble and typing this in console:
//
// document.querySelector("video").currentTime
//
// (can hit [UP] and then [ENTER] in console
// to redo that command after the first time)
var finkle_ramble_ranges = [[2,20],[85,93],[131,138],[325,935],[1932,1937],[1941,1988],[1991,2008],[2012,2040],[2040,2305],[2933,2980],[2989,2997],[3043,3070],[3075,3136],[3214,3220],[3222,3244],[3249,3279],[3282,3303],[4240,4427],[4429,4475],[4477,4542],[4629,4641],[4775,4819],[4823,4911],[4944,4954],[4962,4968],[5007,5048],[5048,5077],[5079,5101],[5136,5153],[5157,5162],[5162,5168],[5172,5207],[5215,5227],[5234,5239],[5243,5248],[5339,5345],[5638,5758],[5759,5765],[5780,5795],[5804,5830],[6392,6596],[7091,7099],[7103,7110],[7168,7186],[7200,7208],[7279,7285],[7299,7309],[7550,7555],[7569,7588],[7861,7866],[8134,8143],[8149,8158],[8189,8214],[8217,8229],[8235,8246],[8249,8260],[8273,8280],[8285,8292],[8293,8306],[8307,8314],[8723,8748],[8766,8774],[8778,8790],[9020,9046],[9047,9088],[9099,9219],[9220,9277],[9302,9312],[9329,9339],[9347,9366],[9381,9386],[9395,9400],[9419,9427],[9434,9459],[9461,9482],[9483,9488],[9489,9497],[9516,9522],[9542,9570],[9899,9907],[9920,9946],[9972,9996],[10003,10016],[10037,10048],[10050,10057],[10065,10070],[10105,10112],[10114,10135],[10145,10164],[10169,10190],[10345,10356],[10367,10373],[10382,10409],[10410,10423],[10661,10674],[10686,10693],[10695,10717],[10740,10752],[10784,10826],[10844,10856],[10886,10897],[11085,11090],[11315,11326],[11439,11453],[11492,11503],[11504,11513],[11515,11538],[11685,11696],[11703,11712],[11714,11744],[11760,11847],[11866,11871],[11873,11878],[11927,11934],[11943,11951],[11956,11966],[11970,12010],[12070,12077],[12201,12219],[13598,13612],[13637,13671],[13672,13803],[13866,13898],[13911,14041],[14051,14072],[14075,14165],[14166,14199],[14202,14271],[14289,14329],[14337,14346],[14349,14356],[14360,14401],[14737,14750],[14752,14780],[14795,14823],[14834,14862],[14864,14873],[14875,14880],[14880,14900],[15069,15080],[15108,15116],[15120,15143],[15144,15164],[15492,15498],[15502,15511],[15555,15565],[15570,15603],[15617,15639],[15643,15650],[15649,15655],[15658,15677],[15711,15718],[15718,15725],[15726,15733],[15742,15747],[15789,15794],[15841,15846],[15963,15987],[16000,16012],[16012,16017],[16021,16030],[16206,16218],[16220,16230],[16255,16261],[16284,16289],[16292,16300],[16303,16308],[16320,16327],[16329,16358],[16360,16365],[16371,16384],[16385,16394],[16432,16438],[16447,16496],[16502,16520],[16525,16538],[16593,16601],[16604,16615],[16633,16642],[16654,16661],[16665,16671],[16671,16679],[16685,16696],[16710,16717],[16749,16755],[16808,16815],[16828,16837],[16849,16864],[16865,16872],[16886,16891],[16894,16907],[16912,16925],[17310,17316],[17376,17382],[17397,17411],[17438,17444],[17446,17455],[17459,17473],[17532,17543],[17571,17583],[17681,17740],[17749,17774]];
// SCRIPT SHIT
var video_element = document.querySelector("video");
var NORMalizer = video_element.addEventListener("timeupdate",()=>{
timerangesearch:{
for(let i = 0; i < finkle_ramble_ranges.length; i++){
if(video_element.currentTime >= finkle_ramble_ranges[i][0] &&
(i == finkle_ramble_ranges.length-1 || video_element.currentTime < finkle_ramble_ranges[i+1][0])){
if(video_element.currentTime <= finkle_ramble_ranges[i][1]){
video_element.playbackRate = finkle_speed;
}else{
video_element.playbackRate = standard_speed;
}
break timerangesearch;
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment