Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Commit

Permalink
Remove <noscript> tags
Browse files Browse the repository at this point in the history
  • Loading branch information
reed committed Feb 2, 2013
1 parent 2a0ea30 commit c69c207
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/assets/javascripts/turbolinks.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit c69c207

Please sign in to comment.