Last active
April 13, 2019 08:31
-
-
Save momota/6479565b0e36a4abac772b3aff9c39bd to your computer and use it in GitHub Desktop.
Revisions
-
momota revised this gist
Apr 13, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,8 @@ function copyTransaction() { } (function () { let t = copyTransaction(); GM.setClipboard(t); let period = document.querySelector('span.fc-header-title:nth-child(2) > h2:nth-child(1)'); alert('copied: ' + period.innerText); })(); -
momota revised this gist
Apr 13, 2019 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,19 +7,19 @@ // ==/UserScript== function copyTransaction() { let tsv = '', rows = document.querySelectorAll('#cf-detail-table > tbody > tr'); for(let row of rows) { for(let td of row.querySelectorAll('td')) { tsv += td.innerText + '\t'; } tsv += '\n'; } return tsv; } (function () { GM.setClipboard(copyTransaction()); let period = document.querySelector('span.fc-header-title:nth-child(2) > h2:nth-child(1)'); alert('copied: ' + period.innerText); })(); -
momota revised this gist
Apr 13, 2019 . No changes.There are no files selected for viewing
-
momota created this gist
Apr 13, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ // ==UserScript== // @name moneyforward_scraping // @namespace http://momota.github.io/ // @include https://moneyforward.com/cf // @version 1 // @grant GM.setClipboard // ==/UserScript== function copyTransaction() { var csv = '', rows = document.querySelectorAll('#cf-detail-table > tbody > tr'); for(var row of rows) { for(var td of row.querySelectorAll('td')) { csv += td.innerText + '\t'; } csv += '\n'; } return csv; } (function () { GM.setClipboard(copyTransaction()); var period = document.querySelector('span.fc-header-title:nth-child(2) > h2:nth-child(1)'); alert('copied: ' + period.innerText); })();