Last active
February 6, 2018 03:08
-
-
Save osk2/9cc1a0d97ee13f7b3a1153aa55366723 to your computer and use it in GitHub Desktop.
Auto apply Taishin activities
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
(function () { | |
var strings = { | |
id: '%E8%BA%AB%E5%88%86%E8%AD%89%E5%AD%97%E8%99%9F', | |
// id = "身分證字號" | |
tip: '%E5%97%A8%EF%BC%8C%E8%BC%B8%E5%85%A5%E5%BE%8C%E6%9C%83%E8%87%AA%E5%8B%95%E9%80%81%E5%87%BA%E5%93%A6%EF%BC%9A%EF%BC%89' | |
// tip = "嗨,輸入後會自動送出哦:)" | |
} | |
var id = prompt(decodeURIComponent(strings.id), 'A123456789'); | |
if (id) { | |
$('#CustID').val(id); | |
$('.jqTransformCheckbox').addClass('jqTransformChecked'); | |
$('input[name="EventIDs"]').prop('checked', true); | |
$('#checkCode').focus().bind('keyup', function () { | |
// Since Taishin uses jQuery 1.6 (no kidding), we can only use `bind()` here | |
if ($(this).val().length >= 6) { | |
checkInput(); | |
} | |
}); | |
$('.txt_05.pt5').after('<h3 style="color: red">' + decodeURIComponent(strings.tip) + '</h3>'); | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minified version