Created
March 8, 2017 19:57
-
-
Save GingerBear/641f36fc175def0ca7eba477f86d9ed0 to your computer and use it in GitHub Desktop.
inject js to ios that put catch
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
document.querySelector('#printLink').addEventListener('click', function() { | |
var iframe = document.querySelector('.printLink-iframe'); | |
if (!iframe) { | |
iframe = document.createElement('div'); | |
iframe.style.display = 'none'; | |
iframe.classList.add('printLink-iframe'); | |
} | |
iframe.innerHTML = '<iframe src="/printLink-iframe"></iframe>'; | |
document.body.appendChild(iframe); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment