+ //try to login
+ if(document.location.pathname == '/login.php'){
+
+ // fills in the user name and password
+ var els = document.querySelectorAll('input[node-type]');
+
+ for (i = 0; i < els.length; i++) {
+ if (els[i].hasAttribute('node-type')) {
+ if(els[i].getAttribute('node-type') == 'username'){
+ els[i].value = u;
+ }
+ if(els[i].getAttribute('node-type') == 'password'){
+ els[i].value = p;
+ }
+ }
+ }
+
+
+ // simulating click event to login ....
+ var elss = document.querySelectorAll('a[node-type]');
+
+ for (i = 0; i < elss.length; i++) {
+ if (elss[i].hasAttribute('node-type')) {
+ if(elss[i].getAttribute('node-type') == 'submitBtn'){
+ elss[i].click();
+ }
+ }
+ }
+
+
+ }
+
+ }
+})