Automatic logging into dataexplorer

On most SE sites when i visit them it says i've been logged in and asks me to refresh the page.

Why does it not do this for the dataexplorer?

-

Global login is not open source, nor really open-source-able.

Since the Data Explorer IS, we can't easily enable global login for it.

-
Is this also the reason I have to log into data.se anew every day, while I this is not the case at all other SE sites? (This might also have something to do with my using Ghostery, but that doesn't seem to be a problem for other sites.) –  doncherry Nov 19 '12 at 20:21

Having to relogin every day is a right pain -- especially since unlogged-in users have to always fill in the CAPTCHA field to run queries.

Here is a simple Greasemonkey script that logs in automatically:

// ==UserScript==
// @name     StackExchange Data Explorer, auto login
// @match    *://data.stackexchange.com/*/query/*
// @require  https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
/*- The @grant directive is needed to work around a design change introduced
in GM 1.0.   It restores the sandbox.
*/

if (/^https?:\/\/data\.stackexchange\.com\/[^\/]+\/query\/.+/i.test (location.href) ) {
}
}
else if (/^https?:\/\/data\.stackexchange\.com\/account\/login.+/i.test (location.href) ) {
var clickEvent  = document.createEvent ('MouseEvents');
clickEvent.initEvent ('click', true, true);
jNode[0].dispatchEvent (clickEvent);
}

"#openid_btns a.aol"
"#openid_btns a.blogger"
"#openid_btns a.claimid"
"#openid_btns a.clickpass"
"#openid_btns a.livejournal"
"#openid_btns a.myopenid"
"#openid_btns a.stackexchange"
"#openid_btns a.verisign"
"#openid_btns a.wordpress"
"#openid_btns a.yahoo"
*/
}


Notes:

1. The script uses MyOpenID. For other providers, change the waitForKeyElements selector to the appropriate value listed in the comment.
2. Assumes the appropriate "remember me" options are set with your ID provider.
3. To use in Chrome, load the Tampermonkey extension.
-
As a side note, the fact that you have to log in so frequently is a bug and will be fixed in the near future. –  Tim Stone Jan 17 '13 at 16:51
Thanks, @TimStone. Looking forward to the fix. –  Awesome Poodles Jan 17 '13 at 16:53
Awesome, thanks for the script! Have you considered putting it on StackApps? –  doncherry May 10 '13 at 22:39
@doncherry, I hesitated to put it there since the script is not universal (Only runs on GM and TM) and I have no interest in making it work in browsers I don't care about. I'll think about it, though, since SEDE still doesn't seem to retain logins beyond the current session. –  Awesome Poodles May 10 '13 at 22:49