Skip to content
Browse files

Remove <noscript> tags

  • Loading branch information...
1 parent 2a0ea30 commit c69c2070dba19f6c1099ae98f69f886d398065c1 @reed committed Feb 2, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/assets/javascripts/turbolinks.js.coffee
View
3 lib/assets/javascripts/turbolinks.js.coffee
@@ -79,6 +79,7 @@ constrainPageCacheTo = (limit) ->
changePage = (title, body, runScripts) ->
document.title = title
document.documentElement.replaceChild body, document.body
+ removeNoscriptTags()
executeScriptTags() if runScripts
currentState = window.history.state
triggerEvent 'page:change'
@@ -92,6 +93,8 @@ executeScriptTags = ->
parentNode.removeChild script
parentNode.insertBefore copy, nextSibling
+removeNoscriptTags = ->
+ noscript.parentNode.removeChild noscript for noscript in document.body.getElementsByTagName 'noscript'
reflectNewUrl = (url) ->
if url isnt document.location.href

0 comments on commit c69c207

Please sign in to comment.
Something went wrong with that request. Please try again.