Skip to content

Instantly share code, notes, and snippets.

@mijorus
Last active August 16, 2023 09:34
Show Gist options
  • Save mijorus/c1d536cee23ad9e238d42f912d76b41c to your computer and use it in GitHub Desktop.
Save mijorus/c1d536cee23ad9e238d42f912d76b41c to your computer and use it in GitHub Desktop.
Skip Youtube ads Macro for Macrodroid - For all the languages
{
"disabledTimestamp": 0,
"forceEvenIfNotEnabledTimestamp": 0,
"isActionBlock": false,
"isBeingImported": false,
"isClonedInstance": false,
"isExtra": false,
"isFavourite": false,
"lastEditedTimestamp": 1692178071905,
"localVariables": [],
"m_GUID": -6976910794467689541,
"m_actionList": [
{
"action": 0,
"uiInteractionConfiguration": {
"blocking": false,
"clickOption": 4,
"longClick": false,
"textMatchOption": 1,
"viewId": "com.google.android.youtube:id/skip_ad_button",
"xyPercentages": false,
"type": "Click"
},
"m_SIGUID": -6904524937767118273,
"m_classType": "UIInteractionAction",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
],
"m_category": "Uncategorized",
"m_constraintList": [
{
"m_active": true,
"m_applicationNameList": [
"YouTube"
],
"m_foreground": true,
"m_packageNameList": [
"com.google.android.youtube"
],
"usePackageNameOption": 0,
"m_SIGUID": -4711663513484780355,
"m_classType": "ActiveApplicationConstraint",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
],
"m_description": "",
"m_descriptionOpen": true,
"m_enabled": true,
"m_excludeLog": false,
"m_headingColor": 0,
"m_isOrCondition": false,
"m_name": "Skip Youtube Ads - All Languages ",
"m_triggerList": [
{
"appNameList": [
"YouTube"
],
"enableRegex": false,
"ignoreCase": false,
"isOffScreen": false,
"matchOption": 1,
"packageNameList": [
"com.google.android.youtube"
],
"textToMatch": "com.google.android.youtube:id/skip_ad_button",
"m_SIGUID": -7599197039734052469,
"m_classType": "ScreenContentTrigger",
"m_constraintList": [],
"m_isDisabled": false,
"m_isOrCondition": false
}
]
}

The following script differs from many pre-made scripts you can find on macrodroid because it works for every language, as it targets the ID of the button and not the its text content.

Save the following file and import it in MacroDroid. To save it, click on Raw > Save as or the equivalent on your browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment