2 function run_weibo(u, p){
3 console.log("runing weibo");
4 if(document.location.host=='weibo.com') {
7 // clear login dialog from weibo.
8 //check and hidden the login dialog and overlay .....
9 var els = document.querySelectorAll('div[node-type]');
11 for (i = 0; i < els.length; i++) {
12 if (els[i].hasAttribute('node-type')) {
13 if(els[i].getAttribute('node-type') == 'outer'){
18 for (i = 0; i < bbc.length; i++) {// hide all the outer.....
19 bbc[i].style.display = 'none';
23 console.log(document.location.pathname);
24 if(document.location.pathname == '/login.php'){
27 // fills in the user name and password
28 var els = document.querySelectorAll('input[node-type]');
29 console.log(els.length);
31 for (i = 0; i < els.length; i++) {
33 console.log(els[i].name);
34 if (els[i].hasAttribute('node-type')) {
35 if(els[i].getAttribute('node-type') == 'username'){
37 console.log("set pass:" + u);
39 if(els[i].getAttribute('node-type') == 'password'){
41 console.log("set pass:" + p);
47 // simulating click event to login ....
48 var elss = document.querySelectorAll('a[node-type]');
50 for (i = 0; i < elss.length; i++) {
51 if (elss[i].hasAttribute('node-type')) {
53 if(elss[i].getAttribute('node-type') == 'submitBtn'){
55 console.log("press submit");