Pregunta

I want to use typekit in a sproutcore app, which means I should add following javascript to my mainpage tag:

<script type="text/javascript" src="http://use.typekit.com/jfg6pfv.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

How do I do this in sproutcore?

¿Fue útil?

Solución

Create a file named "resources/page_javascript.rhtml":

<% content_for("page_javascript") do %>
  <script type="text/javascript" src="http://use.typekit.com/jfg6pfv.js"></script>
  <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<% end %>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top