├── .browserslistrc ├── .editorconfig ├── .env.example ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── 01_bug_report.yml │ └── 02_feature_request.yml ├── .gitignore ├── .swcrc ├── .vscode ├── launch.json └── settings.json ├── CHANGELOG.user.md ├── FilterList └── MagicPH.txt ├── LICENSE ├── MagicPH.code-workspace ├── README.md ├── UserJS.json ├── assets ├── magicph_logo.png ├── preview.png ├── preview_addon.png ├── userjs.PNG ├── userjs1.PNG └── userjs2.PNG ├── dist ├── magicph.meta.js └── magicph.user.js ├── eslint.config.js ├── package.json ├── pages.md ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── prettier.config.js ├── src ├── UserJS │ ├── header.js │ └── main.js ├── _locales │ └── en │ │ └── messages.json ├── html │ ├── background.html │ ├── header.html │ ├── magicph_cfg.html │ ├── magicpopup.html │ ├── options.html │ └── sidebar.html ├── img │ ├── icon_128.png │ ├── icon_64.png │ ├── image-error.svg │ ├── magicph-copy.svg │ ├── magicph-download.svg │ ├── magicph-icon-added.svg │ ├── magicph-icon.svg │ └── magicph-remove.svg ├── js │ ├── background.js │ ├── bg-background.js │ ├── bg-common.js │ ├── bg-start.js │ ├── config.js │ ├── custom-player.js │ ├── logger.js │ ├── messaging.js │ ├── mph-adremover.js │ ├── mph-client.js │ ├── mph-common.js │ ├── mph.js │ ├── options.js │ ├── querySelector.js │ └── start.js ├── manifest │ ├── chrome.json │ └── firefox.json ├── plyr │ ├── base.scss │ ├── components │ │ ├── badges.scss │ │ ├── captions.scss │ │ ├── control.scss │ │ ├── controls.scss │ │ ├── menus.scss │ │ ├── poster.scss │ │ ├── progress.scss │ │ ├── sliders.scss │ │ ├── times.scss │ │ ├── tooltips.scss │ │ └── volume.scss │ ├── lib │ │ ├── animation.scss │ │ ├── css-vars.scss │ │ ├── functions.scss │ │ └── mixins.scss │ ├── plugins │ │ ├── ads.scss │ │ └── preview-thumbnails │ │ │ ├── index.scss │ │ │ └── settings.scss │ ├── plyr.scss │ ├── settings │ │ ├── badges.scss │ │ ├── breakpoints.scss │ │ ├── captions.scss │ │ ├── colors.scss │ │ ├── controls.scss │ │ ├── cosmetics.scss │ │ ├── helpers.scss │ │ ├── menus.scss │ │ ├── progress.scss │ │ ├── sliders.scss │ │ ├── tooltips.scss │ │ └── type.scss │ ├── states │ │ └── fullscreen.scss │ ├── types │ │ ├── audio.scss │ │ └── video.scss │ └── utils │ │ ├── animation.scss │ │ └── hidden.scss ├── sass │ ├── _colors.scss │ ├── _main.scss │ ├── _mixins.scss │ ├── _overwrites.scss │ ├── _settings.scss │ ├── _userscript.scss │ ├── downloader.scss │ └── magicph.scss └── typings │ ├── UserJS.d.ts │ ├── WebExt.d.ts │ └── types.d.ts ├── tools ├── crx.js ├── languageLoader.js ├── userscript.js ├── web-ext.cjs └── webpack.config.js ├── utils ├── builder │ ├── README.md │ ├── package.json │ ├── src │ │ ├── desktop.ini │ │ ├── index.d.ts │ │ └── index.js │ └── typings │ │ └── index.d.ts ├── i18n │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.js │ └── typings │ │ └── index.d.ts └── user.js │ ├── README.md │ ├── package.json │ ├── src │ └── index.js │ └── typings │ └── index.d.ts └── version ├── updates.json └── updates.xml /.browserslistrc: -------------------------------------------------------------------------------- 1 | defaults 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = crlf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | JS_ENV="development" 2 | JS_ROOT="./" 3 | JS_i18n="../../../src/_locales" 4 | ANALYSE=undefined 5 | WEB_EXT_SOURCE_DIR=./build/WebExtension/firefox 6 | WEB_EXT_ARTIFACTS_DIR=./tmp 7 | WEB_EXT_FIREFOX_PROFILE=MagicPH 8 | WEB_EXT_CHANNEL=unlisted 9 | WEB_EXT_API_URL_PREFIX=https://addons.mozilla.org/api/v3 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: magicoflolis 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/01_bug_report.yml: -------------------------------------------------------------------------------- 1 | name: "🐞 Bug report" 2 | description: File a bug report. 3 | title: "[bug]: " 4 | labels: ["bug 🐞"] 5 | assignees: 6 | - magicoflolis 7 | body: 8 | - type: markdown 9 | attributes: 10 | value: | 11 | Thanks for taking the time to fill out this bug report! 12 | - type: checkboxes 13 | attributes: 14 | label: Is there an existing issue for this? 15 | description: Please search to see if an issue already exists for the bug you encountered. 16 | options: 17 | - label: I have searched the existing issues 18 | required: true 19 | - type: dropdown 20 | id: type 21 | attributes: 22 | label: Type 23 | description: How are you using MagicPH? 24 | multiple: true 25 | options: 26 | - User Script 27 | - Web Extension 28 | validations: 29 | required: true 30 | - type: input 31 | id: browser 32 | attributes: 33 | label: Web Browser 34 | description: What browser are you seeing this bug on? 35 | validations: 36 | required: true 37 | - type: input 38 | id: userjs 39 | attributes: 40 | label: User Script Manager 41 | description: What user script manager are you using? - not required when using Web Extension 42 | validations: 43 | required: false 44 | - type: input 45 | id: url 46 | attributes: 47 | label: URL 48 | description: What URL did the bug occur on? 49 | validations: 50 | required: true 51 | - type: textarea 52 | id: what-happened 53 | attributes: 54 | label: What happened? 55 | description: Describe the bug. 56 | placeholder: A clear and concise description of the bug. 57 | value: "A bug happened!" 58 | validations: 59 | required: true 60 | - type: textarea 61 | id: bug-reproduction 62 | attributes: 63 | label: Steps To Reproduce 64 | description: Steps to reproduce the bug. 65 | placeholder: | 66 | 1. Navigated to '...' 67 | 1. Console error '...' 68 | 1. etc. 69 | validations: 70 | required: false 71 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/02_feature_request.yml: -------------------------------------------------------------------------------- 1 | name: "💡 Feature request" 2 | description: Suggest an idea for this project 3 | title: "[feat]: " 4 | labels: ["feature-request 💡"] 5 | assignees: 6 | - magicoflolis 7 | body: 8 | - type: textarea 9 | id: description 10 | attributes: 11 | label: Feature description 12 | description: A clear and concise description, please include if your feature request is related to a problem. 13 | validations: 14 | required: true 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore haters 2 | haters/ 3 | 4 | build 5 | node_modules 6 | 7 | Notes 8 | .history 9 | web-ext 10 | web-ext-artifacts 11 | web-server 12 | 13 | *.ini 14 | 15 | *.log 16 | npm-debug.log* 17 | yarn-debug.log* 18 | yarn-error.log* 19 | lerna-debug.log* 20 | .pnpm-debug.log* 21 | *.tsbuildinfo 22 | 23 | # dotenv environment variable files 24 | .env 25 | .env.development.local 26 | .env.test.local 27 | .env.production.local 28 | .env.local 29 | -------------------------------------------------------------------------------- /.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/swcrc", 3 | "jsc": { 4 | "parser": { 5 | "syntax": "ecmascript" 6 | }, 7 | "target": "es2020" 8 | }, 9 | "module": { 10 | "type": "es6", 11 | "strict": false, 12 | "strictMode": true, 13 | "lazy": false, 14 | "noInterop": false 15 | } 16 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "compounds": [ 4 | { 5 | "name": "Attach/Launch", 6 | "configurations": ["SF","Attach:Firefox"] 7 | } 8 | ], 9 | "configurations": [ 10 | { 11 | "name": "Attach:Firefox", 12 | "type": "firefox", 13 | "request": "attach" 14 | }, 15 | { 16 | "name": "SF", 17 | "type": "firefox", 18 | "request": "launch", 19 | "profile": "MagicPH", 20 | "clearConsoleOnReload": true, 21 | "reAttach": true, 22 | "reloadOnAttach": true, 23 | "keepProfileChanges": false, 24 | "url": "https://pornhub.com/", 25 | "addonPath": "${workspaceFolder}/build/WebExtension/firefox", 26 | "reloadOnChange": { 27 | "watch": [ 28 | "${workspaceFolder}/src/**" 29 | ], 30 | "ignore": [ 31 | "${workspaceFolder}/node_modules/**" 32 | ] 33 | }, 34 | "pathMappings": [ 35 | { 36 | "url": "webpack:///js", 37 | "path": "${workspaceFolder}/src/js" 38 | }, 39 | { 40 | "url": "webpack:///src/", 41 | "path": "${webRoot}/src/" 42 | } 43 | ], 44 | "log": { 45 | "fileName": "${workspaceFolder}/firefox.log", 46 | "fileLevel": { 47 | "default": "Debug" 48 | } 49 | } 50 | }, 51 | { 52 | "type": "chrome", 53 | "request": "attach", 54 | "name": "Attach to browser", 55 | "port": 9222 56 | }, 57 | { 58 | "name": "SC", 59 | "type": "chrome", 60 | "request": "launch", 61 | "runtimeExecutable": "${workspaceFolder}/chrome/bin/chrome.exe", 62 | "userDataDir": "${workspaceFolder}/chrome/profile", 63 | "url": "https://pornhub.com/" 64 | } 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.include": { 3 | "src/*": true 4 | }, 5 | "files.exclude": { 6 | "**/build/**": true, 7 | "**/dist/**": true, 8 | "**/node_modules/**": true, 9 | "**/Notes/**": true, 10 | "tests/*": true 11 | }, 12 | "explorer.excludeGitIgnore": true, 13 | "search.exclude": { 14 | "**/build/**": true, 15 | "**/dist/**": true, 16 | "**/node_modules/**": true, 17 | "**/Notes/**": true, 18 | "tests/*": true 19 | } 20 | } -------------------------------------------------------------------------------- /CHANGELOG.user.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v4.1.0 4 | 5 | * Added the following sites: 6 | * 91porn.com 7 | * hqporner.com 8 | * spankbang.com 9 | * porntrex.com 10 | * analdin.com 11 | * sxyprn.com 12 | * Improved UI design 13 | * Cleanup old css 14 | * Bug fixes 15 | 16 | **Known Issues:** 17 | 18 | * N/A 19 | 20 | **TODO:** 21 | 22 | * Finish translations. 23 | * Finish web extension 24 | 25 | --- 26 | 27 | ## Previous Changes 28 | 29 | [https://github.com/magicoflolis/Magic-PH/releases](https://github.com/magicoflolis/Magic-PH/releases) 30 | -------------------------------------------------------------------------------- /FilterList/MagicPH.txt: -------------------------------------------------------------------------------- 1 | ! Title: MagicPH Filter 2 | ! Expires: 4 days 3 | ! Description: Annoyances and removes most ads on Pornhub/Pornhub Premium 4 | ! Version: 1.0.4 5 | ! Author: MagicOfLolis 6 | ! Homepage: https://github.com/magicoflolis/Magic-PH 7 | ! 8 | ! -----------------Allowed-----------------! 9 | @@||ss.phncdn.com 10 | @@||phncdn.com^$image,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion|redtube.*|tube8.*|youporn.com|youporngay.com 11 | @@||*/login$domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion|redtube.*|tube8.*|youporn.com|youporngay.com 12 | @@||*/signup$domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion|redtube.*|tube8.*|youporn.com|youporngay.com 13 | @@||*/create_account_select$domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion|redtube.*|tube8.*|youporn.com|youporngay.com 14 | 15 | ! -----------------General-----------------! 16 | $websocket,domain=pornhub.*|pornhubthbh7ap3u.onion 17 | ||static.trafficjunky.com$all,important,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion|redtube.*|tube8.*|youporn.com|youporngay.com 18 | ||*smallimg.phncdn.com^$image,redirect=noop.gif,important,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion|redtube.*|tube8.*|youporn.com|youporngay.com 19 | ||phncdn.com/*/networkbar*.js^$script,redirect=noop.js,important,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion 20 | ||phncdn.com/*/promo-banner.js^$script,redirect=noop.js,important,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion 21 | ||phncdn.com/*front*^$script,css,important,domain=pornhub.* 22 | ||phncdn.com/*/premium/premium-modals.*$script,css,important,domain=pornhub.* 23 | ||pornhub*/front/menu_livesex*$document,xhr,important,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion 24 | ||pornhub*/_xa/^$document,xhr,important,domain=pornhub.*|pornhubpremium.*|pornhubthbh7ap3u.onion 25 | pornhub.*,redtube.*,pornhubthbh7ap3u.onion###main-container > .abovePlayer 26 | pornhub.*,pornhubpremium.*##head > stylesheet 27 | pornhub.*,pornhubpremium.*###welcome 28 | pornhub.*,pornhubpremium.*##.footerContentWrapper 29 | pornhub.*,pornhubpremium.*##.tooltipPromo 30 | pornhub.*,pornhubpremium.*##.realsex 31 | pornhub.*,pornhubpremium.*##.livesex 32 | pornhub.*,pornhubpremium.*###popsByTrafficJunky 33 | pornhub.*,pornhubpremium.*##.headerBtnsWrapper 34 | pornhub.*,pornhubpremium.*##.pornportal-wrapper 35 | pornhub.*,pornhubpremium.*##.recommendedPornstarsWrapper 36 | pornhub.*,pornhubpremium.*##.recommendedCategoriesWrapper 37 | 38 | ! -----------------Pornhub-----------------! 39 | pornhub.*##.premiumPromoBannerWrapper 40 | pornhub.*##li.mgp_upsell 41 | pornhub.*##[rel="nofollow"]:nth-ancestor(1) 42 | pornhub.*##.leftPanel > p 43 | pornhub.*##.leftPanel > .popularSearches 44 | pornhub.*##.headerSubMenu > .trendingWrapper 45 | pornhub.*##.headerSubMenu > .popularFilterPhotos 46 | pornhub.*##.headerSubMenu > .innerHeaderFilters 47 | pornhub.*###under-player-playlists 48 | 49 | ! -----------------Premium-----------------! 50 | ||portalcdn.com$important 51 | pornhubpremium.*###welcomePremium 52 | 53 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2024 Magic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /MagicPH.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "search.exclude": { 9 | "**/build/**": true, 10 | "**/node_modules": true, 11 | "**/chrome_dist/js/**": true, 12 | "**/dist/js/**": true, 13 | "**/Notes/**": true 14 | }, 15 | "editor.codeActionsOnSave": { 16 | "source.fixAll": "never", 17 | "source.fixAll.eslint": "explicit" 18 | }, 19 | "editor.formatOnSaveMode": "modifications", 20 | "explorer.excludeGitIgnore": true, 21 | "files.exclude": { 22 | "**/build/**": true, 23 | "**/dist/**": true, 24 | "**/node_modules/**": true, 25 | "**/Notes/**": true 26 | }, 27 | "files.trimTrailingWhitespace": true, 28 | "local-history.daysLimit": 3, 29 | "local-history.maxDisplay": 10, 30 | "local-history.saveDelay": 0, 31 | "local-history.dateLocale": "en-US", 32 | "local-history.exclude": [ 33 | "**/.history/**", 34 | "**/.vscode/**", 35 | "**/node_modules/**", 36 | "**/dist/**", 37 | "**/chrome_dist/**", 38 | "**/build/**", 39 | "**/*.code-workspace", 40 | "**/src/sass/**", 41 | ], 42 | "local-history.path": "${workspaceFolder}/.vscode", 43 | } 44 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![GitHub License](https://img.shields.io/github/license/magicoflolis/Magic-PH?style=flat-square) 2 | ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/magicoflolis/Magic-PH?style=flat-square) 3 | ![GitHub Repo stars](https://img.shields.io/github/stars/magicoflolis/Magic-PH?style=flat-square) 4 | 5 | --- 6 | 7 |

8 | 9 | 10 | 11 | MagicPH 12 |

13 | 14 | > [!IMPORTANT] 15 | > This userscript / webextension violates [websites](https://github.com/magicoflolis/Magic-PH/blob/master/pages.md) content policies on `Banning Downloads`. 16 | > 17 | > **PLEASE USE AT YOUR OWN RISK!** 18 | 19 | _Recommend using "ad blocker" or "content blocker" ([uBlock Origin](https://github.com/gorhill/uBlock#readme)) along side._ 20 | 21 | A video downloader for various adult websites. _WebExtension version has not been updated in a while, please use UserScript version!_ 22 | 23 | [UserScript Changelog](https://github.com/magicoflolis/Magic-PH/blob/master/CHANGELOG.user.md) 24 | 25 | **Supported Websites:** - [List of policy violations](https://github.com/magicoflolis/Magic-PH/blob/master/pages.md) 26 | 27 | | Websites | Version (Desktop) | Version (Mobile) | 28 | | :-----------------------------------------------: | :---------------: | :--------------: | 29 | | [Beeg](https://beeg.com) | ✅ | ✅ | 30 | | [Onlyfans](https://onlyfans.com) | ✅ | ✅ | 31 | | [Pornhub](https://www.pornhub.com) | ✅ | ✅ | 32 | | [Pornhub Premium](https://www.pornhubpremium.com) | ✅ | ✅ | 33 | | [RedTube](https://www.redtube.com) | ✅ | ✅ | 34 | | [Tube8](https://www.tube8.com) | ✅ | ✅ | 35 | | [Thumbzilla](https://www.thumbzilla.com) | ✅ | ✅ | 36 | | [xHamster](https://xhamster.com) | ✅ | ✅ | 37 | | [XNXX](https://www.xnxx.com) | ✅ | ✅ | 38 | | [xVideos](https://www.xvideos.com) | ✅ | ✅ | 39 | | [YouPorn](https://www.youporn.com) | ✅ | ✅ | 40 | 41 | --- 42 | 43 | ## **Download** 44 | 45 | **UserScript:** 46 | 47 | - [Sleazy Fork](https://sleazyfork.org/scripts/492700) 48 | - [GitHub Repo](https://github.com/magicoflolis/Magic-PH/raw/master/dist/magicph.user.js) 49 | - [Open UserJS](https://openuserjs.org/scripts/Magic/MagicPH) - outdated 50 | 51 | **Web Extension (under construction):** 52 | 53 | _Firefox:_ 54 | 55 | - ~~[GitHub Repo](https://github.com/magicoflolis/Magic-PH/releases)~~ 56 | 57 | _Chromium:_ 58 | 59 | - ~~[GitHub Repo](https://github.com/magicoflolis/Magic-PH/releases)~~ 60 | 61 | **Bookmarklet (not recommended):** 62 | 63 | Save this URL as a bookmark, clicking it will cause the **UserScript version** to inject itself into the current webpage. 64 | 65 | ```js 66 | javascript: (function () { 67 | ['https://cdn.jsdelivr.net/gh/magicoflolis/Magic-PH@master/dist/magicph.user.js'].map( 68 | (s) => (document.body.appendChild(document.createElement('script')).src = s) 69 | ); 70 | })(); 71 | ``` 72 | 73 | ## Features 74 | 75 | > See [Accessing Downloader](#accessing-downloader) 76 | 77 | - General: 78 | - UI designed for mobile and desktop devices 79 | - Will match the websites theme. 80 | - Built in tabs feature. 81 | - Built in video downloader allows user to easily download and save any video in its highest quality or preferred choice. 82 | - Video downloader can be combined with any 3rd party/external downloader. 83 | 84 | ## Previews 85 | 86 |

87 | 88 | 89 | 90 |

91 | 92 | ## Accessing Downloader 93 | 94 | **Default Method:** 95 | 96 | - Click "**Show List**" located to the bottom right of the page. 97 | - Onlyfans (**Mobile**) - Click on any video post. 98 | 99 | **Website Specific:** 100 | 101 | - Desktop / Mobile - Right click anywhere inside the video player then click "**Video Quality(s)**". 102 | - Mobile - Press "**Video Quality(s)**" in the video player. 103 | - Mobile (**Alternative**) - Press the gear icon in the video player. 104 | - Youporn (**Mobile**) - Press the gear icon in the video player then press "**Video Quality(s)**". 105 | 106 | ## Tabs 107 | 108 | > In a nutshell, the tab system work the same way your browser creates tabs, by default the tab is named after the host. 109 | 110 | A new tab is automatically created when a video source is found, the tab is named after the videos title. 111 | 112 | **Creating a New Tab:** 113 | 114 | > Creating a new tab is as easy as clicking the "+" within the list. 115 | 116 | This new tab is a search box, typing any supported method will automatically find the video source(s)! 117 | 118 | Supported Methods: 119 | 120 | - `` of any supported website or `/