Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/posabsolute/jquery-error-handler-plugin
This jQuery plugin send an email when a javascript error is triggered
https://github.com/posabsolute/jquery-error-handler-plugin
Last synced: 2 months ago
JSON representation
This jQuery plugin send an email when a javascript error is triggered
- Host: GitHub
- URL: https://github.com/posabsolute/jquery-error-handler-plugin
- Owner: posabsolute
- Created: 2011-03-30T11:39:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-03-06T17:49:55.000Z (almost 12 years ago)
- Last Synced: 2024-10-14T08:36:01.264Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 415 KB
- Stars: 37
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# jQuery error capturing plugin
This jQuery plugin send an email when a javascript error is triggered.
Specially useful in big web application where you want to know if users hit javascript errors.A php mail example is given with this plugin, but it could also be easily logged in a database
## Integration
Load the plugin just after the jQuery library
$(document).jsErrorHandler();
## Options
You can define some options.
By default the plugin automatically fetch the domain and add it to the email subject, but you can overwrite it.
You can also define a from, I would highly recommend that you change the from setting in the plugin file (jquery.onerror.js) if your going to use this plugin on multiple websites.$(document).jsErrorHandler({
from: "[email protected]",
website: document.domain
});## The Email
The email received will look like this:
A javascript error has been detected on www.position-absolute.com
Message: variable is not defined
Url: http://www.position-absolute.com/creation/onerror/
Line: 21
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0
## Limitation
The plugin works on
Firefox 3.6+,
Chrome Latest,
IE7+It does not work on Safari and Opera, but it will not break your application.