LoginSignup
2
3

More than 5 years have passed since last update.

BasecampのTodo項目を自動で大量に登録する

Posted at

なにかの都合で、Todo ListにTodo項目をたくさん作りたいことがある。アップロード機能がない気がするので、ブラウザのコンソールを開いてJSを実行する。

var array = ["項目1", "項目2", ..., "項目300"];

array.forEach(function(val, index) {
  setTimeout(function() {
    $("ul.new li a").expand();
    setTimeout(function() {
      $("textarea#todo_content").val(val);
      $("input[name=commit]").click()
    }, 300);
  }, 2000*index);
});

タイムアウトの時間を調整すると、もっと速くできると思う。

2
3
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
2
3