/*
* @title +DL
* @description links to downloadable; e.g. txt/html
* @include http://*
* @include https://*
* @license MIT License https://opensource.org/licenses/MIT
* @author noromanba https://noromanba.github.com
* @javascript_url
*/
// e.g.
// https://hatena.g.hatena.ne.jp/hatenagroup/20191115/1573811864
// http://g.hatena.ne.jp/help#exportdiary
// https://<GROUP_NAME>.g.hatena.ne.jp/<HATENA_ID>/configdetail
// https://<GROUP_NAME>.g.hatena.ne.jp/<HATENA_ID>/export
(() => {
'use strict';
[...document.querySelectorAll([
'a[href]:not([download])',
])].forEach(link => {
link.download =
link.href.split('/').pop() ||
link.alt ||
link.name ||
link.textContent;
});
})();
/* from *dumb* phone */