Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

support to external javascript.

  • Loading branch information...
commit 549237868215b6869529713c3a9da9a45ee295e0 1 parent f71cd8c
@hsbt hsbt authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 plugin/00default.rb
View
7 plugin/00default.rb
@@ -372,9 +372,14 @@ def js_url
end
def script_tag
+ require 'uri'
query = script_tag_query_string
html = @javascripts.sort.map {|script|
- %Q|<script src="#{js_url}/#{script}#{query}" type="text/javascript"></script>|
+ if URI(script).scheme
+ %Q|<script src="#{script}" type="text/javascript"></script>|
+ else
+ %Q|<script src="#{js_url}/#{script}#{query}" type="text/javascript"></script>|
+ end
}.join( "\n\t" )
html << "\n" << <<-HEAD
<script type="text/javascript"><!--
Please sign in to comment.
Something went wrong with that request. Please try again.