Skip to content

Commit d5ec257

Browse files
committed
Use indexOf instead of startsWith for Chrome (issue ruby#48).
* It appears startsWith / endsWith were added in ES 6. Gecko apparently supports this already.
1 parent 6d6bbd6 commit d5ec257

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascripts/page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var Page = {
44
var current_page = location.pathname;
55

66
$("div.site-links a").each(function(i) {
7-
if (current_page.startsWith($(this).attr('href'))) {
7+
if (current_page.index_of($(this).attr('href')) == 0) {
88
$(this).css('font-weight', 'bold');
99
}
1010
});

0 commit comments

Comments
 (0)