From 7c89a3e18b336b78dd23516b7f7e5bb4d280fbfd Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 1 Nov 2024 18:51:05 +0100 Subject: [PATCH] It should be possible for editors via a gadget or Special:MyPage/common.css to hide the start and end arrows Set mw-mmv-prev-image-loop, mw-mmv-next-image-loop classes. Bug: T377791 Change-Id: If4c398274ef5b86f1220ef6ed8a8265ddebc0d6b --- resources/mmv/mmv.lightboxinterface.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/mmv/mmv.lightboxinterface.js b/resources/mmv/mmv.lightboxinterface.js index 0ded22e34..fc3494fe2 100644 --- a/resources/mmv/mmv.lightboxinterface.js +++ b/resources/mmv/mmv.lightboxinterface.js @@ -490,6 +490,8 @@ class LightboxInterface extends UiElement { this.$postDiv.css( 'top', this.$imageWrapper.height() ); } + this.buttons.$prev.toggleClass( 'mw-mmv-prev-image-loop', currentIndex === 0 ); + this.buttons.$next.toggleClass( 'mw-mmv-next-image-loop', currentIndex === imageCount - 1 ); this.buttons.setOffset( prevNextTop ); this.buttons.$nav.toggle( imageCount > 1 ); this.buttons.$currentImageNumber.show().text(