This file contains 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
This file contains 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 script - without sleep | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.youtube.com/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== |
This file contains 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 scrollTillIndexNumber (indexToScroll) { | |
window.scrollTo(0,document.querySelector("div.style-scope ytd-section-list-renderer").scrollHeight); | |
var lastElementIndex = document.getElementsByTagName("yt-formatted-string").length; | |
var currentLastIndex = (lastElementIndex - 8)/2; | |
if (currentLastIndex < indexToScroll) { |
This file contains 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 quality | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.youtube.com/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== |
This file contains 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 script | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.youtube.com/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== |
This file contains 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
var elements = document.getElementsByClassName('lines-added'); | |
var sumForAdded = 0; | |
for (var i=0; i<elements.length; i++) { | |
var innerText = elements[i].innerText; | |
// console.log("Sth2"+innerText) | |
var clearInnerText = innerText.replace('+', '').replace('-', ''); | |
sumForAdded += +clearInnerText; | |
} |
This file contains 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
var elements = document.querySelectorAll('#video-title.yt-simple-endpoint.style-scope.ytd-grid-video-renderer'); | |
elements.forEach(element => { | |
element.style.maxHeight = '7em'; | |
element.style.webkitLineClamp = '7' | |
}) | |
//thanks to @tylde |
This file contains 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
//You need to run this in javascript console inside chrome (althought should work the same in other browsers) | |
//Assumptions: | |
//1. Will count only "expanded" videos on page, you may first need to run script to scroll to last video or do it manually | |
//2. Tested on chrome, ubuntu, 2019 | |
//3. Time format: hh:mm:ss | |
var array = document.getElementsByClassName("style-scope ytd-thumbnail-overlay-time-status-renderer"); | |
var arrLength = array.length; |