Last active
October 10, 2019 07:51
-
-
Save hexagit/60e948148fe81b1f810e7251be44ad48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
// 日付を追加 | |
const year = $("#Year"); | |
const month = $("#Month"); | |
const date = $("#Date"); | |
for (var i = 2019; i <= 2024; i++) { | |
year.append('<option value="' + i + '">' + i + '</option>'); | |
} | |
for (var i = 1; i <= 12; i++) { | |
month.append('<option value="' + i + '">' + i + '</option>'); | |
} | |
for (var i = 1; i <= 31; i++) { | |
date.append('<option value="' + i + '">' + i + '</option>'); | |
} | |
// 今日を設定 | |
var today = new Date(); | |
year.val(today.getFullYear()); | |
month.val(today.getMonth() + 1); | |
date.val(today.getDate()); | |
// 検索ボタンが押された時の処理 | |
const searchButton = $("#SearchButton"); | |
searchButton.click(function () { | |
chrome.runtime.sendMessage({ | |
type: "OpenPage", | |
date: year.val() + "." + month.val() + "." + date.val(), | |
}, function (type) { | |
window.close(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment