1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00
* Added: Setting to disable Channel Hosting.
* Added: Setting to hide streams tagged as Promoted from the directory.
* Fixed: Tool-tips not appearing when an element is open in fullscreen.
* Fixed: Bug when destroying a tool-tip instance.
* Fixed: Directory cards not updating with FFZ features on the front page.

* API Added: `Subpump` module for manipulating Twitch PubSub events.
* API Changed: Add-Ons can now define custom settings profile filters.
This commit is contained in:
SirStendec 2020-07-18 15:44:02 -04:00
parent ced61d2bfc
commit 22c60050e0
17 changed files with 356 additions and 96 deletions

View file

@ -59,16 +59,30 @@ export default class TooltipProvider extends Module {
this.types.text = target => sanitize(target.dataset.title);
this.types.html = target => target.dataset.title;
this.onFSChange = this.onFSChange.bind(this);
}
onEnable() {
const container = document.querySelector('.sunlight-root') || document.querySelector('#root>div') || document.querySelector('#root') || document.querySelector('.clips-root') || document.body;
window.addEventListener('fullscreenchange', this.onFSChange);
// is_minimal = false; //container && container.classList.contains('twilight-minimal-root');
this.tips = new Tooltip(container, 'ffz-tooltip', {
this.container = container;
this.tip_element = container;
this.tips = this._createInstance(container);
this.on(':cleanup', this.cleanup);
}
_createInstance(container) {
return new Tooltip(container, 'ffz-tooltip', {
html: true,
i18n: this.i18n,
live: true,
delayHide: this.checkDelayHide.bind(this),
delayShow: this.checkDelayShow.bind(this),
@ -99,10 +113,20 @@ export default class TooltipProvider extends Module {
this.emit(':leave', target, tip, event);
}
});
this.on(':cleanup', this.cleanup);
}
onFSChange() {
const tip_element = document.fullscreenElement || this.container;
if ( tip_element !== this.tip_element ) {
this.tips.destroy();
this.tip_element = tip_element;
this.tips = this._createInstance(tip_element);
}
}
cleanup() {
this.tips.cleanup();
}