diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index 7ba245bcd..ff7357ad4 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -4,6 +4,7 @@ import android.util.Base64 import androidx.annotation.Keep import io.legado.app.constant.AppConst.dateFormat import io.legado.app.help.http.SSLHelper +import io.legado.app.help.http.CookieStore import io.legado.app.model.analyzeRule.AnalyzeUrl import io.legado.app.utils.* import org.jsoup.Connection @@ -119,6 +120,13 @@ interface JsExtensions { .execute() } + /** + *js实现读取cookie + */ + fun getCookie(tag: String): String { + return CookieStore.getCookie(tag) + } + /** * js实现解码,不能删 */