MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 364: Line 364:
     
     
    // End of openModal
    // End of openModal
    console.log($('#show-article').clientHeight);
    console.log($('#show-article-before').clientHeight);
    console.log(document.querySelector('#show-article').clientHeight);
    // New End of openModal
}
}


Line 426: Line 422:
}
}
function foo(which_foo) {
console.log(which_foo);
    console.log($('#show-article').clientHeight);
    console.log($('#show-article-before').clientHeight);
    console.log(document.querySelector('#show-article').clientHeight);
    // New End of openModal
}


     // Delegate the mousedown event for both block view and list view pages
     // Delegate the mousedown event for both block view and list view pages
Line 433: Line 436:
    }
    }
    openModal(this, event); // Pass the event object to openModal
    openModal(this, event); // Pass the event object to openModal
    foo(1);
});
});
$('#show-article-wrapper').on('mousedown', '.related-article', function(event) {
$('#show-article-wrapper').on('mousedown', '.related-article', function(event) {
    openModal(this, event); // Call openModal when a related-article is clicked
    openModal(this, event); // Call openModal when a related-article is clicked
    foo(2);
});
});


Navigation menu