Page MenuHomePhabricator

Provide 'lite' version of mobile site
Closed, DuplicatePublic

Description

For non-JS users it should be possible to view a text only mode of the mobile site.
e.g http://lite.wikipedia.org

this would be useful for certain devices (e.g. monochromatic screens) and could be a viable non-JS alternative if we stopped showing content beyond the lead section

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson subscribed.

@GWicke could be use Parsoid to do this e.g. store a text only version of content (with links) ? Is this doable now?

@Jdlrobson, this is indeed relatively easy to do with Parsoid HTML / RESTBase. Yesterday we added logic in @bearND's app service to massage Parsoid HTML, including a function to remove transclusion content and extensions. Once all the content you don't want to include in the plain text content is removed, you can get the text with `.textContent`.

Thanks @GWicke for the feedback! Now I just need to work out how we can make that available to the skin system...

Removing transclusion is not necessarily a good idea as templates are often used to format article content (e.g. a lot of wikis have templates like {{ko|some Koran text...}} which adds the appropriate lang attribute in an editor-friendly way). Same for extensions - we would probably not want to get rid of cites, for example. Or there is the Poem extension, used heavily in Wikisource.

@Tgr, normally only the content produced by specific templates is removed, not all of them. The parameter information is also available, so it could be even more selective where needed.