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 if(document.location.pathname == '/login.php'){
26 // fills in the user name and password
27 var els = document.querySelectorAll('input[node-type]');
29 for (i = 0; i < els.length; i++) {
30 if (els[i].hasAttribute('node-type')) {
31 if(els[i].getAttribute('node-type') == 'username'){
33 console.log("set pass:" + u);
35 if(els[i].getAttribute('node-type') == 'password'){
37 console.log("set pass:" + p);
43 // simulating click event to login ....
44 var elss = document.querySelectorAll('a[node-type]');
46 for (i = 0; i < elss.length; i++) {
47 if (elss[i].hasAttribute('node-type')) {
48 if(elss[i].getAttribute('node-type') == 'submitBtn'){
50 console.log("press submit");