Greasy Fork is available in English.

Twitter image viewing enhancement

Make Twitter photo viewing more humane

ของเมื่อวันที่ 04-03-2020 ดู เวอร์ชันล่าสุด

ผู้เขียน
神代綺凛
คะแนน
0 0 0
เวอร์ชัน
0.5.0
สร้างเมื่อ
27-07-2019
อัปเดตเมื่อ
04-03-2020
สัญญาอนุญาต
MIT
ปรับใช้กับ

Let you able to close an image view by clicking it, and use your mouse wheel or mouse drag to switch between the previous image or the next one.

If your Twitter language is not Simplified Chinese

Please press F12 to open the developer tools, and follow the operations shown in the figure to get the aria-label values of the Close, Previous, and Next buttons.

Then click "Set aria-labels" from the script menu, join the values of the three aria-labels with commas, input and confirm.

Why

Because the class names of the elements in the Twitter page are obfuscated, as long as Twitter updates its front end, the class names of the element will change. Because the page structure also changes frequently, it is impossible to find a CSS selector that can always locate these buttons.

So I had no choice to use this method that may trouble users. But a good news is that unless Twitter changes the value of aria-label, you will no longer need to update this script or reset the setting of aria-labels.