This is week 21 and 22 of 2019. In my recent work, I need to access a phpBB forum. A very old code base that use table layout and doesn’t have mobile friendly CSS. By using the WKWebView in iOS, I can inject CSS to change the loaded HTML. Specifically, I apply the following style:
- Make the wrapper `100vw` width.
- Turn `td` into block element.
- Apply image `max-width` to 100%.
- Adjust font-size to fit mobile reading.
I also inject JavaScript to auto login for me, so that I can access the content right after I launch the app, without any further inputs and taps.
|