Skip to content

fix ads?

fix ads? #122

Workflow file for this run

name: Remove Ads
on:
push:
branches:
- main
jobs:
update-ad-free:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ad-Free branch
run: |
git fetch origin main
if git ls-remote --heads origin Ad-Free; then
git checkout Ad-Free
git merge origin/main --no-edit
else
git checkout -b Ad-Free origin/main
fi
- name: Remove ad script block from m.js
run: |
sed -i '/const blockedHostnames/,/document.body.appendChild(script);/d' static/assets/js/m1.js
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
if git diff --quiet; then
echo "No changes detected"
else
git add static/assets/js/m.js
git commit -m "Remove ad injection block from m.js"
fi
- name: Push changes
run: git push origin Ad-Free --force