Twitter image viewing enhancement

Make Twitter photo viewing more humane

2020-04-10 일자. 최신 버전을 확인하세요.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
개발자
神代綺凛
평점
0 0 0
버전
0.5.3
생성
2019-07-27
갱신
2020-04-10
크기
4.58KB
라이선스
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 one of English, Japanese, Simplified Chinese, Traditional 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 these three aria-label with commas, input and submit.

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 will be changed. Because the page structure also changes frequently, it is impossible to find a CSS selector that can always locate these buttons without aria-label attribute.

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 update the setting of aria-labels.