User:NovaFlare/common.js

From Brickipedia, the LEGO Wiki

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* debug */
var lh = $('.LeftBox.MPBoxesSecondRow').height();
var rh = $('.RightBox.MPBoxesSecondRow').height();

$('#ltext').html(lh);
$('#rtext').html(rh);

/* Make each box in a row on the main page the same height as others on the same row */
var SecondRowLeftBox = $('.LeftBox.MPBoxesSecondRow').height();
var SecondRowRightBox = $('.RightBox.MPBoxesSecondRow').height();
if (SecondRowLeftBox > SecondRowRightBox) {
    $('.RightBox.MPBoxesSecondRow .RightTop').css({'height':($('.LeftBox.MPBoxesSecondRow').height() - $('.RightBox.MPBoxesSecondRow .RightBottom').height() - 14)+'px'});
} else {
    $('.LeftBox.MPBoxesSecondRow').css({'height':($('.RightBox.MPBoxesSecondRow').height())+'px'});
}