pull/79/head
kunfei 5 years ago
parent 3b3c3961c3
commit 890e1b465d
  1. 10
      app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt

@ -85,17 +85,11 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application),
} }
fun clHtml(content: String): String { fun clHtml(content: String): String {
return if (content.contains("<style>|style=".toRegex())) { return """<style>
content
} else {
"""
<style>
img{max-width:100% !important; width:auto; height:auto;} img{max-width:100% !important; width:auto; height:auto;}
video{object-fit:fill; max-width:100% !important; width:auto; height:auto;} video{object-fit:fill; max-width:100% !important; width:auto; height:auto;}
body{word-wrap:break-word; height:auto;max-width: 100%; width:auto;} body{word-wrap:break-word; height:auto;max-width: 100%; width:auto;}
</style>$content </style>$content"""
"""
}
} }
override fun onInit(status: Int) { override fun onInit(status: Int) {

Loading…
Cancel
Save