├── src ├── js │ ├── popup.js │ ├── background.js │ └── in-content.js ├── views │ └── popup.html ├── images │ ├── logo.png │ └── heart.svg ├── css │ ├── style.css │ └── popup.css └── popup.html ├── .eslintrc.json ├── .prettierrc ├── .gitignore ├── .github └── workflows │ └── node.js.yml ├── webpack.config.js ├── manifest.json ├── package.json └── README.md /src/js/popup.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/popup.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rahgurung/coursera-HD-video-downloader/HEAD/src/images/logo.png -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb-base", 3 | "env": { 4 | "browser": true, 5 | "webextensions": true 6 | }, 7 | "parser": "babel-eslint" 8 | } -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "arrowParens": "avoid" 11 | } 12 | -------------------------------------------------------------------------------- /src/js/background.js: -------------------------------------------------------------------------------- 1 | chrome.webNavigation.onCompleted.addListener( 2 | (navigationEvent) => { 3 | const { tabId } = navigationEvent; 4 | chrome.tabs.executeScript(tabId, { file: 'in-content.js' }); 5 | }, { 6 | url: [{ 7 | hostSuffix: 'coursera.org', 8 | }, 9 | { 10 | hostSuffix: 'coursera.com', 11 | }], 12 | }, 13 | ); 14 | 15 | chrome.runtime.setUninstallURL('https://forms.gle/i5kpP8FALCLBUQqH9'); 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## IDEs ### 2 | *.sublime-workspace 3 | .tag* 4 | .tern-project 5 | 6 | ### OSX ### 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | Icon 11 | 12 | # Thumbnails 13 | ._* 14 | 15 | # Files that might appear on external disk 16 | .Spotlight-V100 17 | .Trashes 18 | 19 | ### Windows ### 20 | # Windows image file caches 21 | Thumbs.db 22 | ehthumbs.db 23 | 24 | # Folder config file 25 | Desktop.ini 26 | 27 | # Recycle Bin used on file shares 28 | $RECYCLE.BIN/ 29 | 30 | dist/ 31 | node_modules/ 32 | .tmp 33 | GumGumScreenshots_*.crx 34 | updates.xml 35 | -------------------------------------------------------------------------------- /src/css/style.css: -------------------------------------------------------------------------------- 1 | .container-courseraDownloader { 2 | display: grid; 3 | align-items: center; 4 | } 5 | 6 | .courseraDownloaderButton { 7 | padding: 5px 12px 5px 12px !important; 8 | min-height: 31.99px !important; 9 | font-size: 14px !important; 10 | margin-left: 6px !important; 11 | font-weight: 400 !important; 12 | color:#5e5e5e !important; 13 | border: 1px solid #ddd !important; 14 | border-radius: 2px !important; 15 | cursor: pointer !important; 16 | text-decoration: none !important; 17 | } 18 | 19 | .courseraDownloaderButton:hover{ 20 | background-color: #2d62d7 !important; 21 | color: white !important; 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Coursera HD Video Downloader 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [12.x, 14.x] 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | 28 | - run: npm i 29 | - run: npm run build 30 | - run: npm run lint 31 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 3 | 4 | module.exports = { 5 | entry: { 6 | popup: './src/js/popup.js', 7 | background: './src/js/background.js', 8 | 'in-content': './src/js/in-content.js', 9 | }, 10 | output: { 11 | path: path.resolve(__dirname, 'dist'), 12 | filename: '[name].js', 13 | }, 14 | cache: true, 15 | devtool: 'eval-cheap-module-source-map', 16 | module: { 17 | loaders: [ 18 | { 19 | test: /\.js?$/, 20 | include: [path.resolve(__dirname, 'src')], 21 | loader: 'babel-loader', 22 | }, 23 | ], 24 | }, 25 | plugins: [ 26 | new CopyWebpackPlugin([ 27 | { from: './manifest.json' }, 28 | { from: './src/images' }, 29 | { from: './src/css' }, 30 | { from: './src/popup.html' }, 31 | ]), 32 | ], 33 | }; 34 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Coursera HD Video Downloader", 4 | "version": "2.1.3", 5 | "description": "Download coursera videos in HD", 6 | "icons": { 7 | "16": "logo.png", 8 | "48": "logo.png", 9 | "128": "logo.png" 10 | }, 11 | "browser_action": { 12 | "default_title": "Coursera Videos Downloader", 13 | "default_popup": "popup.html" 14 | }, 15 | "content_scripts": [ 16 | { 17 | "matches": ["https://www.coursera.org/*"], 18 | "js": ["in-content.js"], 19 | "css": ["style.css"], 20 | "run_at": "document_end" 21 | } 22 | ], 23 | "background": { 24 | "scripts": ["background.js"], 25 | "persistent": false 26 | }, 27 | "permissions": ["https://www.coursera.org/*", "webNavigation", "activeTab"], 28 | "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" 29 | } 30 | -------------------------------------------------------------------------------- /src/css/popup.css: -------------------------------------------------------------------------------- 1 | .popup { 2 | border-radius: 10px; 3 | padding: 20px; 4 | width: 300px; 5 | height: auto; 6 | text-align: center; 7 | } 8 | 9 | .foot_icon { 10 | height: 20px; 11 | object-fit: contain; 12 | } 13 | 14 | .footer { 15 | padding: 0 20px; 16 | justify-content: center; 17 | grid-gap: 5px; 18 | display: flex; 19 | text-align: center; 20 | align-items: center; 21 | cursor: pointer; 22 | } 23 | 24 | a { 25 | text-decoration: none; 26 | color: #000; 27 | } 28 | 29 | .title-chvd { 30 | font-size: 20px; 31 | padding-bottom: 25px; 32 | } 33 | 34 | .link { 35 | color: #005282; 36 | } 37 | 38 | .donation { 39 | padding: 5px; 40 | border: solid 2px #00800047; 41 | font-size: 15px; 42 | text-align: left; 43 | margin-top: 5px; 44 | background: #d8ffd8; 45 | } 46 | 47 | .supporters { 48 | padding: 5px; 49 | margin-top: 5px; 50 | font-size: 15px; 51 | background: #ffffb0; 52 | } 53 | 54 | .thanks { 55 | background: aliceblue; 56 | font-size: 15px; 57 | text-align: left; 58 | padding: 5px; 59 | border-radius: 5px; 60 | } -------------------------------------------------------------------------------- /src/images/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
14 |
15 |
17 |
18 |
19 |