Created
April 30, 2015 20:24
-
-
Save parkerproject/ce81946a9f4828f5a9d9 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/mosofujeve
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| var _fragment = document.createDocumentFragment(); | |
| var _contents = _fragment.appendChild(document.createElement('noscript')); | |
| var _iframe = document.createElement('iframe'); | |
| var _src = document.createAttribute('src'); | |
| var _height = document.createAttribute('height'); | |
| var _width = document.createAttribute('width'); | |
| var _style = document.createAttribute('style'); | |
| _src.nodeValue = '//www.googletagmanager.com/ns.html?id=GTM-NTQLMT'; | |
| _height.nodeValue = 0; | |
| _width.nodeValue = 0; | |
| _style.nodeValue = 'display:none;visibility:hidden'; | |
| _iframe.setAttributeNode(_src); | |
| _iframe.setAttributeNode(_height); | |
| _iframe.setAttributeNode(_width); | |
| _iframe.setAttributeNode(_style); | |
| _contents.appendChild(_iframe); | |
| console.log(_fragment); | |
| //var _body = document.getElementById("body"); | |
| document.body.insertBefore(_iframe, document.body.firstChild); | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var _fragment = document.createDocumentFragment(); | |
| var _contents = _fragment.appendChild(document.createElement('noscript')); | |
| var _iframe = document.createElement('iframe'); | |
| var _src = document.createAttribute('src'); | |
| var _height = document.createAttribute('height'); | |
| var _width = document.createAttribute('width'); | |
| var _style = document.createAttribute('style'); | |
| _src.nodeValue = '//www.googletagmanager.com/ns.html?id=GTM-NTQLMT'; | |
| _height.nodeValue = 0; | |
| _width.nodeValue = 0; | |
| _style.nodeValue = 'display:none;visibility:hidden'; | |
| _iframe.setAttributeNode(_src); | |
| _iframe.setAttributeNode(_height); | |
| _iframe.setAttributeNode(_width); | |
| _iframe.setAttributeNode(_style); | |
| _contents.appendChild(_iframe); | |
| console.log(_fragment); | |
| //var _body = document.getElementById("body"); | |
| document.body.insertBefore(_iframe, document.body.firstChild);</script></body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var _fragment = document.createDocumentFragment(); | |
| var _contents = _fragment.appendChild(document.createElement('noscript')); | |
| var _iframe = document.createElement('iframe'); | |
| var _src = document.createAttribute('src'); | |
| var _height = document.createAttribute('height'); | |
| var _width = document.createAttribute('width'); | |
| var _style = document.createAttribute('style'); | |
| _src.nodeValue = '//www.googletagmanager.com/ns.html?id=GTM-NTQLMT'; | |
| _height.nodeValue = 0; | |
| _width.nodeValue = 0; | |
| _style.nodeValue = 'display:none;visibility:hidden'; | |
| _iframe.setAttributeNode(_src); | |
| _iframe.setAttributeNode(_height); | |
| _iframe.setAttributeNode(_width); | |
| _iframe.setAttributeNode(_style); | |
| _contents.appendChild(_iframe); | |
| console.log(_fragment); | |
| //var _body = document.getElementById("body"); | |
| document.body.insertBefore(_iframe, document.body.firstChild); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment