Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
支持6.85.0屏蔽追番时出现的广告
Browse files Browse the repository at this point in the history
  • Loading branch information
zerorooot committed Aug 21, 2022
1 parent 410b3d7 commit c92d622
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "github.zerorooot.fuckbilibilivote"
minSdk 24
targetSdk 32
versionCode 8
versionName "4.1.3"
versionCode 9
versionName "4.1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true">

<meta-data
android:name="xposedmodule"
android:value="true" />
Expand Down
22 changes: 19 additions & 3 deletions app/src/main/java/github/zerorooot/fuckbilibilivote/Xposed.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package github.zerorooot.fuckbilibilivote

import android.R.attr.classLoader
import de.robv.android.xposed.IXposedHookLoadPackage
import de.robv.android.xposed.XC_MethodHook
import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.XposedHelpers
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam
import org.json.JSONArray
import org.json.JSONObject


Expand Down Expand Up @@ -35,17 +35,33 @@ class Xposed : IXposedHookLoadPackage {
}

if (result.toString().contains("command_dms")) {
param.result = null
XposedHelpers.callMethod(param.thisObject, "clearVideoGuide")
print.put("command_dms", myLog.getDmsLog(result))
}

if (printInfo != print.toString()) {
if (print.length() != 0 && printInfo != print.toString()) {
XposedBridge.log(print.toString())
printInfo = print.toString()
}

}
})

//番剧出现的广告,https://b23.tv/ep508404,21:52秒左右
//com.bilibili.bangumi.remote.http.server.RemoteLogicService getOperationCardList
//6.85.0
XposedHelpers.findAndHookMethod("com.bilibili.bangumi.remote.http.impl.f",
lpparam.classLoader,
"q",
Long::class.javaPrimitiveType,
Int::class.javaPrimitiveType,
object : XC_MethodHook() {
@Throws(Throwable::class)
override fun afterHookedMethod(param: MethodHookParam) {
param.result = null
}
})

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ class ExampleUnitTest {

@Test
fun tt() {
val number = "21"
println(Integer.valueOf(number, 8))

val valueOf = Integer.valueOf(number, 8)
val toHexString = Integer.toHexString(valueOf)
println(toHexString)
val print = JSONObject()
println(print.length())
}

@Test
Expand Down

0 comments on commit c92d622

Please sign in to comment.