Created
February 21, 2016 06:34
-
-
Save corysimmons/a69accfb822e0d76dfce to your computer and use it in GitHub Desktop.
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
rl.on('line', function (line) { | |
if (line.match(/rel="stylesheet"/)) { | |
var newLine = line.replace(/(.*)/, '$1<script> </script>'); | |
ws.write(newLine + '\n', 'utf8', function () { | |
console.log(1) | |
}); | |
} else { | |
ws.write(line + '\n', 'utf8', function () { | |
console.log(2) | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment