1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-17 10:16:57 +00:00

Hide Vodcasts & Host Button (#353)

* Fix occasional vanishing of stream card uptime, avatar and other info

* Additionally fix routing issues with the modified avatar div

* Add hide vodcast functionality

* Add `vuedraggable` to dependencies

* Remove LegacyAPI

* Add host button with aut-host management menu

Messy code, but it works.

* Only add `disabled` class to button if chat connection isn't there

* Fix for host button not updating it's text properly after un-/hosting

* Add tooltip to host button and use alternative way to get the chat inst.

* Rework host button stuff into new metadata

All is functional, even though the code might be a mess.

* Implement Auto-Host settings tab

* Fix reassignment to const, hehe

* Custom TMI events for Host and Unhost, plus use existing chat connection

* Code adjustments, disabling the button when host is loading, etc.

* Address code-review suggestions

Translation support and a few other fixes

* Remove inline styling

* Show error in tooltip if hosting didn't work properly or similar issues

* Address change requests

* Fix mixup

* Fix host options not having a background

* Fix styling for the host options

This adds a small border

* Hide host button on own channel

* Fix popper

* Move `isChannelHosted` method further up

* Adjust handle of auto host menu and fix vodcast hiding

* Replace loading icon with text

* Add setting for host button; Also another small issue

* Fix joining your own channel multiple times
This commit is contained in:
Lordmau5 2017-12-14 05:43:56 +01:00 committed by Mike
parent ac35ee5fab
commit 941aab9feb
11 changed files with 767 additions and 367 deletions

View file

@ -428,6 +428,18 @@ export default class ChatHook extends Module {
}
}
const old_host = this.onHostingEvent;
this.onHostingEvent = function (e, _t) {
t.emit('tmi:host', e, _t);
return old_host.call(i, e, _t);
}
const old_unhost = this.onUnhostEvent;
this.onUnhostEvent = function (e, _t) {
t.emit('tmi:unhost', e, _t);
return old_unhost.call(i, e, _t);
}
this.postMessage = function(e) {
const original = this._wrapped;
if ( original ) {