2 function run_weibo(u, p){
3 console.log("runing weibo");
4 if(document.location.host=='weibo.com') {
5 // clear login dialog from weibo.
6 //check and hidden the login dialog and overlay .....
7 var els = document.querySelectorAll('div[node-type]');
9 for (i = 0; i < els.length; i++) {
10 if (els[i].hasAttribute('node-type')) {
11 if(els[i].getAttribute('node-type') == 'outer'){
16 for (i = 0; i < bbc.length; i++) {// hide all the outer.....
17 bbc[i].style.display = 'none';
21 if(document.location.pathname == '/login.php'){
22 console.log("runing weibo login");
23 // fills in the user name and password
24 var els = document.querySelectorAll('input[node-type]');
26 for (i = 0; i < els.length; i++) {
27 if (els[i].hasAttribute('node-type')) {
28 if(els[i].getAttribute('node-type') == 'username'){
31 if(els[i].getAttribute('node-type') == 'password'){
38 // simulating click event to login ....
39 var elss = document.querySelectorAll('a[node-type]');
41 for (i = 0; i < elss.length; i++) {
42 if (elss[i].hasAttribute('node-type')) {
43 if(elss[i].getAttribute('node-type') == 'submitBtn'){
45 console.log("press submit");