您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Prevents accidental Ctrl+W from closing current tab while you are typing something (input/textarea tag is active). You can change the whit list of websites (on which this script will be "enabled").
Prevents accidental Ctrl+W from closing current tab while you are typing something (input/textarea tag is active). You can change the white list of websites (on which this script will be "enabled").
Notes:
- The script is started on all websites, but actually does anything meaningful only on the websites from the whitelist. You can change this behavior if needed.
- I tried using it with DuckDuckGo, and it prompts on each search query after pressing Enter/search button is pressed. It will probably become really annoying really quickly, so I removed it. Since the search query (or a post request when I was publishing this script) triggers the same event, I don't know if this can be excluded somehow. Probably can be checked if a button is the active/clicked element, but I'm not sure if pressing Enter can be fixed. Maybe with some script-global variable that can be changed when pressing the Enter key.