// ==ClosureCompiler== // @output_file_name default.js // @compilation_level SIMPLE_OPTIMIZATIONS // @language_out ECMASCRIPT_2017 // ==/ClosureCompiler== javascript: ( async function (pages,windows) { //何ページ目まで繰り返すか、各自で変えてください。 let maxpage = 5; //ボタンのクリックで開くウィンドウの数 let maxwindows = 5; if(Number.isInteger(pages)){ maxpage=pages; } if(Number.isInteger(windows)){ maxwindows=windows; } const anntena = 'https://blog.hatena.ne.jp/-/antenna'; if (window.location.href.indexOf("https://blog.hatena.ne.jp/-/antenna") != 0) { let ans = confirm('ページが違います。購読リストへ移動します'); if(ans){ window.location.href = anntena; return; } } $('div.l-admin-subscribe-wrapper-left').remove(); $('div.l-admin-subscribe-wrapper-right').remove(); const bloglist = []; for (let p = 1; p <= maxpage; p++) { console.info('page:%s', p); updateCaption(`${p}/${maxpage} ページ目`); let html = await getHTML(anntena + '?page=' + p); let li = $(html).find('li.subscribed-list-list'); console.log('li count = %s', li.length); for (let i = 0; i < li.length; i++) { bloglist.push(li[i]); } } updateCaption(`リスト作成中...`); console.info('blog count = %s', bloglist.length); let summary = ""; for (let i in bloglist) { let ans = parse(bloglist[i]); console.log(ans); summary += `