Skip to content

Commit 31f82a3

Browse files
committed
feat: add script [Duolingo Hide App Popups]
1 parent 372a5ce commit 31f82a3

4 files changed

Lines changed: 54 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# My UserScripts
22

3+
- [Duolingo Hide App Popups](./src/plugins/duolingo-hide-popups/README.md): Hide annoying app download popups and restore scrolling on Duolingo.
34
- [Reddit Ctrl+Enter Sender](./src/plugins/reddit-ctrl-enter-sender/README.md): Send Reddit comments with Ctrl+Enter.
45
- [Reddit Search Options Persist](./src/plugins/reddit-search-options-persist/README.md): Keep Reddit search filters when searching with new keywords.
56
- [YouTube Music Background Play](./src/plugins/youtube-music-background-play/README.md): Enable background play on YouTube Music.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Duolingo Hide App Popups
2+
3+
A userscript that hides annoying app download popups on Duolingo and restores normal page scrolling.
4+
5+
## What it does
6+
7+
This userscript automatically hides:
8+
9+
- App download overlays (containing adj.st links)
10+
- Drawer backdrops that block interaction
11+
- Restores scrolling on the main page content
12+
13+
## Installation
14+
15+
1. Install a userscript manager like [Tampermonkey](https://www.tampermonkey.net/) or [Greasemonkey](https://www.greasespot.net/)
16+
2. Download the userscript from <https://github.com/rxliuli/userscripts/releases/latest/download/duolingo-hide-popups.user.js>
17+
18+
## How it works
19+
20+
The userscript runs at document-start and injects CSS rules to:
21+
22+
- Hide overlay elements that contain app download links (`#overlays:has([href*="adj.st"])`)
23+
- Hide drawer backdrop elements (`[data-test="drawer-backdrop"]`)
24+
- Restore scrolling to the root element (`#root { overflow: auto !important; }`)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { MonkeyUserScript } from 'vite-plugin-monkey'
2+
3+
export function manifest(): MonkeyUserScript {
4+
return {
5+
name: 'Duolingo Hide App Popups',
6+
namespace: 'https://rxliuli.com',
7+
description: 'Hide app popups and restore scrolling on Duolingo.',
8+
match: ['https://www.duolingo.com/**'],
9+
'run-at': 'document-start',
10+
author: 'rxliuli',
11+
license: 'GPL-3.0-only',
12+
}
13+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function injectStyles() {
2+
const style = document.createElement('style')
3+
style.textContent = `
4+
#overlays:has([href*="adj.st"]), [data-test="drawer-backdrop"] {
5+
display: none !important;
6+
}
7+
8+
#root {
9+
overflow: auto !important;
10+
}
11+
`.trim()
12+
document.head.appendChild(style)
13+
console.log('✨ Duolingo popups hidden')
14+
}
15+
16+
injectStyles()

0 commit comments

Comments
 (0)