diff --git a/stable.user.js b/stable.user.js index 482d0b9..6c8057c 100755 --- a/stable.user.js +++ b/stable.user.js @@ -2031,6 +2031,21 @@ } appedtTo.appendChild(mainDiv) // THE FINAL APPEND + const xButton = CreateNodeWithText(mainDiv, '❌', 'div') + const xButtonSize = 20 + SetStyle(xButton, { + position: 'absolute', + height: xButtonSize + 'px', + top: 0, + width: xButtonSize + 'px', + left: width - xButtonSize + 'px', + cursor: 'pointer', + }) + xButton.addEventListener('mousedown', e => { + e.stopPropagation() + mainDiv.parentNode.removeChild(mainDiv) + }) + // setting some events // addEventListener(window, 'scroll', function () { // mainDiv.style.top = (pageYOffset + startFromTop) + 'px';