Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 775 Bytes

File metadata and controls

43 lines (31 loc) · 775 Bytes

Change the default branch on the Repository tab

Change the default branch on the Repository tab.
リポジトリタブのデフォルトブランチを変更します。

Setting

Path Pattern

None

Insert Position

Head of all pages

Code

JavaScript

$(function() {
  // Note: Specify the branch name you want to default to.
  const branchName = '3.3-stable';
  const repositoryTabLink = $('#main-menu a.repository');
  
  repositoryTabLink.attr('href', repositoryTabLink.attr('href') + '?rev=' + encodeURIComponent(branchName));
});

Result

result