YouTube More Speeds

Adds buttons under a YouTube video with more playback speeds.

  1. // ==UserScript==
  2. // @version 1.5.1
  3. // @name YouTube More Speeds
  4. // @description Adds buttons under a YouTube video with more playback speeds.
  5.  
  6. // @name:af YouTube Meer Spoed
  7. // @description:af Voeg knoppies onder 'n YouTube-video by met meer afspeel spoed.
  8.  
  9. // @name:am የ YouTube ተጨማሪ ፍጥነት
  10. // @description:am ተጨማሪ ማጫወት ፍጥነት ጋር የ YouTube ቪዲዮ በታች አዝራሮች ያክላል.
  11.  
  12. // @name:ar يوتيوب عن السرعات
  13. // @description:ar ويضيف أزرار تحت شريط فيديو YouTube بمزيد من سرعات التشغيل.
  14.  
  15. // @name:az YouTube Daha Xızı
  16. // @description:az daha playback sürəti ilə bir YouTube video altında düymələri edər.
  17.  
  18. // @name:be YouTube Больш Паскарае
  19. // @description:be Дадае кнопкі пад відэа на YouTube з больш хуткасцю прайгравання.
  20.  
  21. // @name:bg YouTube Повече Скорости
  22. // @description:bg Добавя бутони под видео YouTube с повече скорост на възпроизвеждане.
  23.  
  24. // @name:bn YouTube কে আরও গতি
  25. // @description:bn আরো প্লেব্যাক গতি সঙ্গে একটি YouTube ভিডিও অধীনে বোতাম যোগ করে।
  26.  
  27. // @name:bs YouTube Više Brzine
  28. // @description:bs Dodaje tipke ispod YouTube video s više brzina reprodukcije.
  29.  
  30. // @name:ca YouTube Més terminis d'enviament
  31. // @description:ca Afegeix botons sota d'un vídeo de YouTube amb més velocitats de reproducció.
  32.  
  33. // @name:co YouTube More acceleratu
  34. // @description:co Aghjusta buttoni sottu una Video YouTube cù di più ùn mettite italiani.
  35.  
  36. // @name:cs YouTube Další Rychlosti
  37. // @description:cs Přidá tlačítek pod videem na YouTube s více rychlostí přehrávání.
  38.  
  39. // @name:cy YouTube Mwy Speeds
  40. // @description:cy Ychwanegu botymau dan fideo YouTube gyda mwy o gyflymder playback.
  41.  
  42. // @name:da YouTube Flere Hastigheder
  43. // @description:da Tilføjer knapper under en YouTube-video med flere afspilningshastigheder.
  44.  
  45. // @name:de YouTube Mehr Geschwindigkeiten
  46. // @description:de Fügt Schaltflächen unter einem YouTube-Video mit mehr Wiedergabegeschwindigkeiten.
  47.  
  48. // @name:el YouTube Περισσότερες ταχύτητες
  49. // @description:el Προσθέτει κουμπιά κάτω από ένα βίντεο στο YouTube με περισσότερες ταχύτητες αναπαραγωγής.
  50.  
  51. // @name:eo YouTube Pli Rapidoj
  52. // @description:eo Aldonas butonojn sub Youtube video kun pli reprodukto rapidoj.
  53.  
  54. // @name:es YouTube Más plazos de envío
  55. // @description:es Añade botones debajo de un vídeo de YouTube con más velocidades de reproducción.
  56.  
  57. // @name:et YouTube Rohkem Kiirused
  58. // @description:et Lisab nuppe all YouTube video rohkem taasesituse kiirust.
  59.  
  60. // @name:eu YouTube abiadura gehiago
  61. // @description:eu Gehitzen botoiak YouTube bideo bat erreprodukzioa abiadura gehiagorekin azpian.
  62.  
  63. // @name:fa یوتیوب سرعت بیشتر
  64. // @description:fa می افزاید دکمه زیر ویدیو یوتیوب با سرعت پخش است.
  65.  
  66. // @name:fi YouTube Enemmän Nopeudet
  67. // @description:fi Lisää painikkeita alle YouTube-videota enemmän hakunopeutta.
  68.  
  69. // @name:fr YouTube Plus de délais
  70. // @description:fr Ajoute des boutons sous une vidéo YouTube avec plus de vitesse de lecture.
  71.  
  72. // @name:fy YouTube More speeds
  73. // @description:fy Foeget knoppen ûnder in YouTube video mei mear Wiedergabe faasjes.
  74.  
  75. // @name:ga YouTube More Luasanna
  76. // @description:ga Cuir cnaipí faoi físeán YouTube le luasanna athsheinm níos mó.
  77.  
  78. // @name:gd YouTube Tuilleadh astaran
  79. // @description:gd Putanan cur fo YouTube bhidio le barrachd playback astaran.
  80.  
  81. // @name:gl YouTube máis velocidades
  82. // @description:gl Engade botóns debaixo dun vídeo de YouTube con máis velocidade de reprodución.
  83.  
  84. // @name:gu YouTube ને વધુ ગતિ
  85. // @description:gu વધુ પ્લેબેક ઝડપ સાથે YouTube વિડિઓ હેઠળ બટનો ઉમેરે છે.
  86.  
  87. // @name:ha YouTube More gudu
  88. // @description:ha Yana ƙara mashiga a karkashin wani YouTube video da more sake kunnawa gudu.
  89.  
  90. // @name:hi यूट्यूब अधिक गति
  91. // @description:hi अधिक प्लेबैक गति के साथ एक यूट्यूब वीडियो के तहत बटन जोड़ता है।
  92.  
  93. // @name:hr YouTube više brzina
  94. // @description:hr Dodaje gumbiće pod YouTube video s više brzina reprodukcije.
  95.  
  96. // @name:ht YouTube Plis vitès
  97. // @description:ht Ajoute bouton anba yon videyo YouTube ki gen plis vitès lèktur.
  98.  
  99. // @name:hu YouTube több fokozat
  100. // @description:hu Hozzáteszi gombok alatt egy YouTube videót, több lejátszási sebesség.
  101.  
  102. // @name:hy YouTube Լրացուցիչ արագությունների
  103. // @description:hy Ավելացնում է կոճակներ տակ YouTube տեսանյութի հետ ավելի նվագարկումը արագությամբ:
  104.  
  105. // @name:id YouTube Kecepatan Lebih
  106. // @description:id Menambahkan tombol di bawah video YouTube dengan kecepatan pemutaran lebih.
  107.  
  108. // @name:ig YouTube More gbapụrụ ọsọ
  109. // @description:ig Na-agbakwụnye, mkpọchi n'okpuru a YouTube video na ihe playback gbapụrụ ọsọ.
  110.  
  111. // @name:is YouTube Fleiri Hraðbátur
  112. // @description:is Bætir hnappana undir YouTube vídeó með fleiri spilun hraða.
  113.  
  114. // @name:it YouTube più costi
  115. // @description:it Aggiunge pulsanti sotto un video di YouTube con più velocità di riproduzione.
  116.  
  117. // @name:iw מהירויות נוספות YouTube
  118. // @description:iw הוספה לחצנים תחת סרטון YouTube עם מהירויות הפעלה נוספות.
  119.  
  120. // @name:ja YouTubeでもっとスピード
  121. // @description:ja より多くの再生速度でYouTubeの動画の下にボタンを追加します。
  122.  
  123. // @name:jw YouTube Kecepatan More
  124. // @description:jw Nambah tombol ing video YouTube karo kecepatan puter maneh liyane.
  125.  
  126. // @name:ka YouTube- ზე სიჩქარეზე
  127. // @description:ka დასძენს ღილაკები ქვეშ YouTube video უფრო აღწარმოება სიჩქარეზე.
  128.  
  129. // @name:kk YouTube Толығырақ жылдамдығын
  130. // @description:kk көп ойнату жылдамдықпен бар YouTube бейненің астында түймелерін қосады.
  131.  
  132. // @name:km គេហទំព័រ YouTube ល្បឿនបន្ថែម
  133. // @description:km បន្ថែមប៊ូតុងនៅក្រោមវីដេអូ YouTube ជាមួយល្បឿនការចាក់សារថ្មីបន្ថែមទៀត។
  134.  
  135. // @name:kn ಯೂಟ್ಯೂಬ್ ಇನ್ನಷ್ಟು ವೇಗವನ್ನು
  136. // @description:kn ಹೆಚ್ಚು ಹಿನ್ನೆಲೆ ವೇಗವನ್ನು ಹೊಂದಿರುವ YouTube ವೀಡಿಯೊ ಅಡಿಯಲ್ಲಿ ಗುಂಡಿಗಳು ಸೇರಿಸುತ್ತದೆ.
  137.  
  138. // @name:ko 유튜브 더 속도
  139. // @description:ko 더 재생 속도가 YouTube 동영상 아래에 버튼을 추가합니다.
  140.  
  141. // @name:ku YouTube Leza More
  142. // @description:ku Serkêşiya bişkokên di bin video YouTube bi Leza playback more.
  143.  
  144. // @name:ky YouTube More ылдамдыгы
  145. // @description:ky көп ойнотуу ылдамдыгы менен YouTube Video астында баскычтарын кошот.
  146.  
  147. // @name:la Magis YouTube Speeds
  148. // @description:la A YouTube video playback, cum magis per adiungit Bullae volo.
  149.  
  150. // @name:lo YouTube ຄວາມໄວເພີ່ມເຕີມ
  151. // @description:lo ເພີ່ມປຸ່ມພາຍໃຕ້ວິດີໂອ YouTube ກັບຄວາມໄວການຫຼິ້ນຫຼາຍ.
  152.  
  153. // @name:lt YouTube Daugiau Greičiai
  154. // @description:lt Prideda mygtukus pagal YouTube vaizdo įrašą su daugiau grojimo greitį.
  155.  
  156. // @name:lv YouTube Vairāk ātrumi
  157. // @description:lv Pievieno pogas zem YouTube video ar vairākiem atskaņošanas ātrumu.
  158.  
  159. // @name:mg YouTube More hafainganam-pandeha
  160. // @description:mg Manampy bokotra eo ambanin'ny lahatsary YouTube bebe kokoa playback hafainganam-pandeha.
  161.  
  162. // @name:mi YouTube tere atu
  163. // @description:mi Ka tāpiri pātene i raro i te ataata YouTube ki atu tere purei anō.
  164.  
  165. // @name:mk YouTube повеќе добива на темпо
  166. // @description:mk Додава копчиња под видео на YouTube со повеќе брзини на репродукција.
  167.  
  168. // @name:ml YouTube കൂടുതൽ വേഗത
  169. // @description:ml കൂടുതൽ പ്ലേബാക്ക് വേഗത ഒരു YouTube വീഡിയോ കീഴിൽ ബട്ടണുകൾ ചേർക്കുന്നു.
  170.  
  171. // @name:mn YouTube-ийн илүү хурдасгана
  172. // @description:mn илүү тоглуулах хурд нь YouTube-ийн видеоны дор товч нэмнэ.
  173.  
  174. // @name:mo YouTube Mai multe Vitezele
  175. // @description:mo Adaugă butoane sub un videoclip YouTube cu mai multe viteze de redare.
  176.  
  177. // @name:mr YouTube अधिक गती
  178. // @description:mr अधिक प्लेबॅक गती YouTube व्हिडिओ अंतर्गत बटणे जोडते.
  179.  
  180. // @name:ms YouTube Lebih Kelajuan
  181. // @description:ms Menambah butang di bawah video YouTube dengan lebih kelajuan main balik.
  182.  
  183. // @name:mt YouTube Veloċitajiet Aktar
  184. // @description:mt Iżżid buttuni taħt YouTube video ma veloċitajiet daqq aktar.
  185.  
  186. // @name:ne YouTube मा थप गति
  187. // @description:ne अन्तर्गत थप प्लेब्याक गति संग YouTube भिडियो बटन थप्छ।
  188.  
  189. // @name:nl YouTube Meer Snelheden
  190. // @description:nl Voegt knoppen onder een YouTube-video toe met meer afspeelsnelheden.
  191.  
  192. // @name:no YouTube Flere Hastigheter
  193. // @description:no Legger knappene under en YouTube-video med flere avspillingshastigheter.
  194.  
  195. // @name:ny YouTube imathamanga More
  196. // @description:ny Akuwonjezera mabatani pansi kanema YouTube ndi imathamanga kwambiri kubwezeretsa.
  197.  
  198. // @name:or YouTube ଅଧିକ ତୀବ୍ର କରିଥାଏ
  199. // @description:or ଅଧିକ ପ୍ଲେବ୍ୟାକ୍ ଗତିକୁ ସହିତ ଏକ YouTube ଭିଡିଓ ଅଧୀନରେ ବଟନ ଯୋଡେ।
  200.  
  201. // @name:pa YouTube 'ਹੋਰ ਗਤੀ
  202. // @description:pa ਹੋਰ ਪਲੇਅਬੈਕ ਸਪੀਡ ਨਾਲ ਇੱਕ ਯੂਟਿਊਬ ਵੀਡੀਓ ਦੇ ਅਧੀਨ ਬਟਨ ਨੂੰ ਜੋੜਦਾ ਹੈ.
  203.  
  204. // @name:pl Więcej Prędkości YouTube
  205. // @description:pl Dodaje przyciski pod wideo YouTube z większą prędkością odtwarzania.
  206.  
  207. // @name:ps یوټیوب نور سرعت
  208. // @description:ps سره نور بیاغږول سرعت یوه یوټیوب ویډیو لاندې تڼۍ زیاتوي.
  209.  
  210. // @name:ro YouTube Mai multe Vitezele
  211. // @description:ro Adaugă butoane sub un videoclip YouTube cu mai multe viteze de redare.
  212.  
  213. // @name:ru YouTube Больше Ускоряет
  214. // @description:ru Добавляет кнопки под видео на YouTube с более скоростью воспроизведения.
  215.  
  216. // @name:rw YouTube muvuduko More
  217. // @description:rw Yongeraho Utubuto munsi video YouTube na muvuduko more musomyi.
  218.  
  219. // @name:sd يوٽيوب وڌيڪ لمحو
  220. // @description:sd وڌيڪ playback لمحو سان هڪ يوٽيوب وڊيو هيٺ بٽڻ وڌائيندو آھي.
  221.  
  222. // @name:si යූ ටියුබ් තවත් වේගය
  223. // @description:si වැඩි ධාවනය වේගය සමග YouTube වීඩියෝ යටතේ බොත්තම් පවසයි.
  224.  
  225. // @name:sk YouTube Ďalší Rýchlosti
  226. // @description:sk Pridá tlačidiel pod videom na YouTube s viac rýchlostí prehrávania.
  227.  
  228. // @name:sl YouTube Več Hitrosti
  229. // @description:sl Doda gumbe pod video YouTube z več hitrostmi predvajanja.
  230.  
  231. // @name:sn YouTube More aimhanya
  232. // @description:sn Anowedzera mabhatani pasi YouTube vhidhiyo yakawanda playback aimhanya.
  233.  
  234. // @name:so YouTube Xawaaraha More
  235. // @description:so Darayaa badhamada hoos video YouTube la xawaare loo maqli dheeraad ah.
  236.  
  237. // @name:sq YouTube shumë Shpejtësi
  238. // @description:sq Shton butonat nën një video YouTube me më shumë shpejtësi rishikim.
  239.  
  240. // @name:sr ИоуТубе Море Брзине
  241. // @description:sr Додаје дугмад под ИоуТубе видео са више брзина репродукције.
  242.  
  243. // @name:st YouTube lebelo More
  244. // @description:st O phaella ka ho dikonopo tlas'a video YouTube le lebelo ho feta ho bapala.
  245.  
  246. // @name:su YouTube speeds More
  247. // @description:su Nambihan tombol di handapeun hiji video YouTube jeung speeds playback langkung.
  248.  
  249. // @name:sv YouTube Fler Hastigheter
  250. // @description:sv Lägger knapparna under en YouTube-video med fler uppspelningshastigheter.
  251.  
  252. // @name:sw YouTube Kasi Zaidi
  253. // @description:sw Anaongeza vifungo chini ya video za YouTube na kasi zaidi wa kucheza.
  254.  
  255. // @name:ta YouTube இல் மேலும் வேகங்கள்
  256. // @description:ta மேலும் பின்னணி வேகம் ஒரு YouTube வீடியோ கீழ் பொத்தான்கள் சேர்க்கிறது.
  257.  
  258. // @name:te YouTube మరింత వేగం
  259. // @description:te మరింత ప్లేబ్యాక్ వేగం తో YouTube వీడియో కింద బటన్లు జోడిస్తుంది.
  260.  
  261. // @name:tg YouTube суръати бештар
  262. // @description:tg Илова тугмаҳои зери Видео YouTube ки бо суръати бозикунии бештар.
  263.  
  264. // @name:th YouTube ความเร็วเพิ่มเติม
  265. // @description:th เพิ่มปุ่มภายใต้วิดีโอ YouTube ที่มีความเร็วในการเล่นมากขึ้น
  266.  
  267. // @name:tk YouTube köp Hızları
  268. // @description:tk has oýnalýan ýeri tizligi bilen YouTube astynda düwmelerini goşýar.
  269.  
  270. // @name:tl YouTube Higit pang mga Bilis
  271. // @description:tl Nagdadagdag ng mga pindutan sa ilalim ng isang video sa YouTube na may higit pang mga bilis ng pag-playback.
  272.  
  273. // @name:tr YouTube Daha Hızları
  274. // @description:tr Daha fazla oynatma hızı ile bir YouTube videosu altında düğmeler ekler.
  275.  
  276. // @name:tt YouTube More сцряти
  277. // @description:tt тагын уйнау тизлек белән YouTube видео буенча төймәсен өсти.
  278.  
  279. // @name:ug YouTube كۆپ سۈرئىتى
  280. // @description:ug تېخىمۇ كۆپ قويغۇچ سۈرئىتى بىلەن YouTube غا ئاستىدا كۇنۇپكىسى قوشۇلغان.
  281.  
  282. // @name:uk YouTube Більше Прискорює
  283. // @description:uk Додає кнопки під відео на YouTube з більш швидкістю відтворення.
  284.  
  285. // @name:ur YouTube کو مزید رفتار
  286. // @description:ur زیادہ پلے بیک رفتار کے ساتھ ایک YouTube ویڈیو کے نیچے بٹن جوڑتا ہے.
  287.  
  288. // @name:uz YouTube ko'proq Tezligi
  289. // @description:uz ko'proq ijro etish, tezlik bilan YouTube video ostida tugmalari qo'shadi.
  290.  
  291. // @name:vi YouTube More Tốc độ
  292. // @description:vi Thêm nút dưới một video với tốc độ phát lại hơn YouTube.
  293.  
  294. // @name:xh YouTube ngesantya More
  295. // @description:xh amaqhosha Wongeza phantsi YouTube ividiyo kunye ngezantya ngaphezulu ukudlalwa.
  296.  
  297. // @name:yi יאָוטובע מער ספּעעדס
  298. // @description:yi מוסיף קנעפּלעך אונטער אַ יאָוטובע ווידעא מיט מער פּלייבאַק ספּידז.
  299.  
  300. // @name:yo YouTube Die iyara
  301. // @description:yo Afikun awọn bọtini labẹ a YouTube fidio pẹlu diẹ sẹhin iyara.
  302.  
  303. // @name:zh YouTube上的更多速度
  304. // @description:zh 添加下一个YouTube视频与更多的播放速度按钮。
  305.  
  306. // @name:zu Ngesivinini-YouTube angeziwe
  307. // @description:zu Yengeza izinkinobho ngaphansi kwevidiyo ye-YouTube nge ngaphezulu ukudlala ngesivinini.
  308.  
  309. // @namespace https://github.com/ssssssander
  310. // @icon https://www.youtube.com/s/desktop/3748dff5/img/favicon_48.png
  311. // @author ssssssander
  312. // @homepage https://github.com/ssssssander/youtube-more-speeds
  313. // @supportURL https://github.com/ssssssander/youtube-more-speeds/issues
  314. // @match *://*.youtube.com/*
  315. // @license MIT
  316. // ==/UserScript==
  317.  
  318. // https://stackoverflow.com/questions/34077641/how-to-detect-page-navigation-on-youtube-and-modify-its-appearance-seamlessly
  319. // https://stackoverflow.com/questions/19238791/how-to-use-waitforkeyelements-to-display-information-after-select-images
  320.  
  321. (function() {
  322. 'use strict';
  323.  
  324. // BEGIN waitForKeyElements
  325. /**
  326. * A utility function for userscripts that detects and handles AJAXed content.
  327. *
  328. * Usage example:
  329. *
  330. * function callback(domElement) {
  331. * domElement.innerHTML = "This text inserted by waitForKeyElements().";
  332. * }
  333. *
  334. * waitForKeyElements("div.comments", callback);
  335. * // or
  336. * waitForKeyElements(selectorFunction, callback);
  337. *
  338. * @param {(string|function)} selectorOrFunction - The selector string or function.
  339. * @param {function} callback - The callback function; takes a single DOM element as parameter.
  340. * If returns true, element will be processed again on subsequent iterations.
  341. * @param {boolean} [waitOnce=true] - Whether to stop after the first elements are found.
  342. * @param {number} [interval=300] - The time (ms) to wait between iterations.
  343. * @param {number} [maxIntervals=-1] - The max number of intervals to run (negative number for unlimited).
  344. */
  345. function waitForKeyElements(selectorOrFunction, callback, waitOnce, interval, maxIntervals) {
  346. if (typeof waitOnce === "undefined") {
  347. waitOnce = true;
  348. }
  349. if (typeof interval === "undefined") {
  350. interval = 300;
  351. }
  352. if (typeof maxIntervals === "undefined") {
  353. maxIntervals = -1;
  354. }
  355. var targetNodes = (typeof selectorOrFunction === "function")
  356. ? selectorOrFunction()
  357. : document.querySelectorAll(selectorOrFunction);
  358.  
  359. var targetsFound = targetNodes && targetNodes.length > 0;
  360. if (targetsFound) {
  361. targetNodes.forEach(function(targetNode) {
  362. var attrAlreadyFound = "data-userscript-alreadyFound";
  363. var alreadyFound = targetNode.getAttribute(attrAlreadyFound) || false;
  364. if (!alreadyFound) {
  365. var cancelFound = callback(targetNode);
  366. if (cancelFound) {
  367. targetsFound = false;
  368. }
  369. else {
  370. targetNode.setAttribute(attrAlreadyFound, true);
  371. }
  372. }
  373. });
  374. }
  375.  
  376. if (maxIntervals !== 0 && !(targetsFound && waitOnce)) {
  377. maxIntervals -= 1;
  378. setTimeout(function() {
  379. waitForKeyElements(selectorOrFunction, callback, waitOnce, interval, maxIntervals);
  380. }, interval);
  381. }
  382. }
  383. // END waitForKeyElements
  384.  
  385. // Actual code starts here
  386. let funcDone = false;
  387. const titleElemSelector = 'div#title.style-scope.ytd-watch-metadata';
  388. const colors = ['#072525', '#287F54', '#C22544']; // https://www.schemecolor.com/wedding-in-india.php
  389. if (!funcDone) window.addEventListener('yt-navigate-start', addSpeeds);
  390.  
  391. if (document.body && !funcDone) {
  392. waitForKeyElements(titleElemSelector, addSpeeds);
  393. }
  394.  
  395. function addSpeeds() {
  396. if (funcDone) return;
  397.  
  398. let bgColor = colors[0];
  399. let moreSpeedsDiv = document.createElement('div');
  400. moreSpeedsDiv.id = 'more-speeds';
  401.  
  402. for (let i = 0.25; i < 16; i +=.25) {
  403. if (i >= 1) { bgColor = colors[1]; }
  404. if (i > 4) { i+=.75; }
  405. if (i > 8) { i++; bgColor = colors[2]; }
  406.  
  407. let btn = document.createElement('button');
  408. btn.style.backgroundColor = bgColor;
  409. btn.style.marginRight = '4px';
  410. btn.style.border = '1px solid #D3D3D3';
  411. btn.style.borderRadius = '2px';
  412. btn.style.color = '#ffffff';
  413. btn.style.cursor = 'pointer';
  414. btn.style.fontFamily = 'monospace';
  415. btn.textContent = '×' + (i.toString().substr(0, 1) == '0' ? i.toString().substr(1): i.toString());
  416. btn.addEventListener('click', () => { document.getElementsByTagName('video')[0].playbackRate = i } );
  417. moreSpeedsDiv.appendChild(btn);
  418. }
  419.  
  420. let titleElem = document.querySelector(titleElemSelector);
  421. titleElem.after(moreSpeedsDiv);
  422.  
  423. funcDone = true;
  424. }
  425. })();