message: Preserve whitespace option on previous/next navigation
diff: @@ -379,6 +379,25 @@ function addDiffViewWithoutWhitespaceOption() {
  );
  }
  +// When navigating with next/previous in review mode, preserve whitespace option.
  +function preserveWhitespaceOptionInNav() {
  + const navLinks = select.all('.commit > .BtnGroup.float-right > a.BtnGroup-item');
  + if (navLinks.length === 0) {
  + return;
  + }
  +
  + const url = new URL(location.href);
  + const hidingWhitespace = url.searchParams.get('w') === '1';
  +
  + if (hidingWhitespace) {
  + for (const a of navLinks) {
  + const linkUrl = new URL(a.href);
  + linkUrl.searchParams.set('w', '1');
  + a.href = linkUrl;
  + }
  + }
  +}
  +
  function addMilestoneNavigation() {
  select('.repository-content').insertAdjacentElement('beforeBegin',
  <div class="subnav">
  @@ -601,6 +620,7 @@ async function onDomReady() {
  observeEl(diffElements, removeDiffSignsAndWatchExpansions, {childList: true, subtree: true});
  }
  addDiffViewWithoutWhitespaceOption();
  + preserveWhitespaceOptionInNav();
  }
  if (pageDetect.isPR() || pageDetect.isIssue() || pageDetect.isCommit()) {
  