Skip to content

Instantly share code, notes, and snippets.

@phy25
Created July 10, 2014 04:17
Show Gist options
  • Save phy25/ae5fa9c49bca52b8075e to your computer and use it in GitHub Desktop.
Save phy25/ae5fa9c49bca52b8075e to your computer and use it in GitHub Desktop.
广东高考 Google Chrome 查分小帮手
function input(){var a = document.getElementById('zkzh'), b = document.getElementById('csny'), c = document.getElementById('yzm');if(a) a.value = '[准考证号]';if(b) b.value = '[四位出生年月]';if(c) c.focus();}
function inject(c){
var elt = document.createElement("script");
elt.innerHTML = c;
document.head.appendChild(elt);
}
window.addEventListener("message", function(event) {
// We only accept messages from ourselves
if (event.source != window)
return;
if (event.data.type && (event.data.type == "INPUT")) {
input();
}
}, false);
input();
inject("refreshCode();window.addEventListener('keyup', function(e){if(e.keyCode == 13){chkInput();return false();}if(e.keyCode == 27){window.postMessage({ type: 'INPUT' }, '*');}});");
{
"manifest_version": 2,
"name": "5184 验证码",
"description": "5184 验证码",
"version": "0.1",
"permissions": [
],
"content_scripts": [
{
"matches": [
"http://www.5184.com/gk/check_index.html*"
],
"js": ["5184.js"],
"run_at": "document_end",
"all_frames": true
},
{
"matches": [
"http://120.197.89.132:8800/myExamWeb/wap/school/gaokao/loveHS!query*"
],
"js": ["wxcs.js"],
"run_at": "document_end",
"all_frames": true
},
{
"matches": [
"http://120.197.89.132:8800/myExamWeb/wap/school/gaokao/loveHS!dispatcher.action*"
],
"js": ["wxcsback.js"],
"run_at": "document_end",
"all_frames": true
}
]
}
var a = document.getElementsByName('examReferenceNo'), b = document.getElementsByName('birthday'), c = document.getElementsByName('userName'), d = document.getElementsByName('mobileNo'), e = document.querySelector('input[type=submit]');
if(a[0]) a[0].value = '[准考证号]';
if(b[0]) b[0].value = '[四位出生年月]';
if(c[0]) c[0].value = '[姓名]';
if(d[0]) d[0].value = '13902771234';// 随便填一个,无需修改
if(e) e.focus();
if(document.body.innerText.indexOf('尊敬的用户,暂无您的考试成绩') != -1){
setTimeout(function(){history.back();}, 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment