From f415d2b9e32d3c998859ed7558ae97d8a16c6191 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Mon, 23 Dec 2024 10:13:10 -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 --- .../chatgpt-auto-refresh/chatgpt-auto-refresh.user.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js b/chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js index 47da4e02c..3a4a03cdf 100644 --- a/chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js +++ b/chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js @@ -220,7 +220,7 @@ // @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT. // @author Adam Lui // @namespace https://github.com/adamlui -// @version 2024.12.23.1 +// @version 2024.12.23.2 // @license MIT // @icon https://media.chatgptautorefresh.com/images/icons/openai/black/icon48.png?c56f963 // @icon64 https://media.chatgptautorefresh.com/images/icons/openai/black/icon64.png?c56f963 @@ -607,7 +607,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 @@ -623,8 +624,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 } },