diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-05-25 14:52:22 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-05-25 14:52:22 +0900 |
| commit | 3f54fb8a2a46da9ee24c893f70c2635a5ca33f9a (patch) | |
| tree | f587946eb2b5e3f9b3c22a6924b7e8cfbbf0bc28 /src/web/app | |
| parent | [Client] Fix bug (diff) | |
| download | misskey-3f54fb8a2a46da9ee24c893f70c2635a5ca33f9a.tar.gz misskey-3f54fb8a2a46da9ee24c893f70c2635a5ca33f9a.tar.bz2 misskey-3f54fb8a2a46da9ee24c893f70c2635a5ca33f9a.zip | |
Use external service for rss xml to json
Diffstat (limited to 'src/web/app')
| -rw-r--r-- | src/web/app/desktop/tags/home-widgets/rss-reader.tag | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/web/app/desktop/tags/home-widgets/rss-reader.tag b/src/web/app/desktop/tags/home-widgets/rss-reader.tag index b8cfd8bddc..9a2b2fce1f 100644 --- a/src/web/app/desktop/tags/home-widgets/rss-reader.tag +++ b/src/web/app/desktop/tags/home-widgets/rss-reader.tag @@ -64,8 +64,6 @@ </style> <script> - this.mixin('api'); - this.url = 'http://news.yahoo.co.jp/pickup/rss.xml'; this.items = []; this.initializing = true; @@ -80,12 +78,12 @@ }); this.fetch = () => { - this.api('/api:rss', { - url: this.url - }).then(feed => { - this.update({ - initializing: false, - items: feed.rss.channel.item + fetch(`https://api.rss2json.com/v1/api.json?rss_url=${this.url}`).then(res => { + res.json().then(feed => { + this.update({ + initializing: false, + items: feed.items + }); }); }); }; |