daily pastebin goal
58%
SHARE
TWEET

YOUBOT - ULTIMATE BOT FOR YOUTUBE

a guest Apr 17th, 2018 1,054 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Youbot - Ultimate bot for Youtube Live Chat
  3. // @namespace    https://www.youtube.com/channel/UCBa4OhFqpM858HG8ZwKWo3A
  4. // @version      1.0
  5. // @description  Extension pour envoyer des messages colorés, afficher votre compteur d'abonnés sous le chat, envoyer des liens vers des vidéos dans le chat et pleins d'autres options.
  6. // @author       Le Boss du YouTube Game
  7. // @run-at       document-end
  8. // @match        https://www.youtube.com/*
  9. // @match        https://gaming.youtube.com/*
  10. // @noframes
  11. // @grant        none
  12. // ==/UserScript==
  13. //
  14. //
  15. //
  16. // You can put your api Key and your Client ID here.
  17. ///////////////////////////////////////////////////
  18. var apiKey='';
  19. var clientId='';
  20. ///////////////////////////////////////////////////
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. function loadScript(){
  39. var script = document.createElement("script");
  40. script.id='ybscript';
  41. script.setAttribute('charset','utf-8');
  42. script.setAttribute("data-clientId",clientId);
  43. script.setAttribute("data-apikey",apiKey);
  44. script.src="https://dl.dropboxusercontent.com/s/egeegdzbi4f2bob/youbot.js";
  45. document.body.appendChild(script);}
  46.  
  47. function waitForDoc(){
  48. if(document.readyState =="complete"){
  49. setTimeout(function(){
  50. if (document.documentElement.outerHTML.match(/\"ytd\-live\-chat\-frame\"/) && !document.URL.match(/live\_chat/)) {
  51. waitForChat();return false;
  52. }else{
  53. loadScript();return false;
  54. }},5000);
  55. }
  56. else{setTimeout(function(){waitForDoc();},100);}
  57. }
  58. function waitForChat(){
  59. if((document.getElementById("chatframe")!==null && document.getElementById("chatframe").contentWindow.document.getElementById("picker-buttons")!==null) || (document.getElementById("live-chat-iframe") !==null && document.getElementById("live-chat-iframe").contentWindow.document.getElementById("picker-buttons")!==null)){
  60. loadScript();return false;}
  61. else{setTimeout(function(){waitForChat();},100);}
  62. }
  63. if (document.readyState !=="complete") {
  64. waitForDoc();
  65. }
  66. else {
  67. if (document.documentElement.outerHTML.match(/\"ytd\-live\-chat\-frame\"/) && !document.URL.match(/live\_chat/)) {
  68. waitForChat();
  69. }else{
  70. loadScript();
  71. }
  72. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top