From 9ada3dbee6eec4d5a9ed0eab0680c58052fc2973 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Mon, 26 Oct 2020 20:46:03 +0100 Subject: [PATCH] #94 Detect closed tooltip --- src/javascript/enhancements/anilyr.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/javascript/enhancements/anilyr.js b/src/javascript/enhancements/anilyr.js index 76db373..dc6ecbf 100644 --- a/src/javascript/enhancements/anilyr.js +++ b/src/javascript/enhancements/anilyr.js @@ -14,7 +14,10 @@ export function init() { function observeScreenshotTooltip(tooltip) { let observer = new MutationObserver(mutations => { mutations.forEach(mutation => { - + // Switched to invisible + if(!mutation.oldValue.includes('display: none') && mutation.target.style.display == 'none') { + console.log('SCREENSHOT TOOLTIP CLOSED'); + } }); });