Skip to content

Instantly share code, notes, and snippets.

@i2tsuki
Last active May 5, 2016 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i2tsuki/2bb3f561cee206eba2737f875317ffb1 to your computer and use it in GitHub Desktop.
Save i2tsuki/2bb3f561cee206eba2737f875317ffb1 to your computer and use it in GitHub Desktop.
ITS のアレを埋めるためのブックマークレット
// 使い方: ブックマークレット, chrome にて動作確認
// javascript を minify
// $ pip install jsmin
// $ python -m jsmin its_auto_input.js
// 出力結果をブックマークの URL 箇所に貼付
// 対象ページにて実行
javascript:(function(){
sign_no = "1000"; // 事業所番号
insured_no = "1000"; // 被保険者番号
office_name = "ITS"; // 事業所名
kana_name = "アイティエス タロウ"; // 申込代表者名(カナ氏名)
year = "1950"; // 年 (西暦)
month = "1"; // 月 (数字)
day = "31"; // 日 (数字)
gender = "man"; // 性別 ("man" or "woman")
relationship = "myself"; // 続柄 ("myself" or "family")
contact_phone = "08012345678"; // 連絡先電話番号
postal = "1248565"; // 郵便番号
state = "13"; // 都道府県 (例: 11: 埼玉県, 13: 東京都, 14: 神奈川県)
address = "葛飾区小菅1-35-1"; // 住所
join_time = "2016-07-01"; // 希望日
stay_persons = "7"; // 宿泊人数
hope_rooms = "2" // 希望部屋数
hope_room1 = "4";
hope_room2 = "3";
document.getElementsByName("apply[sign_no]").item(0).value = sign_no;
document.getElementsByName("apply[insured_no]").item(0).value = insured_no;
document.getElementsByName("apply[office_name]").item(0).value = office_name;
document.getElementsByName("apply[kana_name]").item(0).value = kana_name;
document.getElementsByName("apply[year]").item(0).value = year;
document.getElementsByName("apply[month]").item(0).value = month;
document.getElementsByName("apply[day]").item(0).value = day;
document.getElementsByName("apply[gender]").item(0).value = gender;
document.getElementsByName("apply[relationship]").item(0).value = relationship;
document.getElementsByName("apply[contact_phone]").item(0).value = contact_phone;
document.getElementsByName("apply[postal]").item(0).value = postal;
document.getElementsByName("apply[state]").item(0).value = state;
document.getElementsByName("apply[address]").item(0).value = address;
document.getElementsByName("apply[join_time]").item(0).value = join_time;
document.getElementsByName("apply[stay_persons]").item(0).value = stay_persons;
document.getElementsByName("apply[hope_rooms]").item(0).value = hope_rooms;
show_house_num($(document.getElementsByName("apply[hope_rooms]").item(0)));
document.getElementsByName("apply[hope_room1]").item(0).value = hope_room1;
document.getElementsByName("apply[hope_room2]").item(0).value = hope_room2;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment