|
|
@ -104,6 +104,21 @@ function renameInsightsDropdown() { |
|
|
|
const dropdown = select('.reponav-item.reponav-dropdown'); |
|
|
|
if (dropdown) { |
|
|
|
dropdown.firstChild.textContent = 'More '; |
|
|
|
} else { |
|
|
|
// GHE doesn't have the Insights dropdown currently, so create a dropdown
|
|
|
|
const moreDropdown = <div class="reponav-dropdown js-menu-container"> |
|
|
|
<button type="button" class="btn-link reponav-item reponav-dropdown js-menu-target " data-no-toggle="" aria-expanded="false" aria-haspopup="true">More <svg aria-hidden="true" class="octicon octicon-triangle-down v-align-middle text-y" height="11" version="1.1" viewBox="0 0 12 16" width="8"><path fill-rule="evenodd" d="M0 5l6 6 6-6z"></path></svg></button> |
|
|
|
<div class="dropdown-menu-content js-menu-content"> |
|
|
|
<div class="dropdown-menu dropdown-menu-sw"></div> |
|
|
|
</div> |
|
|
|
</div>; |
|
|
|
|
|
|
|
const settingsTab = select('[data-selected-links~="repo_settings"]'); |
|
|
|
if (settingsTab) { |
|
|
|
settingsTab.parentNode.insertBefore(moreDropdown, settingsTab); |
|
|
|
} else { |
|
|
|
select('.reponav').appendChild(moreDropdown); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -559,10 +574,10 @@ async function onDomReady() { |
|
|
|
if (pageDetect.isRepo()) { |
|
|
|
gitHubInjection(window, () => { |
|
|
|
hideEmptyMeta(); |
|
|
|
renameInsightsDropdown(); |
|
|
|
addReleasesTab(); |
|
|
|
removeProjectsTab(); |
|
|
|
addCompareLink(); |
|
|
|
renameInsightsDropdown(); |
|
|
|
addTitleToEmojis(); |
|
|
|
addReadmeButtons(); |
|
|
|
|
|
|
|