Content deleted by creator due to lemmy.ml tolerating brigades from hexbear

  • fiat_lux@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Huh, thankyou for introducing me to Eruda, this is a nice looking tool. I wouldn’t install it as a plugin just for this, but luckily you don’t need to. Do not use this tool on any page where you’re entering information or viewing private info though, these are dangerous powertools and allowing plugins to do arbitrary JS evaluation is like not using a safety guard.

    This should work though:

    1. Make a new bookmark on mobile Firefox
    2. Paste as the location: javascript:(function () { var script = document.createElement('script'); script.src="https://cdn.jsdelivr.net/npm/eruda"; document.body.append(script); script.onload = function () { eruda.init(); } })();

    This loads Eruda scoped to that tab only from their CDN, which hopefully limits possible damage it can do.

    Here is what you need Eruda to do: const naughtyMetaTag = document.head.querySelectorAll('meta[name="viewport"]'); !!naughtyMetaTag ?? naughtyMetaTag[0].setAttribute('content', '');

    It will fail silently if it doesn’t find the tag with the name viewport, otherwise it will empty the contents of it and you’ll be able to zoom.

    The much safer alternative is to use Android’s built in accessibility zoom functionality for this specific task though, to be honest.

    Edit: on second thought, we can avoid Eruda altogether for this task. I haven’t tested this at all but try bookmarking this instead javascript:(function () { const naughtyMetaTag = document.head.querySelectorAll('meta[name="viewport"]'); !!naughtyMetaTag ?? naughtyMetaTag[0].setAttribute('content', ''); })(); and visiting it when on a bad page. Much safer and worth trying first.