No9 / harmon

middleware for node-http-proxy to modify the remote website response with trumpet
Other
424 stars 62 forks source link

rotate.js creates malformed HTML #16

Closed GuyPaddock closed 9 years ago

GuyPaddock commented 9 years ago

The example replaces the <head> tag with a style tag. I am guessing that the outer parameter should be false, or the tag should be included in the content that's added.

No9 commented 9 years ago

sorry forgot about this. Yes your right so I fixed it.

tarkeshwars commented 9 years ago

Hey @No9! I was trying the rotate example. It still replaces all the contents inside the head tag. Is it just me or the example isn't fixed?

No9 commented 9 years ago

Hi @tarkeshwars Yes it replaces all the content inside the head but not the head tag itself. That was the issue here. If you want an example of how you can manipulate the contents of a tag see https://github.com/No9/harmon/blob/master/examples/doge.js

Thanks

tarkeshwars commented 9 years ago

My bad! But the rotate example has confusing comments. I think they should be fixed. I got around to looking at the doge file and that was exactly what I needed. So thanks :)

On Sun, Jul 19, 2015, 12:43 AM Anton Whalley notifications@github.com wrote:

Hi @tarkeshwars https://github.com/tarkeshwars Yes it replaces all the content inside the head but not the head tag itself. That was the issue here. If you want an example of how you can manipulate the contents of a tag see https://github.com/No9/harmon/blob/master/examples/doge.js

Thanks

— Reply to this email directly or view it on GitHub https://github.com/No9/harmon/issues/16#issuecomment-122581410.