Sleazy Fork is available in English.

Let's panda!

一個用於exhentai和e-hentai的登入、查看、下載的工具

< 腳本Let's panda!的回應

評論:正評 - 腳本一切正常

§
發表於:2024-08-27

When I add a new comment (by clicking [Post New Comment]), the page automatically refreshes after entering characters in the text box. After some investigation, it seems that this issue is caused by the script. This bug needs to be fixed.

§
發表於:2024-08-27
document.addEventListener("keydown", async (e) => {
          // ignore key combinations
          if (e.altKey || e.shiftKey || e.ctrlKey || e.metaKey) {
            return;
          }

          var view_all = await GM.getValue("view_all", true);

          if (view_all === true) {
            return;
          }


          if (e.code === "ArrowLeft" || e.code === "KeyA") {
            e.preventDefault();
            childNodes[0].click();
          }

          if (e.code === "ArrowRight" || e.code === "KeyD") {
            e.preventDefault();
            childNodes[childNodes.length - 1].click();
          }
        })

When adding a new comment, I noticed that typing in the text box triggers a page refresh. After investigating, I found that this issue is caused by a script that sets up shortcut keys for navigation. However, these shortcuts should not be triggered while typing in the text box. The bug needs to be fixed to prevent this behavior.

You should add the following:

// Check if the current focus is on an input or textarea element
if (document.activeElement.tagName === "INPUT" || document.activeElement.tagName === "TEXTAREA") {
  return;
}
§
發表於:2024-08-28

Completed

MINO作者
§
發表於:2024-10-25

Thanks for your help

發表回覆

登入以回復