I am using turbolink (rails4) and the following js link is generated by the application.js file in the header section of my pages.
<script data-turbolinks-track="true" src="/assets/jquery.js?body=1"></script> <script data-turbolinks-track="true" src="/assets/jquery_ujs.js?body=1"></script> <script data-turbolinks-track="true" src="/assets/turbolinks.js?body=1"></script> <script data-turbolinks-track="true" src="/assets/global.js?body=1"></script>
My application.js looks something like this:
//= require jquery //= require jquery_ujs //= require turbolinks //= require_tree . //= require bootstrap.min.js //= require respond.min.js
I want to add an external javascript file from another site, for example. http://otherdomain.com/xyz.js on the page of the special site of my site. Suppose I want to add this external js file ONLY to the page with the description http://mysite.com/profile And I want to add this js file ONLY to the title of the page. So, how can I do this? Please, it is not recommended to save this external file locally, as this is not an option for me.
source share