forked from railsbridge/bridge_troll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defer font tracking css script until after initial page load
earlier today i saw the page load being blocked on retrieving hello.myfonts.net and it made me mad enough to make this commit
- Loading branch information
1 parent
accd9b9
commit 9b0f435
Showing
4 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<% if Rails.env.production? %> | ||
$(document).ready(function () { | ||
var fontTracking = document.createElement('link'); | ||
fontTracking.type = 'text/css'; | ||
fontTracking.rel = 'stylesheet'; | ||
fontTracking.href = '//hello.myfonts.net/count/262127'; | ||
document.getElementsByTagName('head')[0].appendChild(fontTracking); | ||
}); | ||
<% end %> |
5 changes: 0 additions & 5 deletions
5
app/assets/stylesheets/_fonts.css.scss.erb → app/assets/stylesheets/_fonts.css.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters