autologin

in Ideas and script requests
Subscribe to autologin 29 posts, 8 voices



colore User

hello

I need a script that will autofill my login info, then autoclick the "login" button and then click two specific links, one after the other.

this should work in a specific domain.com and be triggered automatically

can you tell me please how to do it, just give me an example for domain.com and I will replace it with the actual url

thanks

 
alien_scum Scriptwright

You could try this AutoLogin script, it will automaticaly subit the form if firefox fills in you user name and password from it's list. If you want to limit the sites it works on just change the @includes and @exludes

 
colore User

not exactly what I want...

 
znerp Scriptwright

colore, I think you might have to be more specific if you want help with your problem...

 
colore User

znerp, what you didnt understand? I describe exactly what the script should do

 
znerp Scriptwright

There are a number of autologin scripts on userscripts, which will probably be able to cope with logging you in on the site which you want. The issue that I personally had with your request is where you said...

and then click two specific links, one after the other.
This would probably be very do-able, but with no more information than this it would be very difficult for anyone to help you with this part of your request.

 
alien_scum Scriptwright

To really help more detail would be very useful, if you just want to login and go to a certain page, then you can use that AutoLogin script and a variation of this (although you might want to use location.replace() instead of location.href=).

If on the other hand you actually need to click the links then that is whole different kettle of fish.

 
colore User

I want to autologin (type login info and hit enter) in this webpage yahoo webmail webpage whenever the login form exists and then to autoclick and go to the inbox webpage

 
LouCypher Scriptwright

Just bookmark

https://login.yahoo.com/config/login?login=your_login_name&passwd=your_password&.done=http://your_mail_server.mail.yahoo.com/ym/ShowFolder?rb=Inbox
your_mail_server = for example: us.f117

 
colore User

thank you very much, but can I make it to autoperfom these actions without having me to click it?

the trigger should be the instance of the specific yahoomail login form

also, can I use a wildcard for the your_mail_server ? something like, http://*.mail.yahoo.com/ym/ShowFolder?rb=Inbox

thanks

 
colore User

anyone?

I already know that document.addEventListener('DOMContentLoaded' works...

 
Descriptor Scriptwright

If you want a user script for Opera Browser, you should probably point that out.

 
colore User

I will use it in opera, but why should I point it out?

this website is for userscripts (javascripts) not greasemonkey scripts

and opera supports plain javascript

in case I wanted a greasemonkey script I should point it out

 
Descriptor Scriptwright

Someone can correct me if I'm wrong, but I don't see Opera mentioned anywhere on this site, I think there are about 18 posts with the word "Opera".


Userscripts.org forums

This is a place to discuss Greasemonkey, JavaScript, and other ways of remixing the web and making it your own.

That can include Opera User JavaScripts, but it seems to me that Greasemonkey is implied.
The point being that many of the suggestions offered apply only to Greasemonkey scripts.

It seems to me that the ==UserScript== comment block does nothing in Opera, but Opera sees the file extension .user.js as a Greasemonkey script, which is what all the scripts here use.
But I'm new here so maybe I'm stupid.

 
Joel H Scriptwright

Descriptor is generally correct in stating that it's primarily a greasemonkey site; note the default user icon is a larger version of the (adorable) greasemonkey logo.

But he also said "... and other ways of remixing the web."; as a result, greasemonkey is assumed but not required. The main reason to specify opera, though, is that not all javascript implementations are the same, so javascript code that works on one platform may not work on others, especially if it involves xpath or xmlhttprequest calls. The upshot is that a firefox script may not work correctly on opera or IE or <insert browser here>, so anything other than the default (meaning most recent versions of firefox and greasemonkey) should be stated.

-Joel

 
Descriptor Scriptwright

Thanks Joel H, I didn't go into computability issues because I figured it was pretty close to Firefox.
Opera 9 does support XPath 1.0, Opera 9 supports the entire ECMA-262 2ed and 3ed standards, with no exceptions. Also XMLHTTPRequest support.
See: http://www.opera.com/docs/specs/

That means Opera is on JavaScript 1.5, so some new Gecko DOM/JavaScript methods won't work (i.e. Array extras) like forEach(). And Opera has it's own DOM objects like window.opera which I don't think Opera allows in a Greasemonkey script anyway.
So a script should work, but if it didn't it would probably just need a little object sniffing to fix it.

 
colore User

anyway, what I need is a pure javascript script

 
Descriptor Scriptwright

Opera technically doesn't support JavaScript, JavaScript is Netscape's cross-platform, object-based scripting language. Opera supports ECMAScript. But I'm just giving you a bad time because you're not paying attention.

also, can I use a wildcard for the your_mail_server ? something like, http://*.mail.yahoo.com/ym/ShowFolder?rb=Inbox

No, you have to use a regular expression and..
use location.replace() instead of location.href=

Yes, all the scripts here use JavaScript, and there are plenty examples of form scripts.

 
colore User

can you tell me please how to login to https://tools.otenet.gr/tools/index.do and then go to http://tools.otenet.gr/tools/tiles/web2sms.do?s... ?

 
Descriptor Scriptwright

There are several ways, probably half a dozen ways, see if this works since this is probably the common method here...
Obviousely change the UPPERCASE values.

if((window.location.href == "https://tools.otenet.gr/tools/index.do") && document.forms.namedItem("loginform")){
  document.forms.namedItem("loginform").elements.namedItem("username").value = "LOGINNAME";
  document.forms.namedItem("loginform").elements.namedItem("password").value = "PASSWORD";
  document.forms.namedItem("loginform").submit();
}

if(window.location.href == "https://tools.otenet.gr/tools/NEXTPAGE"){
  window.location.href = "http://tools.otenet.gr/tools/tiles/web2sms.do?showPage=smsSend&mnu=smenu23";
}

That second part can be a problem because you need a very specific URL or item on the NEXTPAGE so that it doesn't fire on the wrong page.

 
colore User

thanks

can you make this trigger when I visit this webpage automaticaly?

PS: where I can find a complete reference of the commands and a tutorial for javascript as an object oriented language (I only find as a webdesign language)

 
Joel H Scriptwright

[[[ Descriptor:
This is a bit off topic; perhaps we should make another thread for this.

Thanks for filling in for me on Opera's capabilities; it's not a system I've worked with before.

I'll assume you're right with Opera's xpath and that they have an implementation of the XMLHTTPRequest, but I don't think it behaves the same way greasemonkey's does. The vast majority of XMLHTTPRequest functions are restricted to sending requests to the same host name that the page came from. This is to prevent any malicious scripts from using people viewing the site to unknowingly be, say, flood-pinging someone's web server. Greasemonkey gets a special implementation of XHR, which can request from any host. The reason this is safe is that you (should) know what scripts you have installed and what they contain. Incidentally, this is one of the biggest reasons why the unsafeWindow is unsafe; if the object is used, malicious javascript on a website could theoretically steal the greasemonkey version of XHR and use it maliciously.

The Point: Greasemonkey scripts that depend on XHR calls to sites different than the domain of the original site may not work outside of greasemonkey.

-Joel ]]]

 
Descriptor Scriptwright

@colore

can you make this trigger when I visit this webpage automaticaly?

That was why I used the if() statement. I don't know anything about Opera User Scripts other than what I read at the Opera support page that I linked to. I have no idea how an Opera User Script is activated. I suspect you also have to use document.addEventListener('DOMContentLoaded'... like you mentioned above. There are many things I don't know about Opera since I haven't used it for years, but they do list all supported JavaScript and DOM methods somewhere on their site.
There are many sites that have JavaScript tutorials, but I've found most of them teach bad code (IE JScript and outdated code), or hard to navigate or too many ads/cookies/popups.
The best resource is at Mozilla.
http://developer.mozilla.org/en/docs/Main_Page
The reference
http://developer.mozilla.org/en/docs/Core_JavaS...
http://developer.mozilla.org/en/docs/Core_JavaS...
And DOM - of which Opera supports most of
http://developer.mozilla.org/en/docs/DOM
Peter-Paul Koch explains some of the hard to understand stuff
http://www.quirksmode.org/resources.html
Danny G has some great reference
http://www.dannyg.com/
Especially the printable quick-reference
http://www.dannyg.com/ref/jsquickref.html
And for HTML and CSS I use w3.org
http://www.w3.org/TR/html401/index/elements.html
http://www.w3.org/TR/CSS21/propidx.html
I used to use faqts.com but I donno what's going on there, maybe just bad code? or too many ads.
There must be an Opera User JavaScript site somewhere

@Joel H - I know, maybe Opera should be in the subject or maybe this just ain't the place, but it's not a subject I can start.
It's just that Opera is a good browser and if people want to use it and Opera wants to (try) to support Greasemonkey scripts, then I'm willing to try and make them compatible - if it's just a matter of using a simple if() statement to prevent the script from totally failing in Opera then I don't have a problem with that.
However I'd rather not have to worry about browser compatibility, and I've no interest in learning Opera DOM.
If you get my drift...

 
Joel H Scriptwright

@Descriptor

Yeah, I think we're pretty much on the same page here. Looking forward to working with Opera as well, especially if the javascript and DOM work the same way, so they can be identical scripts.

-Joel

 
Richard-Valley User

Thanks alien_scum for the referral to the autologin script. This answered a question I had (why users are not asked all the initial times to save log-in after manually logging into a web site).

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel