mirror of
https://codeberg.org/vlw/disneyplus-pip.git
synced 2025-09-14 10:43:42 +02:00
Compare commits
No commits in common. "master" and "2.0.2" have entirely different histories.
4 changed files with 8 additions and 15 deletions
10
README.md
10
README.md
|
@ -1,6 +1,3 @@
|
|||
> [!IMPORTANT]
|
||||
> **This extension is deprecated and no longer maintained.** ([#6](https://github.com/VictorWesterlund/disneyplus-pip/issues/6)) Feel free to fork the code and make any changes you want!
|
||||
|
||||
## Picture in Picture for Disney+
|
||||
|
||||

|
||||
|
@ -9,7 +6,7 @@ Add Picture-in-Picture support on Disney+ in the browser.
|
|||
|
||||
## Install from the Chrome Web Store
|
||||
|
||||
[~**Install from the Chrome Web Store**~](https://chrome.google.com/webstore/detail/disney%20-pip/mjncaeojcjldpplapjioikobkgedockm) ⚠️ Deprecated
|
||||
[**Install from the Chrome Web Store**](https://chrome.google.com/webstore/detail/disney%20-pip/mjncaeojcjldpplapjioikobkgedockm)
|
||||
|
||||
## Install Chrome Extension
|
||||
|
||||
|
@ -26,13 +23,10 @@ Add Picture-in-Picture support on Disney+ in the browser.
|
|||
|
||||
## Install UserScript
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **This userscript is deprecated and no longer maintained.** ([#6](https://github.com/VictorWesterlund/disneyplus-pip/issues/6)) Feel free to fork the code and make any changes you want!
|
||||
|
||||

|
||||
|
||||
You can also find an older UserScript of this on [GreasyFork](https://greasyfork.org/en/scripts/420964-disney-picture-in-picture). Please note that this version is no longer maintained so support is not guaranteed.
|
||||
|
||||
It should work with extensions like Tampermonkey ([Chrome](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/)) and Greasemonkey ([Firefox](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/)).
|
||||
|
||||
[~**Install from GreasyFork**~](https://greasyfork.org/en/scripts/420964-disney-picture-in-picture) ⚠️ Deprecated
|
||||
**[Install from GreasyFork](https://greasyfork.org/en/scripts/420964-disney-picture-in-picture)**
|
||||
|
|
|
@ -18,9 +18,9 @@ class PIPController {
|
|||
// Returns true if the page is /video/
|
||||
isPlayerPage() {
|
||||
const url = new URL(window.location);
|
||||
const pattern = /^\/?([A-Za-z-]*)?\/video\//i;
|
||||
const pathname = url.pathname.split("/");
|
||||
|
||||
return pattern.test(url.pathname) ? true : false;
|
||||
return pathname[1] === "video" ? true : false;
|
||||
}
|
||||
|
||||
// Enter/exit PIP mode
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "Disney+ PIP",
|
||||
"description": "Adds Picture-in-Picture (PIP) support for Disney+",
|
||||
"version": "1.3",
|
||||
"version": "1.2",
|
||||
"manifest_version": 3,
|
||||
"content_scripts": [{
|
||||
"matches": ["https://*.disneyplus.com/*"],
|
||||
|
|
|
@ -58,8 +58,7 @@
|
|||
// Poll document tree until video element is loaded
|
||||
const init = (mutations, observer) => {
|
||||
clearTimeout(timeout);
|
||||
const pattern = /^\/?([A-Za-z-]*)?\/video\//i;
|
||||
if(!pattern.test(window.location.pathname)) {
|
||||
if(!window.location.href.includes("/video/")) {
|
||||
return false;
|
||||
}
|
||||
if(document.getElementsByTagName("video")[0]) {
|
||||
|
|
Loading…
Add table
Reference in a new issue