revanced-patches/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/resource/patch/SponsorBlockResourcePatch.kt

116 lines
4.9 KiB
Kotlin
Raw Normal View History

feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
package app.revanced.patches.youtube.layout.sponsorblock.resource.patch
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.impl.ResourceData
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
2022-08-03 03:53:35 +02:00
import app.revanced.patcher.patch.annotations.DependsOn
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
import app.revanced.patcher.patch.impl.ResourcePatch
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import app.revanced.patches.youtube.misc.mapping.patch.ResourceMappingResourcePatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.youtube.misc.settings.framework.components.impl.Preference
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
import app.revanced.util.resources.ResourceUtils
2022-08-22 04:58:17 +02:00
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
import app.revanced.util.resources.ResourceUtils.copyResources
import app.revanced.util.resources.ResourceUtils.copyXmlNode
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
@Name("sponsorblock-resource-patch")
@SponsorBlockCompatibility
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class, ResourceMappingResourcePatch::class])
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
@Version("0.0.1")
class SponsorBlockResourcePatch : ResourcePatch() {
companion object {
internal var reelButtonGroupResourceId: Long = 0
}
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
override fun execute(data: ResourceData): PatchResult {
val youtubePackage = "com.google.android.youtube"
SettingsPatch.addPreference(
Preference(
StringResource("sb_settings", "SponsorBlock"),
Preference.Intent(
youtubePackage,
"sponsorblock_settings",
"com.google.android.libraries.social.licenses.LicenseActivity"
),
StringResource("revanced_sponsorblock_settings_summary", "SponsorBlock related settings"),
)
)
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
val classLoader = this.javaClass.classLoader
/*
merge SponsorBlock strings to main strings
*/
2022-08-22 04:58:17 +02:00
data.mergeStrings("sponsorblock/host/values/strings.xml")
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
/*
merge SponsorBlock drawables to main drawables
*/
arrayOf(
ResourceUtils.ResourceGroup(
"layout",
"inline_sponsor_overlay.xml",
"new_segment.xml",
"skip_sponsor_button.xml"
),
ResourceUtils.ResourceGroup(
// required resource for back button, because when the base APK is used, this resource will not exist
"drawable",
"ic_sb_adjust.xml",
"ic_sb_compare.xml",
"ic_sb_edit.xml",
"ic_sb_logo.xml",
"ic_sb_publish.xml",
"ic_sb_voting.xml"
),
ResourceUtils.ResourceGroup(
// required resource for back button, because when the base APK is used, this resource will not exist
"drawable-xxxhdpi", "quantum_ic_skip_next_white_24.png"
)
).forEach { resourceGroup ->
data.copyResources("sponsorblock", resourceGroup)
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
}
/*
merge xml nodes from the host to their real xml files
*/
// copy nodes from host resources to their real xml files
val hostingResourceStream =
classLoader.getResourceAsStream("sponsorblock/host/layout/youtube_controls_layout.xml")!!
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
val targetXmlEditor = data.xmlEditor["res/layout/youtube_controls_layout.xml"]
"RelativeLayout".copyXmlNode(
data.xmlEditor[hostingResourceStream],
targetXmlEditor
).also {
val children = targetXmlEditor.file.getElementsByTagName("RelativeLayout").item(0).childNodes
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
// Replace the startOf with the voting button view so that the button does not overlap
for (i in 1 until children.length) {
val view = children.item(i)
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
// Replace the attribute for a specific node only
if (!(view.hasAttributes() && view.attributes.getNamedItem("android:id").nodeValue.endsWith("live_chat_overlay_button"))) continue
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
// voting button id from the voting button view from the youtube_controls_layout.xml host file
val votingButtonId = "@+id/voting_button"
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
view.attributes.getNamedItem("android:layout_toStartOf").nodeValue = votingButtonId
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
break
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
}
}.close() // close afterwards
reelButtonGroupResourceId = ResourceMappingResourcePatch.resourceMappings.single {
it.type == "id" && it.name == "reel_persistent_edu_button_group"
}.id
feat: `sponsorblock` patch (#101) * chore(release): 2.5.1-dev.1 [skip ci] ## [2.5.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.0...v2.5.1-dev.1) (2022-06-30) ### Bug Fixes * freezing panels when watching video in fullscreen ([#89](https://github.com/revanced/revanced-patches/issues/89)) ([f5d4f6c](https://github.com/revanced/revanced-patches/commit/f5d4f6c3419916c6a9cf67babc6be8a64c854d3b)) * invalid version in compatibility annotation ([#90](https://github.com/revanced/revanced-patches/issues/90)) ([df43547](https://github.com/revanced/revanced-patches/commit/df435475cdd0494a1e4ea9e2980c2998c9bc7048)) * feat: migrate to breaking changes of patcher * chore(release): 2.6.0-dev.1 [skip ci] # [2.6.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.5.1-dev.1...v2.6.0-dev.1) (2022-07-02) ### Features * migrate to breaking changes of patcher ([a116852](https://github.com/revanced/revanced-patches/commit/a11685263fb2274c67684258e73c5247502cb010)) * refactor: add package for fingerprints * feat: partial `sponsorblock` patch * feat: add `Name` annotation to `sponsorblock-resource-patch` * fix: `sponsorblock-resource-patch` * refactor: remove unused resources * refactor: remove `locale-config-fix` dependency * fix: broken fingerprints * feat: general fixes on `sponsorblock` patch * feat: more fixes on `sponsorblock` patch * feat: update `sponsorblock` patch to 17.26.35 * style: use better wording and fix spelling mistakes * fix: finish `sponsorblock` patch Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
2022-07-18 01:17:03 +02:00
return PatchResultSuccess()
}
}