Greasy Fork is available in English.

Replace Twitch Player with Kick (Bajindo Only)

Fully replaces Twitch's video player with Bajindo's Kick stream, ensuring video loads correctly.

  1. // ==UserScript==
  2. // @name Replace Twitch Player with Kick (Bajindo Only)
  3. // @namespace https://kick.com/
  4. // @version 2.0
  5. // @description Fully replaces Twitch's video player with Bajindo's Kick stream, ensuring video loads correctly.
  6. // @author YourName
  7. // @match https://www.twitch.tv/bajindo
  8. // @grant GM_addStyle
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const kickUsername = "bajindo"; // Kick streamer username
  16.  
  17. function replaceTwitchWithKick() {
  18. // Find Twitch player area
  19. const twitchVideoContainer = document.querySelector('div[data-a-target="video-player"]');
  20. if (!twitchVideoContainer) return;
  21.  
  22. // Prevent multiple replacements
  23. if (document.getElementById('kick-embed-container')) return;
  24.  
  25. // Remove all existing Twitch player elements
  26. twitchVideoContainer.innerHTML = '';
  27.  
  28. // Ensure the container is properly sized
  29. twitchVideoContainer.style.display = "flex";
  30. twitchVideoContainer.style.justifyContent = "center";
  31. twitchVideoContainer.style.alignItems = "center";
  32. twitchVideoContainer.style.width = "100%";
  33. twitchVideoContainer.style.height = "100%";
  34.  
  35. // Create Kick iframe
  36. const kickEmbed = document.createElement('iframe');
  37. kickEmbed.id = 'kick-embed-container';
  38. kickEmbed.src = `https://player.kick.com/${kickUsername}`;
  39. kickEmbed.allowFullscreen = true;
  40.  
  41. // Force full fit
  42. kickEmbed.style.width = "100%";
  43. kickEmbed.style.height = "100%";
  44. kickEmbed.style.border = "none";
  45.  
  46. // Insert Kick iframe
  47. twitchVideoContainer.appendChild(kickEmbed);
  48. }
  49.  
  50. // Run the function once Twitch loads
  51. setTimeout(replaceTwitchWithKick, 3000);
  52.  
  53. // Observe Twitch’s dynamic changes to replace player when needed
  54. const observer = new MutationObserver(replaceTwitchWithKick);
  55. observer.observe(document.body, { childList: true, subtree: true });
  56.  
  57. })();