MediaWiki:Common.js: различия между версиями

Нет описания правки
Метка: отменено
Нет описания правки
Метка: отменено
Строка 45: Строка 45:
     });
     });
}
}
mw.hook('ext.popups.render').add(function(popup, data) {
    const title = data.title;
    getPageImage(title, 200).then(imgUrl => {
        if (imgUrl) {
            const imgElem = document.createElement('img');
            imgElem.className = 'pageimage';
            imgElem.src = imgUrl;
            popup.querySelector('.mwe-popups-container').prepend(imgElem);
        }
    });
});