Coder Social home page Coder Social logo

marcgamesons / twitch-userscript-use-chitchat Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 50 KB

This is a userscript that replaces the chat on Twitch with an embed of https://chitchat.ma.pe/

License: MIT License

JavaScript 100.00%
twitch chitchat userscript javascript tampermonkey bookmarklet

twitch-userscript-use-chitchat's Introduction

Use Chit Chat

This is a userscript that replaces the chat on Twitch with an embed of Chit Chat by mape.

Bookmarklet

Instead of downloading a UserScript you can create a bookmarklet. To do so you need to:

  1. Copy the code below
javascript:(function()%7B%2F%2F%20Get%20the%20container%20that%20contains%20the%20chat%20messages.%0Aconst%20chatContainer%20%3D%20document.querySelector(%22.chat-list--default%22)%3B%0A%0A%2F%2F%20Delete%20all%20child%20nodes.%0Awhile%20(chatContainer.firstChild)%20%7B%0A%20%20%20%20chatContainer.removeChild(chatContainer.firstChild)%3B%0A%7D%0A%0A%2F%2F%20Create%20an%20iframe%20and%20load%20ChitChat%20into%20it%0Aconst%20chatFrame%20%3D%20document.createElement(%22iframe%22)%3B%0Aconst%20casterURL%20%3D%20window.location.pathname.split('%2F')%3B%0A%2F%2F%20chatFrame.id%20%3D%20%22ChitChatFrame%22%3B%0AchatFrame.setAttribute(%22src%22%2C%20%22https%3A%2F%2Fchitchat.ma.pe%2F%22%20%2B%20casterURL%5B1%5D)%3B%0AchatFrame.style.width%20%3D%20%22100%25%22%3B%0AchatFrame.style.height%20%3D%20%2299%25%22%3B%0A%0A%2F%2F%20Append%20the%20iframe%20to%20the%20container%20that%20contains%20the%20chat%20messages.%0AchatContainer.appendChild(chatFrame)%3B%7D)()%3B
  1. Create a new bookmark.
  2. Paste the code into the URL field of the bookmark.
  3. Name the bookmark whatever you want. (e.g. "Replace Twitch Chat with ChitChat")
  4. Navigate to the stream you want to watch.
  5. Click on the bookmarklet to replace chat with ChitChat. To undo just reload the page.

Installation

  1. Make sure that you have installed the Tampermonkey browser extension. You can get it on tampermonkey.net.
  2. Install the userscript by clicking this link.

Usage

After installing the script make sure that it is enabled. It will then replace the chat automatically.

Chit Chat is still not loading

Make sure that your browser or third party extensions don't block cookies nor local storage data.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.