But is has the login code not on the main page but in a IFrame
--
<iframe style='WIDTH:22em; HEIGHT:20em' marginwidth='0' align='center'
marginheight='0' scrolling='no' id='liframe' frameborder='0'
That frame has Email/ Pwd boxes and below that is a "Remember me on this
computer" checkbox which is always ticked. Whenever I login to that, I
need to go at it and uncheck it.
I am trying to develop a greasemonkey script that switches it off.
The relevant code in the above url is:
--
<tr>
<td align="right" valign="top"><input type="checkbox"
name="PersistentCookie" value="yes" checked> <input type="hidden"
name="rmShown" value="1"> </td> <td> <span class="gaia le rem">
Remember me on this computer. </span> </td> </tr>
<!-- LoginElementsSubmitButton.nui=default -->
--
gm trend is to include the main url of the page being displayed so I
should include "http://www.orkut.com/GLogin.aspx"
but I am confused how to make gm travel in to the iframe url from the
main frame url. Should I include
"https://www.google.com/accounts/ServiceLoginBox"?
--
also, I have tried all combination of options of
value="yes/no/0"
checked ="checked/unchecked/no/0"
but, I could not switch that checkbox off from DOM inspector. How to
switch that off?
--
What is
input type="hidden" name="rmShown" value="1"
doing there? Is it affecting the properties of the checkbox?
Adding a small script that I had tried to make for it. It isolates the
checkbox from the page and I am able to see that in Shell 1.4, but it is
not able to switch it off.
In case the attachments are not allowed, here is the code
--
// ==UserScript==
// @name OrkutDontRememberMe
// @namespace http://www.orkut.com/Profile.aspx?uid=17122377302951848639
// @description Switches off "remember me" option on the Orkut login screen.
// @include http://www.orkut.com/GLogin.aspx
// @include https://www.google.com/accounts/ServiceLoginBox
// @exclude
//
// Release: v1.0 dated pending
//
// Developed by: Vikas Pandey <vickyv...@gmail.com>
// ==/UserScript==
var i1=document.getElementsByTagName('td');
var tmpHTML = "";
for (var k=0; k<i1.length; k++) {
if (i1[k].innerHTML.indexOf("PersistentCookie")>-1) {
tmpHTML = i1[k].innerHTML);
i1[k].innerHTML = i1[k].innerHTML.replace("yes", "no");
break;
}
}
--
What all I am doing wrongly.
Thanks.
--
Vikas
The following works fine but you will want to do extensive tests since
Google uses this iframe in other services as well, but the code is a
bit different sometimes (for example, in the e-mail logon page the
checkbox has an *ID* attribute PersistentCookie instead of a *name*.
// ==UserScript==
// @name Blah...
// @namespace blah
// @include https://www.google.com/accounts/ServiceLoginBox?*
// @include http://www.google.com/accounts/ServiceLoginBox?*
// ==/UserScript==
try{
input = document.forms[0].elements.namedItem("PersistentCookie");
input.value = "no";
input.removeAttribute("checked");
} catch(e){}
Last, note that the checkbox is only displayed while you are not
already logged into a Google service; as soon as Google detects your
login cookie (path /account/) the check is not shown any more. This
might have a relation with the rmShow hidden input field.
Hi esqufit,
One good news and one bad news.
Good news is: the above worked perfectly well on FF. disabling gm shows
the box ticked, and enabling gm, with the script installed shows the box
unchecked on orkut login page.
Thanks for it.
The bad news is: the above didn't work in ie 7 beta with ir7pro
installed. ie7pro is said to be gm equivalent for ie, but it seems some
of the above commands are not recognized by ie7pro. I am surprised that
these are basic commands and how can ie work without these commands.
I didn't try with turnabout in ie because I had removed turnabout after
installing because that was clashing with ie7pro. Should I try by
removing ie7pro and installing turnabout.
anyway. I think ie7 question goes beyond the scope of this list.
However, if someone wants to try this in ie, just change the name of the
file from (xxx).user.js to (xxx).ieuser.js
any feedback is welcome.
Thanks.
--
Vikas
input = document.forms[0].PersistentCookie;
input.value = "no";
input.checked = false;
This works fine in ie7pro but only when you load the subframe directly
into IE. This is probably a bug in ie7pro that prevents it from
executing user scripts in iframes.
Anyway, the proper place to continue this discussion or look for a solution is
http://forum.ie7pro.com/
hth
2007/7/6, Vikas Pandey <vickyv...@gmail.com>:
> [...] the above didn't work in ie 7 beta with ir7pro