Skip to content

Commit 36ddc6d

Browse files
committed
init. Comment disabled
0 parents  commit 36ddc6d

8 files changed

Lines changed: 58 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## LearnCPP-StudyMode
2+
***Remove blockers for learncpp.com***
3+
4+
5+
-----------------
6+
### Setup Steps
7+
- Clone the repo or download zip(and unzip).
8+
- Visit extension page and enable `Developer Mode`
9+
- Click Load Unpacked and select the folder
10+
11+
That's it, now it will automatically do rest of the work!
12+
13+
-----------------
14+
### Simple Tasks:
15+
- [x] Remove comments
16+
- [ ] Remove ads
17+
18+
### Advanced(for me) tasks:
19+
- [ ] Remove unusual comments only
20+
- [ ] Don't even load useless things..
21+
- [ ] Give a checkbox to control.

assets/icons/128.png

31.3 KB
Loading

assets/icons/16.png

796 Bytes
Loading

assets/icons/48.png

5.12 KB
Loading

assets/icons/icon.png

993 KB
Loading

background.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
2+
if (tab?.url.includes("https://www.learncpp.com/cpp-tutorial")) {
3+
chrome.scripting.executeScript({
4+
target: {tabId},
5+
files: ["injection.js"]
6+
})
7+
}
8+
})

injection.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Comments
2+
try {
3+
const comments = document.getElementById("wpd-threads")
4+
if (comments) comments.remove()
5+
} catch (error) {
6+
alert("Error") // Just for development part
7+
console.log("Error in ext")
8+
}

manifest.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"manifest_version": 3,
3+
"name": "Learn CPP Study Mode",
4+
"version": "1.0.0",
5+
"description": "Remove blockers for learncpp.com",
6+
"permissions": [
7+
"tabs",
8+
"scripting"
9+
],
10+
"host_permissions": [
11+
"https://www.learncpp.com/cpp-tutorial"
12+
],
13+
"background": {
14+
"service_worker": "background.js"
15+
},
16+
"icons": {
17+
"16": "assets/icons/16.png",
18+
"48": "assets/icons/48.png",
19+
"128": "assets/icons/128.png"
20+
}
21+
}

0 commit comments

Comments
 (0)