This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
return-youtube-dislikes
patch (#81)
* feat: update dislike button text * refactor(ryd): remove unused code * refactor: create patch class for ryd * refactor: move VideoInformation
- Loading branch information
Showing
11 changed files
with
76 additions
and
188 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
app/src/main/java/app/revanced/integrations/patches/ReturnYouTubeDislikesPatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package app.revanced.integrations.patches; | ||
|
||
import java.util.concurrent.atomic.AtomicReference; | ||
|
||
import app.revanced.integrations.ryd.ReturnYouTubeDislikes; | ||
|
||
/** | ||
* Used by app.revanced.patches.youtube.layout.returnyoutubedislikes.patch.RYDPatch | ||
*/ | ||
public class ReturnYouTubeDislikesPatch { | ||
|
||
/** | ||
* Called when the video id changes | ||
*/ | ||
public static void newVideoLoaded(String videoId) { | ||
ReturnYouTubeDislikes.newVideoLoaded(videoId); | ||
} | ||
|
||
/** | ||
* Called when a litho text component is created | ||
*/ | ||
public static void onComponentCreated(Object conversionContext, AtomicReference<Object> textRef) { | ||
ReturnYouTubeDislikes.onComponentCreated(conversionContext, textRef); | ||
} | ||
|
||
/** | ||
* Called when the like/dislike button is clicked | ||
* @param vote -1 (dislike), 0 (none) or 1 (like) | ||
*/ | ||
public static void sendVote(int vote) { | ||
ReturnYouTubeDislikes.sendVote(vote); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sponsorblock/player/VideoInformation.java → ...rations/videoplayer/VideoInformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.