From d82fcd6b43ea76bd111dec5180616a435c54a7ee Mon Sep 17 00:00:00 2001 From: Jeroen Bobbeldijk Date: Tue, 18 Mar 2014 00:30:02 +0100 Subject: [PATCH 1/3] Added notifyjs support --- index.html | 1 + js/app.js | 41 +++++++++++++++++++++----------------- js/controllers/settings.js | 4 ++-- js/plugins/notifyjs | 1 + 4 files changed, 27 insertions(+), 20 deletions(-) create mode 160000 js/plugins/notifyjs diff --git a/index.html b/index.html index 9935bd4..ff3cc60 100755 --- a/index.html +++ b/index.html @@ -24,6 +24,7 @@ + diff --git a/js/app.js b/js/app.js index c945164..1152457 100755 --- a/js/app.js +++ b/js/app.js @@ -210,42 +210,47 @@ JamStash.service('notifications', function ($rootScope, globals) { } } this.requestPermissionIfRequired = function () { - if (!this.hasNotificationPermission() && (window.webkitNotifications)) { - window.webkitNotifications.requestPermission(); + if (window.Notify.isSupported() && window.Notify.needsPermission()) { + window.Notify.requestPermission(); } } this.hasNotificationPermission = function () { - return !!(window.webkitNotifications) && (window.webkitNotifications.checkPermission() == 0); + return (window.Notify.needsPermission() === false); + } + this.hasNotificationSupport = function () { + return window.Notify.isSupported(); } var notifications = new Array(); + this.showNotification = function (pic, title, text, type, bind) { if (this.hasNotificationPermission()) { //closeAllNotifications() - var popup; - if (type == 'text') { - popup = window.webkitNotifications.createNotification(pic, title, text); - } else if (type == 'html') { - popup = window.webkitNotifications.createHTMLNotification(text); - } + var settings = {} if (bind = '#NextTrack') { - popup.addEventListener('click', function (bind) { - //$(bind).click(); + settings.notifyClick = function() { $rootScope.nextTrack(); - this.cancel(); - }) + this.close(); + }; } - notifications.push(popup); + if (type == 'text') { + settings.body = text; + settings.icon = pic; + } else if (type == 'html') { + settings.body = text; + } + var notification = new Notify(title, settings); + notifications.push(notification); setTimeout(function (notWin) { - notWin.cancel(); - }, globals.settings.NotificationTimeout, popup); - popup.show(); + notWin.close(); + }, globals.settings.NotificationTimeout, notification); + notification.show(); } else { console.log("showNotification: No Permission"); } } this.closeAllNotifications = function () { for (notification in notifications) { - notifications[notification].cancel(); + notifications[notification].close(); } } }); diff --git a/js/controllers/settings.js b/js/controllers/settings.js index 2f7f184..7afbb28 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -29,13 +29,13 @@ function SettingsCtrl($scope, $routeParams, $location, utils, globals, json, not if ($scope.settings.Password != '' && globals.settings.Password.substring(0, 4) != 'enc:') { $scope.settings.Password = 'enc:' + utils.HexEncode($scope.settings.Password); } if (globals.settings.NotificationSong) { notifications.requestPermissionIfRequired(); - if (!notifications.hasNotificationPermission()) { + if (!notifications.hasNotificationSupport()) { alert('HTML5 Notifications are not available for your current browser, Sorry :('); } } if (globals.settings.NotificationNowPlaying) { notifications.requestPermissionIfRequired(); - if (!notifications.hasNotificationPermission()) { + if (!notifications.hasNotificationSupport()) { alert('HTML5 Notifications are not available for your current browser, Sorry :('); } } diff --git a/js/plugins/notifyjs b/js/plugins/notifyjs new file mode 160000 index 0000000..5ee07d7 --- /dev/null +++ b/js/plugins/notifyjs @@ -0,0 +1 @@ +Subproject commit 5ee07d7122386d3ab2606e9094a6716ba4deaa13 From 983b9829d392f5dc6baf716c368362e0a76d36b8 Mon Sep 17 00:00:00 2001 From: Jeroen Bobbeldijk Date: Tue, 18 Mar 2014 00:32:37 +0100 Subject: [PATCH 2/3] Fix notifyjs --- js/plugins/notifyjs | 1 - js/plugins/notifyjs2/.gitignore | 1 + js/plugins/notifyjs2/.jshintrc | 20 +++ js/plugins/notifyjs2/.travis.yml | 8 ++ js/plugins/notifyjs2/LICENSE.md | 9 ++ js/plugins/notifyjs2/README.md | 92 ++++++++++++++ js/plugins/notifyjs2/bower.json | 27 ++++ js/plugins/notifyjs2/karma.conf.js | 69 +++++++++++ js/plugins/notifyjs2/notify.js | 193 +++++++++++++++++++++++++++++ js/plugins/notifyjs2/package.json | 27 ++++ js/plugins/notifyjs2/test/tests.js | 97 +++++++++++++++ 11 files changed, 543 insertions(+), 1 deletion(-) delete mode 160000 js/plugins/notifyjs create mode 100644 js/plugins/notifyjs2/.gitignore create mode 100644 js/plugins/notifyjs2/.jshintrc create mode 100644 js/plugins/notifyjs2/.travis.yml create mode 100644 js/plugins/notifyjs2/LICENSE.md create mode 100644 js/plugins/notifyjs2/README.md create mode 100644 js/plugins/notifyjs2/bower.json create mode 100644 js/plugins/notifyjs2/karma.conf.js create mode 100644 js/plugins/notifyjs2/notify.js create mode 100644 js/plugins/notifyjs2/package.json create mode 100644 js/plugins/notifyjs2/test/tests.js diff --git a/js/plugins/notifyjs b/js/plugins/notifyjs deleted file mode 160000 index 5ee07d7..0000000 --- a/js/plugins/notifyjs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5ee07d7122386d3ab2606e9094a6716ba4deaa13 diff --git a/js/plugins/notifyjs2/.gitignore b/js/plugins/notifyjs2/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/js/plugins/notifyjs2/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/js/plugins/notifyjs2/.jshintrc b/js/plugins/notifyjs2/.jshintrc new file mode 100644 index 0000000..94cc21d --- /dev/null +++ b/js/plugins/notifyjs2/.jshintrc @@ -0,0 +1,20 @@ +{ + "globals": { + "define": false, + "Notification": false + }, + "browser": true, + "node": true, + "esnext": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "newcap": true, + "undef": true, + "strict": true, + "trailing": true, + "white": true, + "indent": false, + "unused": false +} diff --git a/js/plugins/notifyjs2/.travis.yml b/js/plugins/notifyjs2/.travis.yml new file mode 100644 index 0000000..ea51335 --- /dev/null +++ b/js/plugins/notifyjs2/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" +before_install: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" +addons: + firefox: "22.0" diff --git a/js/plugins/notifyjs2/LICENSE.md b/js/plugins/notifyjs2/LICENSE.md new file mode 100644 index 0000000..1845708 --- /dev/null +++ b/js/plugins/notifyjs2/LICENSE.md @@ -0,0 +1,9 @@ +Copyright (c) 2013 Alex Gibson + +http://alxgbsn.co.uk/ + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction except as noted below, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sublicense, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE \ No newline at end of file diff --git a/js/plugins/notifyjs2/README.md b/js/plugins/notifyjs2/README.md new file mode 100644 index 0000000..c7d2474 --- /dev/null +++ b/js/plugins/notifyjs2/README.md @@ -0,0 +1,92 @@ +Notify.js +========= + +[![Build Status](https://travis-ci.org/alexgibson/notify.js.png?branch=master)](https://travis-ci.org/alexgibson/notify.js) + +A handy wrapper for using the [Web Notifications API](http://www.w3.org/TR/notifications/). Notify.js aims to simplify requesting user permission and associated Web Notification API events, as well as providing a few extra callbacks and convenience methods. + +Installation +--------------------------------------- + +* Download: [zip](https://github.com/alexgibson/notify.js/zipball/master) +* [Bower](https://github.com/twitter/bower/): `bower install notify.js` +* Git: `git clone https://github.com/alexgibson/notify.js` + +Setup +--------- + +This component can be used as an AMD module, or a global. + +To initialize a web notification create a new `Notify` instance, passing the message `title` as well as any other options you wish to use. + +``` +var myNotification = new Notify('Yo dawg!', { + body: 'This is an awesome notification', + notifyShow: onNotifyShow +}); + +function onNotifyShow() { + console.log('notification was shown!'); +} +``` + +Then show the notification. + +``` +myNotification.show(); +``` + +Required parameters +------------------- + +* title (string) - notification title + +Optional parameters +------------------- + +* body: (string) - notification message body +* icon: (string) - path for icon to display in notification +* tag: (string) - unique identifier to stop duplicate notifications +* timeout: (integer) - number of seconds to close the notification automatically +* notifyShow: (function) - callback when notification is shown +* notifyClose: (function) - callback when notification is closed +* notifyClick: (function) - callback when notification is clicked +* notifyError: (function) - callback when notification throws an error +* permissionGranted: (function) - callback when user has granted permission +* permissionDenied: (function) - callback when user has denied permission + +Useful methods +-------------- + +* `Notify.needsPermission()` - (returns boolean) check is permission is needed for the user to receive notifications. +* `Notify.requestPermission()` - requests permission from the user if needed and handles permission callbacks. +* `Notify.isSupported()` - (returns boolean) test for Web Notifications API browser support + +A note about Chrome +------------------- + +Unlike other browsers that implement the Web Notification API, Chrome does not permit requesting permission on page load (it must be as a result of user interaction, such as a `click` event). You can find out more in the [Chromium bug for this issue](https://code.google.com/p/chromium/issues/detail?id=274284). + +Testing +------- + +Install [Node](http://nodejs.org). Testing relies on the Karma test-runner, which can be installed globally using the following command. + +``` +npm install -g karma +``` + +In the project root, to perform a single pass of the tests using Firefox run: + +``` +npm test +``` + +Browser support +--------------------------------------- + +- Chrome (desktop) +- Safari +- Firefox +- Firefox OS (v1.2+) +- Firefox Mobile (Android) diff --git a/js/plugins/notifyjs2/bower.json b/js/plugins/notifyjs2/bower.json new file mode 100644 index 0000000..987bf07 --- /dev/null +++ b/js/plugins/notifyjs2/bower.json @@ -0,0 +1,27 @@ +{ + "name": "notify.js", + "description": "A handy wrapper for the Web Notifications API", + "version": "1.1.0", + "author": { + "name": "Alex Gibson", + "email": "alxgbsn@gmail.com" + }, + "keywords": ["javascript", "web notifications", "notification", "notify"], + "main": "./notify.js", + "repository": { + "type": "git", + "url": "https://github.com/alexgibson/notify.js.git" + }, + "readme": "README.md", + "licenses": [{ + "type": "MIT", + "url": "http://opensource.org/licenses/MIT" + }], + "ignore": [ + "test", + ".jshintrc", + "karma.conf.js", + "package.json", + ".travis.yml" + ] +} diff --git a/js/plugins/notifyjs2/karma.conf.js b/js/plugins/notifyjs2/karma.conf.js new file mode 100644 index 0000000..fe5cc75 --- /dev/null +++ b/js/plugins/notifyjs2/karma.conf.js @@ -0,0 +1,69 @@ +// Karma configuration +// Generated on Sun Aug 04 2013 21:16:15 GMT+0100 (BST) + + +// base path, that will be used to resolve files and exclude +basePath = ''; + + +// list of files / patterns to load in the browser +files = [ + JASMINE, + JASMINE_ADAPTER, + 'notify.js', + 'test/*.js', + + { pattern: 'node_modules/sinon/pkg/sinon.js', watched: false, included: true } +]; + + +// list of files to exclude +exclude = [ + +]; + + +// test results reporter to use +// possible values: 'dots', 'progress', 'junit' +reporters = ['dots']; + + +// web server port +port = 9876; + + +// cli runner port +runnerPort = 9100; + + +// enable / disable colors in the output (reporters and logs) +colors = true; + + +// level of logging +// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG +logLevel = LOG_INFO; + + +// enable / disable watching file and executing tests whenever any file changes +autoWatch = true; + + +// Start these browsers, currently available: +// - Chrome +// - ChromeCanary +// - Firefox +// - Opera +// - Safari (only Mac) +// - PhantomJS +// - IE (only Windows) +browsers = ['Firefox']; + + +// If browser does not capture in given timeout [ms], kill it +captureTimeout = 60000; + + +// Continuous Integration mode +// if true, it capture browsers, run tests and exit +singleRun = false; diff --git a/js/plugins/notifyjs2/notify.js b/js/plugins/notifyjs2/notify.js new file mode 100644 index 0000000..1ed7152 --- /dev/null +++ b/js/plugins/notifyjs2/notify.js @@ -0,0 +1,193 @@ +(function (root, factory) { + + 'use strict'; + + if (typeof define === 'function' && define.amd) { + // AMD environment + define('notify', [], function () { + return factory(root, document); + }); + } else { + // Browser environment + root.Notify = factory(root, document); + } + +}(this, function (w, d) { + + 'use strict'; + + function Notify(title, options) { + + this.title = typeof title === 'string' ? title : null; + + this.options = { + icon: '', + body: '', + tag: '', + notifyShow: null, + notifyClose: null, + notifyClick: null, + notifyError: null, + permissionGranted: null, + permissionDenied: null, + timeout: null + }; + + this.permission = null; + + if (!Notify.isSupported()) { + return; + } + + if (!this.title) { + throw new Error('Notify(): first arg (title) must be a string.'); + } + + //User defined options for notification content + if (typeof options === 'object') { + + for (var i in options) { + if (options.hasOwnProperty(i)) { + this.options[i] = options[i]; + } + } + + //callback when notification is displayed + if (typeof this.options.notifyShow === 'function') { + this.onShowCallback = this.options.notifyShow; + } + + //callback when notification is closed + if (typeof this.options.notifyClose === 'function') { + this.onCloseCallback = this.options.notifyClose; + } + + //callback when notification is clicked + if (typeof this.options.notifyClick === 'function') { + this.onClickCallback = this.options.notifyClick; + } + + //callback when notification throws error + if (typeof this.options.notifyError === 'function') { + this.onErrorCallback = this.options.notifyError; + } + } + } + + // return true if the browser supports HTML5 Notification + Notify.isSupported = function () { + if ('Notification' in w) { + return true; + } + return false; + }; + + // returns true if the permission is not granted + Notify.needsPermission = function () { + if (Notify.isSupported() && Notification.permission === 'granted') { + return false; + } + return true; + }; + + // asks the user for permission to display notifications. Then calls the callback functions is supplied. + Notify.requestPermission = function (onPermissionGrantedCallback, onPermissionDeniedCallback) { + if (Notify.isSupported()) { + w.Notification.requestPermission(function (perm) { + switch (perm) { + case 'granted': + if (typeof onPermissionGrantedCallback === 'function') { + onPermissionGrantedCallback(); + } + break; + case 'denied': + if (typeof onPermissionDeniedCallback === 'function') { + onPermissionDeniedCallback(); + } + break; + } + }); + } + }; + + + Notify.prototype.show = function () { + var that = this; + + if (!Notify.isSupported()) { + return; + } + + this.myNotify = new Notification(this.title, { + 'body': this.options.body, + 'tag' : this.options.tag, + 'icon' : this.options.icon + }); + + if (this.options.timeout && !isNaN(this.options.timeout)) { + setTimeout(this.close.bind(this), this.options.timeout * 1000); + } + + this.myNotify.addEventListener('show', this, false); + this.myNotify.addEventListener('error', this, false); + this.myNotify.addEventListener('close', this, false); + this.myNotify.addEventListener('click', this, false); + }; + + Notify.prototype.onShowNotification = function (e) { + if (this.onShowCallback) { + this.onShowCallback(e); + } + }; + + Notify.prototype.onCloseNotification = function () { + if (this.onCloseCallback) { + this.onCloseCallback(); + } + this.destroy(); + }; + + Notify.prototype.onClickNotification = function () { + if (this.onClickCallback) { + this.onClickCallback(); + } + }; + + Notify.prototype.onErrorNotification = function () { + if (this.onErrorCallback) { + this.onErrorCallback(); + } + this.destroy(); + }; + + Notify.prototype.destroy = function () { + this.myNotify.removeEventListener('show', this, false); + this.myNotify.removeEventListener('error', this, false); + this.myNotify.removeEventListener('close', this, false); + this.myNotify.removeEventListener('click', this, false); + }; + + Notify.prototype.close = function () { + this.myNotify.close(); + }; + + Notify.prototype.handleEvent = function (e) { + switch (e.type) { + case 'show': + this.onShowNotification(e); + break; + case 'close': + this.onCloseNotification(e); + break; + case 'click': + this.onClickNotification(e); + break; + case 'error': + this.onErrorNotification(e); + break; + } + }; + + return Notify; + +})); diff --git a/js/plugins/notifyjs2/package.json b/js/plugins/notifyjs2/package.json new file mode 100644 index 0000000..7980120 --- /dev/null +++ b/js/plugins/notifyjs2/package.json @@ -0,0 +1,27 @@ +{ + "name": "notify.js", + "version": "1.1.0", + "description": "A handy wrapper for the Web Notifications API", + "main": "notify.js", + "devDependencies": { + "karma": "~0.8.5", + "sinon": "~1.7.3" + }, + "repository": { + "type": "git", + "url": "https://github.com/alexgibson/notify.js.git" + }, + "keywords": [ + "web", + "notification", + "nofity" + ], + "author": "Alex Gibson", + "license": "MIT", + "bugs": { + "url": "https://github.com/alexgibson/notify.js/issues" + }, + "scripts": { + "test": "./node_modules/.bin/karma start --browsers Firefox --single-run" + } +} diff --git a/js/plugins/notifyjs2/test/tests.js b/js/plugins/notifyjs2/test/tests.js new file mode 100644 index 0000000..d21281d --- /dev/null +++ b/js/plugins/notifyjs2/test/tests.js @@ -0,0 +1,97 @@ +describe('instantiation', function () { + + it('should create a new Notify instance', function () { + var notification = new Notify('foo'); + expect(notification instanceof window.Notify).toBeTruthy(); + }); + + it('should throw an exception if has no title', function () { + expect(function () { + var notification = new Notify(); + }).toThrow(); + }); +}); + +describe('permission', function () { + + it('should check if permission is needed', function () { + expect(Notify.needsPermission()).toBeTruthy(); + }); + + it('should request permission from the user', function () { + spyOn(window.Notification, 'requestPermission'); + Notify.requestPermission(); + expect(window.Notification.requestPermission).toHaveBeenCalled(); + }); +}); + +describe('callbacks', function () { + + var callback; + + beforeEach(function() { + callback = jasmine.createSpy(); + }); + + it('should fire show callback', function () { + var notification = new Notify('foo', { + notifyShow: callback + }); + notification.onShowNotification(); + expect(callback).toHaveBeenCalled(); + }); + + it('should fire close callback', function () { + var notification = new Notify('foo', { + notifyClose: callback + }); + notification.show(); + notification.onCloseNotification(); + expect(callback).toHaveBeenCalled(); + }); + + it('should fire click callback', function () { + var notification = new Notify('foo', { + notifyClick: callback + }); + notification.onClickNotification(); + expect(callback).toHaveBeenCalled(); + }); + + it('should fire error callback', function () { + var notification = new Notify('foo', { + notifyError: callback + }); + notification.show(); + notification.onErrorNotification(); + expect(callback).toHaveBeenCalled(); + }); + + it('should destroy a notification once closed', function () { + var notification = new Notify('foo', { + notifyClose: callback + }); + spyOn(notification, 'destroy'); + notification.onCloseNotification(); + expect(notification.destroy).toHaveBeenCalled(); + + }); +}); + +describe('timeout', function () { + + beforeEach(function () { + jasmine.Clock.useMock(); + }); + + it('should close a notification automatically', function () { + var notification = new Notify('foo', { + timeout: 1 + }); + spyOn(window.Notification.prototype, 'close'); + notification.show(); + expect(window.Notification.prototype.close).not.toHaveBeenCalled(); + jasmine.Clock.tick(1000); + expect(window.Notification.prototype.close).toHaveBeenCalled(); + }); +}); From cdc16aac19b4c08caadb12575dbea60b01c1e138 Mon Sep 17 00:00:00 2001 From: Jeroen Bobbeldijk Date: Tue, 18 Mar 2014 00:32:57 +0100 Subject: [PATCH 3/3] Fix notifyjs --- js/plugins/{notifyjs2 => notifyjs}/.gitignore | 0 js/plugins/{notifyjs2 => notifyjs}/.jshintrc | 0 js/plugins/{notifyjs2 => notifyjs}/.travis.yml | 0 js/plugins/{notifyjs2 => notifyjs}/LICENSE.md | 0 js/plugins/{notifyjs2 => notifyjs}/README.md | 0 js/plugins/{notifyjs2 => notifyjs}/bower.json | 0 js/plugins/{notifyjs2 => notifyjs}/karma.conf.js | 0 js/plugins/{notifyjs2 => notifyjs}/notify.js | 0 js/plugins/{notifyjs2 => notifyjs}/package.json | 0 js/plugins/{notifyjs2 => notifyjs}/test/tests.js | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename js/plugins/{notifyjs2 => notifyjs}/.gitignore (100%) rename js/plugins/{notifyjs2 => notifyjs}/.jshintrc (100%) rename js/plugins/{notifyjs2 => notifyjs}/.travis.yml (100%) rename js/plugins/{notifyjs2 => notifyjs}/LICENSE.md (100%) rename js/plugins/{notifyjs2 => notifyjs}/README.md (100%) rename js/plugins/{notifyjs2 => notifyjs}/bower.json (100%) rename js/plugins/{notifyjs2 => notifyjs}/karma.conf.js (100%) rename js/plugins/{notifyjs2 => notifyjs}/notify.js (100%) rename js/plugins/{notifyjs2 => notifyjs}/package.json (100%) rename js/plugins/{notifyjs2 => notifyjs}/test/tests.js (100%) diff --git a/js/plugins/notifyjs2/.gitignore b/js/plugins/notifyjs/.gitignore similarity index 100% rename from js/plugins/notifyjs2/.gitignore rename to js/plugins/notifyjs/.gitignore diff --git a/js/plugins/notifyjs2/.jshintrc b/js/plugins/notifyjs/.jshintrc similarity index 100% rename from js/plugins/notifyjs2/.jshintrc rename to js/plugins/notifyjs/.jshintrc diff --git a/js/plugins/notifyjs2/.travis.yml b/js/plugins/notifyjs/.travis.yml similarity index 100% rename from js/plugins/notifyjs2/.travis.yml rename to js/plugins/notifyjs/.travis.yml diff --git a/js/plugins/notifyjs2/LICENSE.md b/js/plugins/notifyjs/LICENSE.md similarity index 100% rename from js/plugins/notifyjs2/LICENSE.md rename to js/plugins/notifyjs/LICENSE.md diff --git a/js/plugins/notifyjs2/README.md b/js/plugins/notifyjs/README.md similarity index 100% rename from js/plugins/notifyjs2/README.md rename to js/plugins/notifyjs/README.md diff --git a/js/plugins/notifyjs2/bower.json b/js/plugins/notifyjs/bower.json similarity index 100% rename from js/plugins/notifyjs2/bower.json rename to js/plugins/notifyjs/bower.json diff --git a/js/plugins/notifyjs2/karma.conf.js b/js/plugins/notifyjs/karma.conf.js similarity index 100% rename from js/plugins/notifyjs2/karma.conf.js rename to js/plugins/notifyjs/karma.conf.js diff --git a/js/plugins/notifyjs2/notify.js b/js/plugins/notifyjs/notify.js similarity index 100% rename from js/plugins/notifyjs2/notify.js rename to js/plugins/notifyjs/notify.js diff --git a/js/plugins/notifyjs2/package.json b/js/plugins/notifyjs/package.json similarity index 100% rename from js/plugins/notifyjs2/package.json rename to js/plugins/notifyjs/package.json diff --git a/js/plugins/notifyjs2/test/tests.js b/js/plugins/notifyjs/test/tests.js similarity index 100% rename from js/plugins/notifyjs2/test/tests.js rename to js/plugins/notifyjs/test/tests.js