Giter Site home page Giter Site logo

sean3z / angular-activity-monitor Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 11.0 127 KB

An Angular 1.x service that tracks users' DOM activity

Home Page: http://sean3z.github.io/angular-activity-monitor

License: MIT License

JavaScript 100.00%
activity-monitoring dom-activity angular user-interaction

angular-activity-monitor's People

Contributors

ackerapple avatar chander avatar sean3z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular-activity-monitor's Issues

Tag does not match package.jsom

The version number on npmjs.org says "1.0.0" like the package.json - but there is no matching tag in the git repository. Please add tag to match version.

inactive event is does not firing at all.

following is my code. let me know where i am doing wrong. because as far user perform activity it work fine and logs numbers as i did. but once it reached 0 it should print message but it is not behaving good in that. looking like inactive event is not being triggered. please help!

ActivityMonitor.off('inactive.userStatus');
            ActivityMonitor.off('activity.userStatus');

            // interval = $interval(function() {
            //   scope.state.countdown--;
            //   // console.log(scope.state.countdown);
            //   if (!scope.state.countdown) {
            //     $interval.cancel(interval);
            //   }

            // }, 1000);

            ActivityMonitor.on('inactive.userStatus', function() {
                console.log(scope.state.countdown);
                console.log('You\'re inactive!');
            });

            ActivityMonitor.on('activity.userStatus', function() {
              scope.state.countdown = timeout;
              console.log(scope.state.countdown);
            });

Not working after window reload

without reloading the browser page angular-activity-monitor is working fine . But after reload keepalive and inactive are not working.

Fails on DevKit, undeclared dependency on Angular

The npmjs page has a "Try on RunKit" link bringing to a DevKit playground. The run button unfortunately fails with:
Error: Cannot find module 'angular'

Require stack:

  • /app/available_modules/1628189980000/angular-activity-monitor/activity-monitor.js
  • /app/index.js

This is presumably because angular-activity-monitor does not declare its dependency on Angular. Indeed, its package.json mentions an outdated Angular version in devDependencies, but the dependencies array is empty.

Does not work

angularjs version: AngularJS v1.2.25

var module = angular.module('derp.module', [
    'ActivityMonitor'
  ])
  .controller('derpController', function (ActivityMonitor) {
    ActivityMonitor.options.enabled = true;
    ActivityMonitor.options.inactive = 10;
    ActivityMonitor.options.warning = 5;
    ActivityMonitor.on('inactive', function() {
      alert('user is inactive');
    });
    ActivityMonitor.on('keepAlive', function() {
    });
    ActivityMonitor.on('warning', function() {
      alert('warning session is timing out');
    });

Provider for angular.config()

It would be nice if I can configure this service in the angular.config() section, where other service providers got configured (for example $logProvider, $translateProvider, etc.)

Version tags

Please add version tags such that specific versions can be identified in bower.json files. We need to be able to reference specific versions instead of just head (which would potentially be unpredictable unless you reference a specific commit hash).

Changelog

Please add a CHANGELOG.md file listing changes for each update

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.