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

Remove <noscript> tags - Fixes #176 #177

Merged
merged 1 commit into from Feb 3, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/assets/javascripts/turbolinks.js.coffee
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