3 ms·
It should be fairly straightforward (1 line of JavaScript required to actually get the job done) to make a user-script, or even a browser extension that obliter
by err4nt 4y ago
It should be fairly straightforward (1 line of JavaScript required to actually get the job done) to make a user-script, or even a browser extension that obliterates any offending `<meta>` tag like this. Something like:
document.querySelectorAll('meta[name="viewport"][content*="user-scalable=no"]').forEach(tag => tag.remove())
And if you wanted to get really fancy, you could use window.setInterval or a Mutation Observer to watch for any dynamically generated `<meta>` tags and continue to remove them forever if they every show up.
While it's not ideal to have to use a snippet or an extension, you could fix this for yourself (or individual web users) in a way that 'fixed' literally every site on the internet for that person. So I wonder if that's a viable route to a solution!
- account42 4y agoWouldn't this remove the meta tag entirely and thus completely disable responsive rendering on mobile browsers, reverting to emulating a larger viewport.
- err4nt 4y agoThis particular snippet would remove it entirely - if instead you had a default value you'd like to always apply to a tag if it's found, the code would be equivalently simple but just a little different.