@@ -4,10 +4,10 @@ const outlines = sites.filter(site => site.rss).map(site => {
5const template = `<?xml version="1.0" encoding="UTF-8"?><opml version="1.1"><head></head><body>${outlines.join('')}</body></opml>`
5const template = `<?xml version="1.0" encoding="UTF-8"?><opml version="1.1"><head></head><body>${outlines.join('')}</body></opml>`
7−window.onload = function () {
7+window.addEventListener('DOMContentLoaded', () => {
8 const a = document.getElementById('opml')
8 const a = document.getElementById('opml')
10 a.setAttribute('href', 'data:text/plain;charset=utf-8,' + window.encodeURIComponent(template))
10 a.setAttribute('href', 'data:text/plain;charset=utf-8,' + window.encodeURIComponent(template))
11 a.setAttribute('download', 'webring.opml')
11 a.setAttribute('download', 'webring.opml')