Skip to content

Commit

Permalink
Keep original page title when GH button is rendered.
Browse files Browse the repository at this point in the history
  • Loading branch information
simi committed Jul 13, 2022
1 parent b6e6fc2 commit 1ffd775
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 1ffd775

Please sign in to comment.