mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-26 04:28:31 +00:00
4.20.11
* 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:
parent
ced61d2bfc
commit
22c60050e0
17 changed files with 356 additions and 96 deletions
|
@ -105,8 +105,8 @@ export class Tooltip {
|
|||
if ( this.options.manual ) {
|
||||
// Do nothing~!
|
||||
} else if ( this.live || this.elements.size > 5 ) {
|
||||
parent.removeEventListener('mouseover', this._onMouseOver);
|
||||
parent.removeEventListener('mouseout', this._onMouseOut);
|
||||
this.parent.removeEventListener('mouseover', this._onMouseOver);
|
||||
this.parent.removeEventListener('mouseout', this._onMouseOut);
|
||||
} else
|
||||
for(const el of this.elements) {
|
||||
el.removeEventListener('mouseenter', this._onMouseOver);
|
||||
|
@ -119,6 +119,7 @@ export class Tooltip {
|
|||
this.hide(tip);
|
||||
|
||||
el[this._accessor] = null;
|
||||
el._ffz_tooltip = null;
|
||||
}
|
||||
|
||||
this.elements = null;
|
||||
|
@ -205,12 +206,18 @@ export class Tooltip {
|
|||
target = tip.target;
|
||||
|
||||
this.elements.add(target);
|
||||
target._ffz_tooltip = tip;
|
||||
|
||||
// Set this early in case content uses it early.
|
||||
tip._promises = [];
|
||||
tip.waitForDom = () => tip.element ? Promise.resolve() : new Promise(s => {tip._promises.push(s)});
|
||||
tip.update = () => tip._update(); // tip.popper && tip.popper.scheduleUpdate();
|
||||
tip.show = () => this.show(tip);
|
||||
tip.show = () => {
|
||||
let tip = target[this._accessor];
|
||||
if ( ! tip )
|
||||
tip = target[this._accessor] = {target};
|
||||
this.show(tip);
|
||||
};
|
||||
tip.hide = () => this.hide(tip);
|
||||
tip.rerender = () => {
|
||||
if ( tip.visible ) {
|
||||
|
@ -385,6 +392,10 @@ export class Tooltip {
|
|||
if ( this.live && this.elements )
|
||||
this.elements.delete(tip.target);
|
||||
|
||||
if ( tip.target._ffz_tooltip === tip )
|
||||
tip.target._ffz_tooltip = null;
|
||||
|
||||
tip.target[this._accessor] = null;
|
||||
tip._update = tip.rerender = tip.update = noop;
|
||||
tip.element = null;
|
||||
tip.visible = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue