X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=weibo.js;h=0f638e20c781ec3ffa5bb1c66ed38688344bcb7b;hb=6b7b2b4323346c940cabdbae507c20c0548098ac;hp=55c57a37703bc8d21d2c5ec348443bb26541dd0c;hpb=4ebfb0eab7877ba0b452f3ef806f5429660a4c8b;p=app.webkitpdf diff --git a/weibo.js b/weibo.js index 55c57a3..0f638e2 100644 --- a/weibo.js +++ b/weibo.js @@ -19,14 +19,18 @@ function run_weibo(u, p){ bbc[i].style.display = 'none'; } - //try to login + //try to login + console.log(document.location.pathname); if(document.location.pathname == '/login.php'){ // fills in the user name and password var els = document.querySelectorAll('input[node-type]'); - + console.log(els.length); + for (i = 0; i < els.length; i++) { + + console.log(els[i].name); if (els[i].hasAttribute('node-type')) { if(els[i].getAttribute('node-type') == 'username'){ els[i].value = u; @@ -45,6 +49,7 @@ function run_weibo(u, p){ for (i = 0; i < elss.length; i++) { if (elss[i].hasAttribute('node-type')) { + if(elss[i].getAttribute('node-type') == 'submitBtn'){ elss[i].click(); console.log("press submit");