Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 amazon.com 域名上使用 #418

Closed
muzuiget opened this issue May 14, 2022 · 9 comments
Closed

在 amazon.com 域名上使用 #418

muzuiget opened this issue May 14, 2022 · 9 comments

Comments

@muzuiget
Copy link
Owner

muzuiget commented May 14, 2022

Amazon 的视频服务有几个商标名,例如 Prime Video、IMDB TV、Freevee,在不同地区又以不同域名运营,在美国是 amazon.com,在日本则是 amazon.co.jp,在其它地区则是 primevideo.com。但它们似乎都是用同一套网站代码,所以理论上 Dualsub 也可以用同一套适配代码兼容所有域名。

目前商店版只能在 primevideo.com 上使用,而不能在 amazon.* 上使用。

原因

因为 amazon.* 域名,大多数用户会视为一个购物网站,而不是视频网站。购物网站会有个人敏感信息,例如信用卡号、收货地址。现在浏览器安装扩展时是强制用户接受网站权限,我不想让用户以为 Dualsub 在收集用户的购物信息,所以商店版没有配置 amazon.* 网站权限。

运行方法

要在 amazon.* 上运行,用户需要手动修改一下扩展,然后以开发者模式运行。

仅仅需要修改扩展的描述文件 manifest.json,把 amazon.* 系列域名加进 content_scripts 字段中即可。

修改版

可能有些人不会修改,这里放一个修改好的版本,可以直接解压并以开发者模式运行。

dualsub-v2.36.1-am.zip

此修改版可以和商店版同时安装和同时启用。

此修改版的 manifest.json 替换为以下代码:

    "content_scripts": [
        {
            "matches": [
                "https://www.amazon.ae/*",
                "https://www.amazon.ca/*",
                "https://www.amazon.cn/*",
                "https://www.amazon.co.jp/*",
                "https://www.amazon.co.uk/*",
                "https://www.amazon.com.au/*",
                "https://www.amazon.com.br/*",
                "https://www.amazon.com.mx/*",
                "https://www.amazon.com.tr/*",
                "https://www.amazon.com/*",
                "https://www.amazon.de/*",
                "https://www.amazon.eg/*",
                "https://www.amazon.es/*",
                "https://www.amazon.fr/*",
                "https://www.amazon.in/*",
                "https://www.amazon.it/*",
                "https://www.amazon.nl/*",
                "https://www.amazon.pl/*",
                "https://www.amazon.sa/*",
                "https://www.amazon.se/*",
                "https://www.amazon.sg/*"
            ],
            "js": [
                "react.js",
                "react-dom.js",
                "content.js"
            ],
            "all_frames": false
        }
    ]
@muzuiget
Copy link
Owner Author

基于 v2.0.2 再修改一份上传。

@muzuiget muzuiget reopened this Oct 30, 2022
@muzuiget
Copy link
Owner Author

因为 Manifest V3 支持可选网站权限,所以以后可以直接把这一系列域名加到商店版里。

@muzuiget
Copy link
Owner Author

基于 v2.5.3 再修改一份上传。

@Seulxy
Copy link

Seulxy commented Apr 21, 2023

请问可以再上传一份吗?旧版的api没法用了,我又不太知道扩展在那里修改……

@muzuiget
Copy link
Owner Author

重新从 v2.7.2 改了一个。

@muzuiget
Copy link
Owner Author

重新从 v2.7.6 改了一个。

@muzuiget
Copy link
Owner Author

重新从 v2.9.2 改了一个。

@muzuiget
Copy link
Owner Author

重新从 v2.16.3 改了一个。

@muzuiget
Copy link
Owner Author

重新从 v2.36.1 改了一个。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants