User:Shaundd/common.js

From Wikivoyage
Jump to navigation Jump to search

Note: After publishing, 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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*  code to move breadcrumb to directly on top of pagebanner */
$(".topbanner").wrap("<div class='bannerwrap'></div>");
$(".bannerwrap").prepend($("#contentSub"));
$(".topbanner").closest("#mw-content-text").children("#geoCoord").css({"top":"25px"});
$(".topbanner").css({"top":"-25px"});
$(".bannerwrap").height( $(".topbanner").height() + $("#contentSub").height() );

/* Old code for putting an outline around the breadcrumb (Not needed now)
$(".topbanner").closest(".mw-body").find("#contentSub").css({"border":"1px solid #aaa", "background-color":"#f9f9f9", "padding":"0.5em", "border-radius":"4px"});
*/