projects
/
app.webkitpdf
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
domains/itbusinessnet.com.js
[app.webkitpdf]
/
weibo.js
diff --git
a/weibo.js
b/weibo.js
index
f2073ca
..
0f638e2
100644
(file)
--- a/
weibo.js
+++ b/
weibo.js
@@
-19,43
+19,46
@@
function run_weibo(u, p){
bbc[i].style.display = 'none';
}
bbc[i].style.display = 'none';
}
- //try to login
+ //try to login
+ console.log(document.location.pathname);
if(document.location.pathname == '/login.php'){
if(document.location.pathname == '/login.php'){
- console.log("runing weibo login");
+
+
// fills in the user name and password
var els = document.querySelectorAll('input[node-type]');
// 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++) {
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;
if (els[i].hasAttribute('node-type')) {
if(els[i].getAttribute('node-type') == 'username'){
els[i].value = u;
+ console.log("set pass:" + u);
}
if(els[i].getAttribute('node-type') == 'password'){
els[i].value = p;
}
if(els[i].getAttribute('node-type') == 'password'){
els[i].value = p;
+ console.log("set pass:" + p);
}
}
+
}
}
}
}
- //return;
// simulating click event to login ....
var elss = document.querySelectorAll('a[node-type]');
// simulating click event to login ....
var elss = document.querySelectorAll('a[node-type]');
-
- var event = document.createEvent("HTMLEvents");
for (i = 0; i < elss.length; i++) {
if (elss[i].hasAttribute('node-type')) {
for (i = 0; i < elss.length; i++) {
if (elss[i].hasAttribute('node-type')) {
+
if(elss[i].getAttribute('node-type') == 'submitBtn'){
if(elss[i].getAttribute('node-type') == 'submitBtn'){
- elss[i].fireEvent("onClick", event)
- // elss[i].click();
+ elss[i].click();
console.log("press submit");
console.log("press submit");
-
return
;
+
break
;
}
}
}
}
}
}
-
-
}
}
-
+ return;
}
}
}
}