| import detectBrowser from 'licia/detectBrowser' | |
| import detectOs from 'licia/detectOs' | |
| import escape from 'licia/escape' | |
| const browser = detectBrowser() | |
| export default [ | |
| { | |
| name: 'ロケーション', | |
| val() { | |
| return escape(location.href) | |
| }, | |
| }, | |
| { | |
| name: 'ユーザーエージェント', | |
| val: navigator.userAgent, | |
| }, | |
| { | |
| name: 'デバイス', | |
| val: [ | |
| '<table><tbody>', | |
| `<tr><td class="eruda-device-key">スクリーン</td><td>${screen.width} * ${screen.height}</td></tr>`, | |
| `<tr><td>ビューポート</td><td>${window.innerWidth} * ${window.innerHeight}</td></tr>`, | |
| `<tr><td>画素比</td><td>${window.devicePixelRatio}</td></tr>`, | |
| '</tbody></table>', | |
| ].join(''), | |
| }, | |
| { | |
| name: 'システム', | |
| val: [ | |
| '<table><tbody>', | |
| `<tr><td class="eruda-system-key">os</td><td>${detectOs()}</td></tr>`, | |
| `<tr><td>ブラウザー</td><td>${ | |
| browser.name + ' ' + browser.version | |
| }</td></tr>`, | |
| '</tbody></table>', | |
| ].join(''), | |
| }, | |
| { | |
| name: 'Erudaについて', | |
| val: | |
| '<a href="https://eruda.liriliri.io" target="_blank">Eruda v' + | |
| VERSION + | |
| '</a>', | |
| }, | |
| { | |
| name: '後援者', | |
| val() { | |
| return ` | |
| <a rel="noreferrer noopener" href="https://opencollective.com/eruda" target="_blank"> | |
| <img data-exclude="true" style="width: 100%;" loading="lazy" src="https://opencollective.com/eruda/backers.svg?width=${ | |
| window.innerWidth * 1.5 | |
| }&exclude=true"> | |
| </a>` | |
| }, | |
| }, | |
| ] | |