npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

timeout-dialog-bootstrap

v1.0.1

Published

After a set amount of idle time, a Bootbox warning dialog is shown to the user with the option to either stay logged in or stay logout. If the logout button is selected, the page is redirected (via a post) to a logout URL. If the stay logged in button is

Downloads

41

Readme

Bower

timeout-dialog-bootstrap

Forked from [session-timeout.js by rigoneri] (https://github.com/rigoneri/timeout-dialog.js) The code has been changed to allow the developer to use boostrap and not have to include any jquery-ui libraries. The countdown time has been modified to display minutes and seconds instead of just seconds. You can easily upgrade from session-timeout.js to session-timeout-bootstrap.js, since all of the options have been kept from session-timeout.js.

Description

After a set amount of idle time, a Bootbox warning dialog is shown to the user with the option to either stay logged in or stay logout. If the logout button is selected, the page is redirected (via a post) to a logout URL. If the stay logged in button is selected, the dialog closes and the session is kept alive. If no option is selected after another set amount of idle time, the page is automatically redirected (via a post) to a set logout URL. Idle time is defined as no http method like post or get being called to the server. Basically, the user staying on the same screen for a set amount of time.

Getting Started

###Manuel

  1. Download or git clone.
  2. Install dependencies: jQuery >= v1.11.3, Bootstrap JS and CSS >= Bootstrap v3.3.6, and bootbox.js >= v4.4.0.
  3. Include timeout-dialog-bootstrap.css.
  4. Include timeout-dialog-bootstrap.js or the minified version timeout-dialog-bootstrap.min.js.
  5. Call $.timeoutDialog(); on document ready. See available options below or take a look at the examples.

###Bower

Bower install timeout-dialog-bootstrap

Documentation

Options

countdown

Type: Integer

Default: 1200 (seconds) Time in seconds to start the dialog and countdown timer.

keep_alive_button_text

Type: String

Default: 'Yes, Keep me signed in' The text displayed on the stay signed in button.

keep_alive_url

Type: String

Default: '/keep-alive' The url to call a get to one the user click stay signed in button.

logout_redirect_url

Type: String

Default: '/' The url to send the user (via a get) to after a successful logout.

logout_url

Type: String

Default: null The url to post to to log the user out. If this value is null then it just redirects the user (via get) to logout_redirect_url url.

message

Type: String

Default: 'You will be logged out in {0}.' The text to display in the bootbox header. The {0} will be substituted with ## minutes ## seconds. Example, You will be logged out in 2 minutes and 34 seconds.

question

Type: String

Default: 'Do you want to stay signed in?' The text that will appear in the bootbox window asking the user if he/she would like to stay signed in.

restart_on_yes

Type: Boolean

Default: true Flag to indicate if the timpout clock shoudl be reset to allow the dialog to reappear after idle time.

sign_out_button_text

Type: String

Default: 'No, Sign me out' The text that will appear on the logout button.

Title

Type: String

Default: 'Your session is about to expire!' The text that will appear in the bootbox title section.