Skip to content

Instantly share code, notes, and snippets.

@mactkg
Last active February 20, 2016 07:51
Show Gist options
  • Save mactkg/6370c9f97e92d39ff997 to your computer and use it in GitHub Desktop.
Save mactkg/6370c9f97e92d39ff997 to your computer and use it in GitHub Desktop.
同じメンバーで違うカレンダー共有くん
// 共有したいアドレスを持ったカレンダーの管理ページで実行する
var mail = Array.prototype.map.call(document.querySelectorAll('.al-ctx-lbl'), e => e.innerHTML)
// 共有したいカレンダーの管理ページで実行する
// 0_getAllAddressFromGCal.js で手に入れた配列を var mail = ... として定義してから実行
mail.forEach((address, i) => {
setTimeout(() => {
var level = 70 // 変更及び共有の管理権
// var level = 60 // 予定の変更権限
// var level = 20 // 閲覧権限(すべての予定の詳細)
// vae level = 10 // 予定の時間枠のみを表示(詳細を非表示)
document.getElementById('newAccessPerson').value = address
document.getElementById('newAccessLevel').value = level
document.querySelector('#detailsAddAccessRow [type=submit]').click()
}, i*100)
})
setTimeout(() => { alert('完了! アドレスと管理権を確認の上,「保存」を押してください') }, mail.length * 110)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment