Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ryo-fujinone committed Oct 23, 2023
0 parents commit 099c9e4
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 ryo-fujinone

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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Auto hide next up card for Amazon Prime Video

Amazon Prime Video の Next up を非表示にする Chrome の拡張機能。
5 changes: 5 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"desc": {
"message": "Auto hide next up card for Amazon Prime Video."
}
}
5 changes: 5 additions & 0 deletions _locales/ja/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"desc": {
"message": "Amazon Prime VideoのNext upを非表示にします。"
}
}
Binary file added icons/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const config = { childList: true, subtree: true };

const observer = new MutationObserver((_, outerObserver) => {
const wrapper = document.querySelector(
".atvwebplayersdk-nextupcard-wrapper"
);
if (!wrapper) return;

// The wrapper will not be regenerated even if you move to the next episode or close and reopen the video.
outerObserver.disconnect();

new MutationObserver((_) => {
wrapper.style.display = "none";
const hideButton = wrapper.querySelector(
".atvwebplayersdk-nextupcardhide-button"
);
if (hideButton) {
hideButton.click();
}
}).observe(wrapper, config);
});

observer.observe(document, config);
43 changes: 43 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"manifest_version": 3,
"name": "Auto hide next up card for Amazon Prime Video",
"version": "1.0.0",
"default_locale": "en",
"description": "__MSG_desc__",
"icons": {
"16": "icons/16.png",
"32": "icons/32.png",
"48": "icons/48.png",
"128": "icons/128.png"
},
"content_scripts": [
{
"matches": [
"https://*.amazon.co.jp/gp/video/*",
"https://*.amazon.co.jp/Amazon-Video/*",
"https://*.amazon.com/*",
"https://*.amazon.ae/*",
"https://*.amazon.co.uk/*",
"https://*.amazon.it/*",
"https://*.amazon.in/*",
"https://*.amazon.eg/*",
"https://*.amazon.com.au/*",
"https://*.amazon.nl/*",
"https://*.amazon.ca/*",
"https://*.amazon.sa/*",
"https://*.amazon.sg/*",
"https://*.amazon.se/*",
"https://*.amazon.es/*",
"https://*.amazon.de/*",
"https://*.amazon.com.tr/*",
"https://*.amazon.com.br/*",
"https://*.amazon.fr/*",
"https://*.amazon.com.be/*",
"https://*.amazon.pl/*",
"https://*.amazon.com.mx/*",
"https://*.amazon.cn/*"
],
"js": ["main.js"]
}
]
}

0 comments on commit 099c9e4

Please sign in to comment.