mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-19 09:52:21 +08:00
feat: add microsoft edge addon (#4622)
This commit is contained in:
@@ -40,7 +40,7 @@ pageClass: routes
|
||||
|
||||
### Extensions Update
|
||||
|
||||
<RouteEn author="DIYgod" example="/chrome/webstore/extensions/kefjpfngnndepjbopdmoebkipbgkggaa" path="/chrome/webstore/extensions/:id" :paramsDesc="['Extension id, can be found in extension url']/>
|
||||
<RouteEn author="DIYgod" example="/chrome/webstore/extensions/kefjpfngnndepjbopdmoebkipbgkggaa" path="/chrome/webstore/extensions/:id" :paramsDesc="['Extension id, can be found in extension url']"/>
|
||||
|
||||
## CurseForge
|
||||
|
||||
@@ -84,7 +84,7 @@ The owner of the official image fills in the library, for example: https://rsshu
|
||||
|
||||
### Add-ons Update
|
||||
|
||||
<RouteEn author="DIYgod" example="/firefox/addons/rsshub-radar" path="/firefox/addons/:id" :paramsDesc="['Add-ons id, can be found in add-ons url']/>
|
||||
<RouteEn author="DIYgod" example="/firefox/addons/rsshub-radar" path="/firefox/addons/:id" :paramsDesc="['Add-ons id, can be found in add-ons url']"/>
|
||||
|
||||
## Greasy Fork
|
||||
|
||||
@@ -98,6 +98,12 @@ The owner of the official image fills in the library, for example: https://rsshu
|
||||
|
||||
<RouteEn author="Jeason0228" example="/ipsw/index/ipsws/iPhone11,8" path="/ipsw/index/:ptype/:pname/" :paramsDesc="['Fill in ipsws or otas to get different versions of firmware','Product name, `http://rsshub.app/ipsw/index/ipsws/iPod`, if you fill in the iPad, follow the entire iPad series(ptype default to ipsws).`http://rsshub.app/ipsw/index/ipsws/iPhone11,8`, if you fill in the specific iPhone11,8, submit to the ipsws firmware information of this model']"/>
|
||||
|
||||
## Microsoft Edge
|
||||
|
||||
### Addons Update
|
||||
|
||||
<RouteEn author="hoilc" example="/edge/addon/iikmkjmpaadaobahmlepeloendndfphd" path="/edge/addon/:crxid" :paramsDesc="['Addon id, can be found in addon url']"/>
|
||||
|
||||
## Minecraft
|
||||
|
||||
Refer to [#minecraft](/en/game.html#minecraft)
|
||||
|
||||
@@ -130,6 +130,12 @@ pageClass: routes
|
||||
|
||||
<Route author="Jeason0228" example="/ipsw/index/ipsws/iPhone11,8" path="/ipsw/index/:ptype/:pname/" :paramsDesc="['填写ipsws或otas,得到不同版本的固件','产品名, `http://rsshub.app/ipsw/index/ipsws/iPod`如填写iPad则关注iPad整个系列(ptype选填为ipsws).`http://rsshub.app/ipsw/index/ipsws/iPhone11,8`如果填写具体的iPhone11,8则关注这个机型的ipsws固件信息']"/>
|
||||
|
||||
## Microsoft Edge
|
||||
|
||||
### 扩展更新
|
||||
|
||||
<Route author="hoilc" example="/edge/addon/iikmkjmpaadaobahmlepeloendndfphd" path="/edge/addon/:crxid" :paramsDesc="['扩展 id, 可在扩展页 URL 中找到']" />
|
||||
|
||||
## Minecraft
|
||||
|
||||
见 [#minecraft](/game.html#minecraft)
|
||||
|
||||
@@ -2616,4 +2616,7 @@ router.get('/digic-pictures/:menu/:tags?', require('./routes/digic-pictures/inde
|
||||
// cve.mitre.org
|
||||
router.get('/cve/search/:keyword', require('./routes/cve/search'));
|
||||
|
||||
// Microsoft Edge
|
||||
router.get('/edge/addon/:crxid', require('./routes/edge/addon'));
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
const got = require('@/utils/got');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const crxid = ctx.params.crxid;
|
||||
|
||||
const page_url = `https://microsoftedge.microsoft.com/addons/detail/${crxid}`;
|
||||
|
||||
const { data } = await got({
|
||||
method: 'get',
|
||||
url: `https://microsoftedge.microsoft.com/addons/getproductdetailsbycrxid/${crxid}?hl=zh-CN&gl=CN`,
|
||||
headers: {
|
||||
Referer: page_url,
|
||||
},
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: `${data.name} - Microsoft Edge Addons`,
|
||||
description: data.shortDescription,
|
||||
image: `https:${data.thumbnail}`,
|
||||
link: page_url,
|
||||
item: [
|
||||
{
|
||||
title: data.version,
|
||||
author: data.developer,
|
||||
description: data.description,
|
||||
pubDate: new Date(data.lastUpdateDate * 1000),
|
||||
guid: `edge::${crxid}::${data.version}`,
|
||||
link: page_url,
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user