MediaWiki:Gadget-AbsyFancyBoxy.js: различия между версиями
Ланселот (обсуждение | вклад) Нет описания правки |
Ланселот (обсуждение | вклад) Нет описания правки |
||
| Строка 141: | Строка 141: | ||
captionElement.id = 'absyfancyboxy-caption'; | captionElement.id = 'absyfancyboxy-caption'; | ||
stage.appendChild( captionElement ); | stage.appendChild( captionElement ); | ||
fileLink = document.createElement( 'a' ); | |||
fileLink.id = 'absyfancyboxy-filelink'; | |||
fileLink.textContent = 'оригинал'; | |||
fileLink.setAttribute( 'role', 'link' ); | |||
fileLink.setAttribute( 'tabindex', '0' ); | |||
fileLink.setAttribute( 'target', '_blank' ); | |||
fileLink.setAttribute( 'rel', 'noopener noreferrer' ); | |||
fileLink.addEventListener( 'click', function ( e ) { | |||
e.stopPropagation(); | |||
} ); | |||
stage.appendChild( fileLink ); | |||
counterElement = document.createElement( 'div' ); | counterElement = document.createElement( 'div' ); | ||
| Строка 163: | Строка 175: | ||
} ); | } ); | ||
overlay.appendChild( closeBtn ); | overlay.appendChild( closeBtn ); | ||
prevBtn = makeArrow( 'prev', '‹' ); | prevBtn = makeArrow( 'prev', '‹' ); | ||