Skip to content

Instantly share code, notes, and snippets.

@ecoopnet
Created December 10, 2021 00:59
Show Gist options
  • Save ecoopnet/aadf567cf64b959d5a8c847cff1b4be3 to your computer and use it in GitHub Desktop.
Save ecoopnet/aadf567cf64b959d5a8c847cff1b4be3 to your computer and use it in GitHub Desktop.
Violet Monkey Scripts
// ==UserScript==
// @name MoneyForwardユーティリティ
// @namespace Violentmonkey Scripts
// @match https://moneyforward.com/*
// @grant none
// @version 1.0
// @author ecoopnet
// @description 2020/9/11 11:21:36
// ==/UserScript==
$(function(){
$(document).on('click',".graph_data a.btn.range-radio",function(v){
console.log("------VioletMonkey UserScript -----------");
console.log(this.textContent);
let subtotals = [];
for(i = 0; i < categoriesData.length; i++) {
let subtotal = 0;
for(j = 0; j < timeSeriesData.length; j++) {
subtotal += timeSeriesData[j].data[i];
}
subtotals.push(subtotal);
}
//console.log(timeSeriesData);
let result = "";
for(i = 0; i < categoriesData.length; i++) {
let title = categoriesData[i];
let value = subtotals[i];
result += title + "\t" + value.toLocaleString() + "\n";
};
console.log(result);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment