LoginSignup
1
1

More than 5 years have passed since last update.

Freeeの勘定科目の削除を半自動するjsshellスクリプト

Posted at

経緯

Freee APIを使って、勘定科目を登録するアプリケーションを書いていた
編集や削除APIが公開されていないため、ブラウザから手動で消す必要がありました。
(問い合わせたところ、対応する予定は今のところないとのこと)
また、勘定科目の画面はまとめて削除ができない。
確認のたびにひとつひとつ消すの手間だったので、jsshellつかって半自動で消すことにした。

jsshellもう随分と更新がされてないけど、目的は達せられたので良しとする

コード

一番上に表示されている勘定科目を消す

$('div.account-item-tr.clickable:first').trigger('click');
setTimeout(function(){
    $('button.btn.btn-danger:first').trigger('click');
    //確認画面のクリックを残したい場合は以下をコメントアウト
    setTimeout(function(){
        $('button.btn-large.btn-danger:first').trigger('click');
    }, 800);
}, 800);

使い方

https://secure.freee.co.jp/account_items で検索画面で消したい科目を絞り込む
jshellを開いて上のコードをコピーしてrunを押すと消える。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1