Greasy Fork is available in English.

Preserve focus

When re-focusing page content, return focus to element that was active before blur, instead of root element.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

ผู้เขียน
myf
จำนวนติดตั้งประจำวัน
0
จำนวนติดตั้งทั้งหมด
29
คะแนน
0 0 0
เวอร์ชัน
1.0
สร้างเมื่อ
14-06-2021
อัปเดตเมื่อ
14-06-2021
Size
989 ไบต์
สัญญาอนุญาต
ไม่มี
ปรับใช้กับ
ไซต์ทั้งหมด

This always drove me nuts: having focused element in mid-page and switching away from the page (to URL bar for example), browser gives me zero means to quickly return to same element without painfully tabbing again.

This super simple script fixes it: when returning focus to the page, it moves it last focused element.

(I think this is what browsers should do by default.)