Hacker News new | ask | show | jobs
by ionfish 5682 days ago
Just for you: https://gist.github.com/725354
1 comments

I was thinking about something like:

    meta=document.querySelector('meta[name=viewport]')
    meta.parentNode.removeChild(meta)
Thanks anyway for your quick response!
Obviously that's fine for your use-case where the querySelector function is available, but it wouldn't work e.g. on Internet Explorer. My version is also more robust when dealing with markup errors, i.e. when there's more than one viewport meta element.