MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tags: Manual revert Reverted
Line 276: Line 276:
    var imageLabel = currentIndex + '/' + totalImages + ' IMAGES';
    var imageLabel = currentIndex + '/' + totalImages + ' IMAGES';
    $('#article-content .article-label-image').text(imageLabel); // Update or set the label text
    $('#article-content .article-label-image').text(imageLabel); // Update or set the label text
}
    function setShowArticleRotationEffect() {
const offset = 20;
const showArticle = document.querySelector('#show-article');
    const h = showArticle.clientHeight;
    const theta = -Math.atan(offset/h);
const a = Math.cos(theta);
const b = Math.sin(theta);
const c = -Math.sin(theta);
const d = Math.cos(theta);
const showArticleBefore = document.querySelector('#show-article-before');
const transformValue = 'matrix('+a+','+b+','+c+','+d+',0,0)';
showArticleBefore.style.transform = transformValue;
}
}


Line 511: Line 497:
function closeModal() {
function closeModal() {
    showArticleWrapper.hide();
    showArticleWrapper.hide();
}
    function setShowArticleRotationEffect() {
const offset = 20;
const showArticle = document.querySelector('#show-article');
    const h = showArticle.clientHeight;
    const theta = -Math.atan(offset/h);
const a = Math.cos(theta);
const b = Math.sin(theta);
const c = -Math.sin(theta);
const d = Math.cos(theta);
const showArticleBefore = document.querySelector('#show-article-before');
const transformValue = 'matrix('+a+','+b+','+c+','+d+',0,0)';
showArticleBefore.style.transform = transformValue;
}
}


Navigation menu