Skip to content

Commit e0ebe4c

Browse files
committed
shortcut icon => icon
follows up ea52c02 and 7941b6c Fixes "undefined" error. TBH I'm not sure whether "favicon reload" is working as intended, but at least no error is happening now...
1 parent 37f8470 commit e0ebe4c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

assets/javascripts/application.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ $(document).ready(function () {
103103
// Make sure tabs don't get ugly focus borders when active
104104
$('.group_tabs').on('focus', 'a', function () { $(this).blur(); });
105105

106-
var favicon_path = $('link[rel="shortcut icon"]').attr('href');
106+
var favicon_path = $('link[rel="icon"]').attr('href');
107107
$('.group_tabs').on('click', 'a', function () {
108108
if (!$(this).parent().hasClass('active')) {
109109
$('.group_tabs a').parent().removeClass('active');
@@ -114,8 +114,8 @@ $(document).ready(function () {
114114

115115
// Force favicon reload - otherwise the location change containing anchor would drop the favicon...
116116
// Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
117-
$('link[rel="shortcut icon"]').remove();
118-
$('head').append('<link rel="shortcut icon" type="image/png" href="' + favicon_path + '" />');
117+
$('link[rel="icon"]').remove();
118+
$('head').append('<link rel="icon" type="image/png" href="' + favicon_path + '" />');
119119
};
120120
return false;
121121
});

0 commit comments

Comments
 (0)