Skip to content

Commit

Permalink
Merge pull request #3143 from rubygems/ignore-title-gh-btn
Browse files Browse the repository at this point in the history
Keep original page title when GH button is rendered.
  • Loading branch information
simi authored Jul 13, 2022
2 parents 51bb318 + 1ffd775 commit 1c95151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/github_buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Source: https://github.com/mdo/github-buttons/blob/7c1da76484288ce76fa061362fc1c1f0db1f6553/src/js.js
* Modification: Changed params to read attributes from data-params
* Execute only when .github-btn exists
* Remove title update (mdo/github-buttons@cbf5395b)
*/

if ($(".github-btn").length) {
Expand Down Expand Up @@ -166,7 +167,6 @@ if ($(".github-btn").length) {
}

button.setAttribute('aria-label', title + LABEL_SUFFIX);
document.title = title + LABEL_SUFFIX;

// Change the size if requested
if (size === 'large') {
Expand All @@ -185,4 +185,4 @@ if ($(".github-btn").length) {
jsonp(API_URL + 'repos/' + user + '/' + repo);
}
})();
}
}

0 comments on commit 1c95151

Please sign in to comment.