/*
* @title &decode
* @description stupid decoder of numeric-character/character-entity reference
* @include http://*
* @include https://*
* @license MIT License http://opensource.org/licenses/MIT
* @javascript_url
*/
// e.g.
// http://s.hatena.ne.jp/entries.json?uri=http://let.hatelabo.jp/noromanba/let/gYC-x6_02LnWEg
(() => {
'use strict';
const letter = String(window.getSelection());
if (!letter) return;
const decoded = Object.assign(document.createElement('textarea'),
{ innerHTML: letter }
).value;
// You can copy to Ctrl/Command + C; w/o some Linux DE
window.alert(decoded);
})();