Browse files

copy noscript tag list by slicing so that removeNoscriptTags works wi…

…th multiple noscript tags.

in google chrome 24.0.1312.57 the tag list changes while we iterate over it and delete tags.
in order to make this function work with multiple no script tags we have to copy the original tag list.
  • Loading branch information...
1 parent 3cb983c commit 9ae50b474b6a02bd33d5a7a1c20500e8c117a974 Lion Vollnhals committed Feb 20, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/assets/javascripts/
@@ -94,7 +94,8 @@ executeScriptTags = ->
parentNode.insertBefore copy, nextSibling
removeNoscriptTags = ->
- noscript.parentNode.removeChild noscript for noscript in document.body.getElementsByTagName 'noscript'
+ noscriptTags = document.body.getElementsByTagName 'noscript'
+ noscript.parentNode.removeChild noscript for noscript in noscriptTags
reflectNewUrl = (url) ->
if url isnt document.location.href

0 comments on commit 9ae50b4

Please sign in to comment.