Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
feat(twitter): grey theme(replaces lightsout), og app name (#6)
Browse files Browse the repository at this point in the history
### Features

* **twitter:** grey theme(replaces lightsout), og app name ([94e38ac](94e38ac))
  • Loading branch information
IndusAryan authored Jan 31, 2024
1 parent e86a296 commit 2c2dbc1
Show file tree
Hide file tree
Showing 18 changed files with 524 additions and 44 deletions.
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# 1.0.0 (2024-01-31)
# [1.1.0-dev.1](https://github.com/IndusAryan/twitter-patches/compare/v1.0.0...v1.1.0-dev.1) (2024-01-31)


### Bug Fixes

* **twitter:** more better description ([d843199](https://github.com/IndusAryan/twitter-patches/commit/d843199fd2d286760fb6420f471bdc73778c2650))


### Features

* **twitter:** app wide material theme (replaces dim) ([6ef89ae](https://github.com/IndusAryan/twitter-patches/commit/6ef89ae9c6a2aa48ea08fc61114ca249a1469e90))
* **twitter:** grey theme(replaces lightsout), og app name ([94e38ac](https://github.com/IndusAryan/twitter-patches/commit/94e38ac5b03b2dfc8f7c4ce9cc1dae0436a26e54))

# [1.0.0-dev.3](https://github.com/IndusAryan/twitter-patches/compare/v1.0.0-dev.2...v1.0.0-dev.3) (2024-01-31)

### Features

* **twitter:** app wide material theme (replaces dim) ([b1446d2](https://github.com/IndusAryan/twitter-patches/commit/b1446d2a39b50e796d022a0a852fd188cc1ac94c))
* **twitter:** grey theme(replaces lightsout), og app name ([94e38ac](https://github.com/IndusAryan/twitter-patches/commit/94e38ac5b03b2dfc8f7c4ce9cc1dae0436a26e54))

# [1.0.0-dev.2](https://github.com/IndusAryan/twitter-patches/compare/v1.0.0-dev.1...v1.0.0-dev.2) (2024-01-31)

Expand Down
64 changes: 32 additions & 32 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
software and other kinds of works.

The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
to take away indus freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee indus freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
indus programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
Expand All @@ -26,7 +26,7 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you
To protect indus rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
Expand All @@ -37,7 +37,7 @@ freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.

Developers that use the GNU GPL protect your rights with two steps:
Developers that use the GNU GPL protect indus rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

Expand Down Expand Up @@ -155,22 +155,22 @@ same work.

All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
conditions are met. This License explicitly affirms indus unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
content, constitutes a covered work. This License acknowledges indus
rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
convey, without conditions so long as indus license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
for you must do so exclusively on indus behalf, under indus direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
indus copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
Expand All @@ -189,7 +189,7 @@ circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
users, indus or third parties' legal rights to forbid circumvention of
technological measures.

4. Conveying Verbatim Copies.
Expand Down Expand Up @@ -229,7 +229,7 @@ terms of section 4, provided that you also meet all of these conditions:

d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
interfaces that do not display Appropriate Legal Notices, indus
work need not make them do so.

A compilation of a covered work with other separate and independent
Expand Down Expand Up @@ -262,7 +262,7 @@ in one of these ways:
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
more than indus reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.

Expand Down Expand Up @@ -351,7 +351,7 @@ apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option
When you convey a copy of a covered work, you may at indus option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
Expand Down Expand Up @@ -408,27 +408,27 @@ the above requirements apply either way.

You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
modify it is void, and will automatically terminate indus rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

However, if you cease all violation of this License, then your
However, if you cease all violation of this License, then indus
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
finally terminates indus license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is
Moreover, indus license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
indus receipt of the notice.

Termination of your rights under this section does not terminate the
Termination of indus rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
this License. If indus rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

Expand All @@ -441,7 +441,7 @@ to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
covered work, you indicate indus acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.

Expand Down Expand Up @@ -505,8 +505,8 @@ available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
actual knowledge that, but for the patent license, indus conveying the
covered work in a country, or indus recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

Expand All @@ -524,7 +524,7 @@ conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
to the third party based on the extent of indus activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
Expand All @@ -542,7 +542,7 @@ otherwise be available to you under applicable patent law.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
covered work so as to satisfy simultaneously indus obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
Expand Down Expand Up @@ -583,7 +583,7 @@ to choose that version for the Program.

Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
author or copyright holder as a result of indus choosing to follow a
later version.

15. Disclaimer of Warranty.
Expand Down Expand Up @@ -637,7 +637,7 @@ the "copyright" line and a pointer to where the full notice is found.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
(at indus option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand All @@ -658,16 +658,16 @@ notice like this when it starts in an interactive mode:
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
parts of the General Public License. Of course, indus program's commands
might be different; for a GUI interface, you would use an "about box".

You should also get your employer (if you work as a programmer) or school,
You should also get indus employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
The GNU General Public License does not permit incorporating indus program
into proprietary programs. If indus program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To start using this template, follow these steps:
1. [Create a new repository using this template](https://github.com/new?template_name=revanced-patches-template&template_owner=ReVanced)
2. Set up the [build.gradle.kts](build.gradle.kts) file (Match the [group of the project](build.gradle.kts#L8), [manifest attributes](build.gradle.kts#L35-L43), and the [POM](build.gradle.kts#L84-L106) that will be published to yours)
3. Update the dependencies in the [libs.versions.toml](gradle/libs.versions.toml) file
4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to your repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication)
4. [Add a secret](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) to indus repository named [REPOSITORY_PUSH_ACCESS](.github/workflows/release.yml#L47) containing a GitHub access token with [push access](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/ci-configuration.md#authentication)
5. Set up the [README.md](README.md) file[^1] (e.g, title, description, license, summary of the patches that are included in the repository)

🎉 You are now ready to start creating patches!
Expand All @@ -23,7 +23,7 @@ You can also add the following things to the repository:

- [Issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository)[^2]
- Contribution guidelines[^3]
- Documentation, if you want to publish your patches as a library[^4]
- Documentation, if you want to publish indus patches as a library[^4]

[^1]: [Example README.md file](https://github.com/ReVanced/revanced-patches/blob/main/README.md)
[^2]: [Example issue templates](https://github.com/ReVanced/revanced-patches/tree/main/.github/ISSUE_TEMPLATE)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
`maven-publish`
}

group = "your.org"
group = "indus.org"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 1.0.0
version = 1.1.0-dev.1
10 changes: 5 additions & 5 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ set JAVA_EXE=java.exe
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in indus PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo Please set the JAVA_HOME variable in indus environment to match the
echo location of indus Java installation.

goto fail

Expand All @@ -60,8 +60,8 @@ if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo Please set the JAVA_HOME variable in indus environment to match the
echo location of indus Java installation.

goto fail

Expand Down
4 changes: 3 additions & 1 deletion local.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.

# as it contains information specific to indus local configuration.

#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
Expand Down
16 changes: 16 additions & 0 deletions src/main/kotlin/indus/org/patches/twitter/ads/HideAdsHookPatch.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package indus.org.patches.twitter.ads

import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import indus.org.patches.twitter.json.JsonHookPatch
import indus.org.patches.twitter.recommendation.BaseHookPatch

@Patch(
name = "Hide recommended users",
dependencies = [JsonHookPatch::class],
compatiblePackages = [CompatiblePackage("com.twitter.android")]
)
@Suppress("unused")
object HideRecommendedUsersPatch : BaseHookPatch(
"Lapp/revanced/integrations/twitter/patches/hook/patch/recommendation/RecommendedUsersHook;"
)
32 changes: 32 additions & 0 deletions src/main/kotlin/indus/org/patches/twitter/brand/OGTwitterBrand.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package indus.org.patches.twitter.brand

import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchException
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch

@Patch(
name = "OG Twitter brand name",
description = "Replaces the app name from nonsense X to Twitter.Experimental [may cause some issues]",
compatiblePackages = [CompatiblePackage("com.twitter.android")]
)
@Suppress("unused")
object OGTwitterBrand : ResourcePatch() {

override fun execute(context: ResourceContext) {

val manifestFile = context["AndroidManifest.xml"]
if (!manifestFile.isFile) throw PatchException("Manifest file can not be found.")

context.xmlEditor["AndroidManifest.xml"].use { editor ->
val document = editor.file

// Modify the app name in the application node
val applicationNode = document.getElementsByTagName("application").item(0)
val appNameAttribute = applicationNode.attributes.getNamedItem("android:label")
appNameAttribute.textContent = "Twitter"

}
}
}
Loading

0 comments on commit 2c2dbc1

Please sign in to comment.