Skip to content

Instantly share code, notes, and snippets.

@mingtsay
Last active August 29, 2015 14:27
Show Gist options
  • Save mingtsay/6a9460aa4b86a3d3bbe1 to your computer and use it in GitHub Desktop.
Save mingtsay/6a9460aa4b86a3d3bbe1 to your computer and use it in GitHub Desktop.
script for ibon document upload view status (for http://www.ibon.com.tw/printscan_ie.aspx#D0131)
// save the interval id for stop the script
window._ibon_doc_interval = setInterval(function() {
// function for get element by id
b = function(id) { return (this.getElementById ? this : document).getElementById(id); };
// close the status window if exists
if (a = b("majorContents"))
b.call(a.contentDocument, "inquiry_btn").getElementsByTagName("a")[0].click();
// fill in the document code
b("txtPinCode").value="1234567890";
// fill in the verification code
b("txtVerificationCode").value="123456";
// submit to view the document status
SendProcess_PrintScan_FileStatus(null, true);
}, 5000);
// run the script every 5 seconds
// use the following code to stop this script
// clearInterval(window._ibon_doc_interval);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment