diff --git a/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js b/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js index 28b916d4e..aa7168434 100644 --- a/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js +++ b/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js @@ -225,7 +225,7 @@ // @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com // @author Adam Lui // @namespace https://github.com/adamlui -// @version 2024.12.23.1 +// @version 2024.12.23.2 // @license MIT // @icon https://media.autoclearchatgpt.com/images/icons/openai/black/icon48.png?a8868ef // @icon64 https://media.autoclearchatgpt.com/images/icons/openai/black/icon64.png?a8868ef @@ -568,7 +568,8 @@ modals.dragHandlers.draggableElem = event.currentTarget modals.dragHandlers.draggableElem.style.cursor = 'grabbing' event.preventDefault(); // prevent sub-elems like icons being draggable - ['mousemove', 'mouseup'].forEach(event => document.addEventListener(event, modals.dragHandlers[event])) + ['mousemove', 'mouseup'].forEach(eventType => + document.addEventListener(eventType, modals.dragHandlers[eventType])) const draggableElemRect = modals.dragHandlers.draggableElem.getBoundingClientRect() modals.dragHandlers.offsetX = event.clientX - draggableElemRect.left +21 modals.dragHandlers.offsetY = event.clientY - draggableElemRect.top +12 @@ -584,8 +585,8 @@ mouseup() { // remove listeners, reset modals.dragHandlers.draggableElem modals.dragHandlers.draggableElem.style.cursor = 'inherit'; - ['mousemove', 'mouseup'].forEach(event => - document.removeEventListener(event, modals.dragHandlers[event])) + ['mousemove', 'mouseup'].forEach(eventType => + document.removeEventListener(eventType, modals.dragHandlers[eventType])) modals.dragHandlers.draggableElem = null } },