What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
1  
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  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require  https://gist.github.com/raw/2625891/waitForKeyElements.js
// @grant    GM_addStyle
// ==/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) ) {
    var loginLink   = $("#hlinks-content a:contains('log in')");
    if (loginLink.length) {
        location.assign (loginLink[0].href);
    }
}
else if (/^https?:\/\/data\.stackexchange\.com\/account\/login.+/i.test (location.href) ) {
    function clickLoginBtn (jNode) {
        var clickEvent  = document.createEvent ('MouseEvents');
        clickEvent.initEvent ('click', true, true);
        jNode[0].dispatchEvent (clickEvent);
    }

    waitForKeyElements ("#openid_btns a.myopenid", clickLoginBtn);

    /*-- Valid link selector values:
        "#openid_btns a.aol"
        "#openid_btns a.blogger"
        "#openid_btns a.claimid"
        "#openid_btns a.clickpass"
        "#openid_btns a.google"
        "#openid_btns a.google_profile"
        "#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.
share|improve this answer
3  
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
1  
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .