Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(YouTube Music - Sanitize sharing links): Tracking parameters are …
Browse files Browse the repository at this point in the history
…not removed from the system share panel
  • Loading branch information
inotia00 authored and Francesco146 committed Aug 16, 2024
1 parent 63094e0 commit 645e1e4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 38 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public class Settings extends BaseSettings {
public static final BooleanSetting CHANGE_SHARE_SHEET = new BooleanSetting("revanced_change_share_sheet", FALSE, true);
public static final BooleanSetting ENABLE_CAIRO_SPLASH_ANIMATION = new BooleanSetting("revanced_enable_cairo_splash_animation", FALSE, true);
public static final BooleanSetting ENABLE_OPUS_CODEC = new BooleanSetting("revanced_enable_opus_codec", FALSE, true);
public static final BooleanSetting SANITIZE_SHARING_LINKS = new BooleanSetting("revanced_sanitize_sharing_links", TRUE, true);
public static final BooleanSetting SETTINGS_IMPORT_EXPORT = new BooleanSetting("revanced_extended_settings_import_export", FALSE, false);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package app.revanced.integrations.youtube.patches.misc;
package app.revanced.integrations.shared.patches;

import android.content.Intent;

import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.shared.settings.BaseSettings;

/**
* @noinspection ALL
*/
@SuppressWarnings("all")
public final class SanitizeUrlQueryPatch {
/**
* This tracking parameter is mainly used.
Expand Down Expand Up @@ -37,7 +35,7 @@ public final class SanitizeUrlQueryPatch {
* @return URL string without query parameters if possible, otherwise the original string.
*/
public static String stripQueryParameters(final String urlString) {
if (!Settings.SANITIZE_SHARING_LINKS.get())
if (!BaseSettings.SANITIZE_SHARING_LINKS.get())
return urlString;

return urlString.replaceAll(NEW_TRACKING_REGEX, "").replaceAll(OLD_TRACKING_REGEX, "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ public class BaseSettings {

public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true);
public static final StringSetting BYPASS_IMAGE_REGION_RESTRICTIONS_DOMAIN = new StringSetting("revanced_bypass_image_region_restrictions_domain", "yt4.ggpht.com", true);

public static final BooleanSetting SANITIZE_SHARING_LINKS = new BooleanSetting("revanced_sanitize_sharing_links", TRUE, true);
}
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ public class Settings extends BaseSettings {
// PreferenceScreen: Miscellaneous
public static final BooleanSetting ENABLE_EXTERNAL_BROWSER = new BooleanSetting("revanced_enable_external_browser", TRUE, true);
public static final BooleanSetting ENABLE_OPEN_LINKS_DIRECTLY = new BooleanSetting("revanced_enable_open_links_directly", TRUE);
public static final BooleanSetting SANITIZE_SHARING_LINKS = new BooleanSetting("revanced_sanitize_sharing_links", true, true);
public static final BooleanSetting DISABLE_QUIC_PROTOCOL = new BooleanSetting("revanced_disable_quic_protocol", FALSE, true);
public static final BooleanSetting SPOOF_CLIENT = new BooleanSetting("revanced_spoof_client", FALSE, true, "revanced_spoof_client_user_dialog_message");
public static final BooleanSetting SPOOF_CLIENT_STATS_FOR_NERDS = new BooleanSetting("revanced_spoof_client_stats_for_nerds", TRUE, parent(SPOOF_CLIENT));
Expand Down

0 comments on commit 645e1e4

Please sign in to comment.