From 62453c85816fa763213e1f736031ef4b2f78a609 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Mon, 23 Dec 2024 10:12:45 -0800 Subject: [PATCH] =?UTF-8?q?Renamed=20`event`=20args=20of=20`forEach`=20loo?= =?UTF-8?q?ps=20in=20`modals.handlers.drag`=20type=20methods=20to=20`event?= =?UTF-8?q?Type`=20for=20better=20clarity=20=E2=86=9E=20[auto-sync=20from?= =?UTF-8?q?=20https://github.com/adamlui/ai-web-extensions]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autoclear-chatgpt-history.user.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 } },