MediaWiki:MoveArticleStates.js
Chú ý: Sau khi lưu trang, có thể bạn sẽ phải xóa bộ nhớ đệm của trình duyệt để xem các thay đổi.
- Firefox / Safari: Nhấn giữ phím Shift trong khi nhấn Tải lại (Reload), hoặc nhấn tổ hợp Ctrl-F5 hay Ctrl-R (⌘R trên Mac)
- Google Chrome: Nhấn tổ hợp Ctrl-Shift-R (⇧⌘R trên Mac)
- Internet Explorer / Edge: Nhấn giữ phím Ctrl trong khi nhấn Làm tươi (Refresh), hoặc nhấn tổ hợp Ctrl-F5
- Opera: Nhấn tổ hợp Ctrl-F5.
function moveArticleStates() {
var spacing = 10, coordPadding = 0, tagCoord, tagDoM;
if (document.getElementById) {
tagCoord = document.getElementById("geoCoord");
tagDoM = document.getElementById("DoM");
if (tagDoM != null) {
coordPadding = ( /* tagDoM.getElementsByTagName("img").length */ + 2) * 28 + spacing;
/* The styles of template:Title-icon and template:Title-icons must be rewritten to count the images */
tagDoM.style.zIndex = 2;
}
if (tagCoord != null) tagCoord.style.paddingRight = coordPadding + 'px';
}
}
$(moveArticleStates);