4 ms·
Another option for this is to use a “redacted” font like https://github.com/christiannaths/redacted-font https://github.com/christiannaths/redacted-font I can'
by dspillett 4y ago
Another option for this is to use a “redacted” font like https://github.com/christiannaths/redacted-font https://github.com/christiannaths/redacted-font
I can't find it ATM, but I used to have a bookmarklet that added one of these as a css style on all elements (or removed its edits when run a second time, to revert the page). Shouldn't be too hard to write if I decide I want it again and still can't find the source of the one used back then. It didn't watch for and update dynamic content changes, but was useful for quick “mock-up” screenshots. The only problem was that the character widths won't quite match (or might be massively different from) the font the page is currently using though no doubt there are things that could be done to improve that. It relied on the font being installed locally, but it wouldn't be beyond the wit of man to make it load a web font or include it as a data block in the bookmarklet.
- Vinnl 4y agoYeah, a bookmarklet should work pretty well too, although indeed needs the font installed locally or requests going out to another sever. The advantage of the extension in that sense is that it includes the font locally and has a keyboard shortcut. Someone else also mentioned that font, so I logged that here: https://gitlab.com/vincenttunru/obfuscate/-/issues/2 https://gitlab.com/vincenttunru/obfuscate/-/issues/2
- dylan604 4y agoBut in the course of prepping screen shots with obfuscated text for use wherever, would the cost of hitting an additional server for a font be that bad? It's not like the whole webpage is not allowed to render because of this post-render user initiated change to specifically mess with the text.
- Vinnl 4y agoNot that bad, depending on your value system, but I like not sending more requests to e.g. Google's servers. But of course, definitely use the bookmarklet if you prefer that over my extension!
- zhfliz 4y agofont injection using a remote server is also problematic due to CSP
- dspillett 4y agoThat sort of font is small enough that it could probably be encoded in the bookmarklet¹, and inserted into the target page's styling via a data Uri. Extra steps, but it would remove the need for the font to be locally available otherwise or requested from elsewhere. [1] I'm not sure want the limits on those are on modern browsers, the length that would work varied quite a bit back in the day. It was small in IE (<2K?) though I'm not sure IE of the time I'm remembering the bookmark referred to previously supported fonts loaded that way anyway.
- Vinnl 4y agoYeah good point! If I was starting this now I might've gone the bookmarklet route. Alas, I've got an extension now :)
- tyingq 4y agoMaybe a little dangerous, though, because laypersons might save/share a pdf of the page and think it's fine.
- myfonj 4y agoI have quite similar bookrmarklet that actually walks whole DOM and scrambles text nodes and attributes: [1] ([2] for convenient installation) I've picked 'medium shade (U+2592)' character [3] as visual counterpart, because if felt it has similar "weight" as average glyph. It does not store original values so the only only way to revert it back is to reload page. [1] https://gist.github.com/myfonj/3bdb6bbacd3b080938716495d8989c19 https://gist.github.com/myfonj/3bdb6bbacd3b080938716495d8989... [2] https://myfonj.github.io/utils/bookmarklets/dummyze-scramble-obfuscate-greek-page-content.html https://myfonj.github.io/utils/bookmarklets/dummyze-scramble... [3] https://graphemica.com/%E2%96%92 https://graphemica.com/%E2%96%92