+The Old Reader
@@ -3,19 +3,23 @@
* @description subscribe to feed in The Old Reader
* @include http://*
* @include https://*
+ * @contributor noromanba http://let.hatelabo.jp/noromanba/let/gYC-x-_E8PL0OA
* @license MIT License http://opensource.org/licenses/MIT
* @javascript_url
*/
-(function () {
- var query = [
- 'link[href][rel=alternate][type^="application/atom"]',
- 'link[href][rel=alternate][type^="application/rss"]'
- ].join(',');
- var feed = document.querySelector(query);
+(() => {
+ 'use strict';
+
+ const feed = document.querySelector([
+ 'link[href][rel=alternate][type^="application/atom"]',
+ 'link[href][rel=alternate][type^="application/rss"]',
+ ]);
if (!feed) return;
- // c.f. "Tips & Tricks" in https://theoldreader.com/pages/tour
- var reader = 'https://theoldreader.com/feeds/subscribe?url=';
- location.href = reader + encodeURIComponent(feed.href);
+ // c.f. "Tips & Tricks"
+ // https://theoldreader.com/pages/tour
+ const reader = 'https://theoldreader.com/feeds/subscribe?url=';
+ window.open(reader + encodeURIComponent(feed.href));
})();
+
(() => {
'use strict';
const feed = document.querySelector([
'link[href][rel=alternate][type^="application/atom"]',
'link[href][rel=alternate][type^="application/rss"]',
]);
if (!feed) return;
const reader = 'https://theoldreader.com/feeds/subscribe?url=';
window.open(reader + encodeURIComponent(feed.href));
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。