Git Product home page Git Product logo

Comments (6)

JillElaine avatar JillElaine commented on July 2, 2024

To allow localStorage to communicate across subdomains within the same parent domain, please try to 'relax' the 'same origin' policy. https://en.wikipedia.org/wiki/Same-origin_policy#Relaxing_the_same-origin_policy and https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Changing_origin

Hopefully you can find a solution to relax the same origin policy so that windows & tabs from your parent and subdomains can communicate via localStorage. There is no need to modify the jquery-idleTimeout script.

Please report back about the subdomains issues, and let me know how that works, so we can all learn from your experience.

As for modifying the CSS for the dialog box, create your own custom theme css files for JQuery UI or use one of the ready-made themes from the Gallery with the ThemeRoller online application: http://jqueryui.com/themeroller/

from jquery-idletimeout.

amitvit2002 avatar amitvit2002 commented on July 2, 2024

Hi Jil,

Thanks for quick reply. Let me explore that. One more question, how can we focus browser when dialog opens to let user know that he is timing out if he is working on another browser window. I mean browser icon in taskbar should start blinking or highlighting once dialog opens. That way user will be notified, I was working on word and realized I have open site 10 mins back with 5 mins as idle timeout setting. When I went back I was already timed out, any focus should have helped me renewing my session.

from jquery-idletimeout.

JillElaine avatar JillElaine commented on July 2, 2024

You could try adding the window.focus() method to the function that opens the warning dialog box. See below.

    openWarningDialog = function () {

      var dialogContent = "<div id='idletimer_warning_dialog'><p>" + currentConfig.dialogText + "</p><p style='display:inline'>" + currentConfig.dialogTimeRemaining + ": <div style='display:inline' id='countdownDisplay'></div></p></div>";
...snipped...
      document.title = currentConfig.dialogTitle;

       window.focus();  // add this line to the openWarningDialog function.

      if (currentConfig.sessionKeepAliveTimer) {
        stopKeepSessionAlive();
      }
    };

Let me know if that works as you wish.

from jquery-idletimeout.

amitvit2002 avatar amitvit2002 commented on July 2, 2024

I tried this and also tried window.moveTo(0,0) but both didn't work. :(

from jquery-idletimeout.

JillElaine avatar JillElaine commented on July 2, 2024

Hmmm, you might read this thread. Sounds like there may be issues getting something to work with all browsers. Report back if you get something to work. It would be a good feature to add to the plugin. http://stackoverflow.com/questions/37122/make-browser-window-blink-in-task-bar

from jquery-idletimeout.

JillElaine avatar JillElaine commented on July 2, 2024

Any news on making the script work across subdomains, amitvit2002?

from jquery-idletimeout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.