AutoPagerize for SeaHorseをwedata互換形式に変換する
こんな感じにすればいい。
あとは、jQueryか、か、404 · GitHubあたりを@requireで取り込めば、Greasemonkey版のAutoPagerizeとSeaHorse版のSITEINFOの橋渡しができそう。
const SITEINFO_URLS = [ 'http://wikiwiki.jp/958/?cmd=source&page=AutoPagerize%2FSITEINFO', 'http://wikiwiki.jp/958/?cmd=source&page=AutoPagerize%2FSITEINFO2' ]; var result = [], done = 0; SITEINFO_URLS.forEach(function (url) { GM_xmlhttpRequest({ url: url, method: "get", onload: function (res) { var source = new DOMParser().parseFromString(res.responseText, "text/xml") // overrideMimeType->responseXML can't use .getElementById("source").textContent.split("\n"), o; source.forEach(function (str) { var m; if (m = /^\s*\*\*\s*([^\[]*)/.exec(str)) result.push({name: m[1], data: o = {}}); else if (m = /\s*(\w+):\s*'(.*)',/.exec(str)) o[m[1]] = m[2]; }); if (++done == SITEINFO_URLS.length) unsafeWindow.x = (JSON.stringify(result)); } }); });