parent
ae52c158c3
commit
058aeaa54e
|
@ -3,8 +3,12 @@ ext {
|
|||
extClass = '.Hiperdex'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://hiperdex.com'
|
||||
overrideVersionCode = 11
|
||||
overrideVersionCode = 12
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
||||
dependencies {
|
||||
implementation project(':lib:randomua')
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@ import android.content.SharedPreferences
|
|||
import android.widget.Toast
|
||||
import androidx.preference.EditTextPreference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.lib.randomua.addRandomUAPreferenceToScreen
|
||||
import eu.kanade.tachiyomi.lib.randomua.getPrefCustomUA
|
||||
import eu.kanade.tachiyomi.lib.randomua.getPrefUAType
|
||||
import eu.kanade.tachiyomi.lib.randomua.setRandomUserAgent
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
|
@ -30,6 +34,10 @@ class Hiperdex :
|
|||
|
||||
override val client = super.client.newBuilder()
|
||||
.addInterceptor(::domainChangeIntercept)
|
||||
.setRandomUserAgent(
|
||||
preferences.getPrefUAType(),
|
||||
preferences.getPrefCustomUA(),
|
||||
)
|
||||
.build()
|
||||
|
||||
private var lastDomain = ""
|
||||
|
@ -102,6 +110,7 @@ class Hiperdex :
|
|||
}
|
||||
}
|
||||
screen.addPreference(baseUrlPref)
|
||||
addRandomUAPreferenceToScreen(screen)
|
||||
}
|
||||
|
||||
private var SharedPreferences.baseUrlHost
|
||||
|
|
Loading…
Reference in New Issue