backbone.intercept
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "backbone.intercept", | ||
"main": "dist/backbone.intercept.js", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"homepage": "https://github.com/jmeas/backbone.intercept", | ||
@@ -6,0 +6,0 @@ "authors": [ |
@@ -1,2 +0,2 @@ | ||
// Backbone.Intercept v0.3.0 | ||
// Backbone.Intercept v0.3.1 | ||
(function(root, factory) { | ||
@@ -21,3 +21,3 @@ if (typeof define === 'function' && define.amd) { | ||
VERSION: '0.3.0', | ||
VERSION: '0.3.1', | ||
@@ -24,0 +24,0 @@ rootSelector: 'body', |
@@ -1,4 +0,4 @@ | ||
// Backbone.Intercept v0.3.0 | ||
// Backbone.Intercept v0.3.1 | ||
!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";return a.Intercept={VERSION:"0.3.0",rootSelector:"body",defaults:{trigger:!0,links:!0,forms:!0},start:function(a){a=b.defaults(a||{},this.defaults),a.links&&this._getRootElement().on("click.backboneIntercept","a",b.bind(this._interceptLinks,this)),a.forms&&this._getRootElement().on("submit.backboneIntercept",b.bind(this._interceptForms,this))},stop:function(){this._getRootElement().off(".backboneIntercept")},navigate:function(b,c){a.history.navigate(b,c)},_getRootElement:function(){return this._body?this._body:(this._body=a.$(this.rootSelector),this._body)},_interceptForms:function(a){a.target&&a.target.action||a.preventDefault()},_interceptLinks:function(b){if(1===b.which){var c=a.$(b.currentTarget),d=c.attr("href");if(d){var e=this._getAttr(c,"bypass");if(void 0===e||"false"===e){var f={trigger:this.defaults.trigger},g=this._getAttr(c,"trigger");"false"===g?f.trigger=!1:"true"===g&&(f.trigger=!0),/^#|javascript:|mailto:|(?:\w+:)?\/\//.test(d)||(b.preventDefault(),this.navigate&&this.navigate(d,f))}}}},_getAttr:function(a,b){var c=a.attr(b);if(void 0!==c)return c;var d=a.attr("data-"+b);return void 0!==d?d:void 0}},a.Intercept}); | ||
!function(a,b){if("function"==typeof define&&define.amd)define(["backbone","underscore"],function(a,c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("backbone"),d=require("underscore");module.exports=b(c,d)}else b(a.Backbone,a._)}(this,function(a,b){"use strict";return a.Intercept={VERSION:"0.3.1",rootSelector:"body",defaults:{trigger:!0,links:!0,forms:!0},start:function(a){a=b.defaults(a||{},this.defaults),a.links&&this._getRootElement().on("click.backboneIntercept","a",b.bind(this._interceptLinks,this)),a.forms&&this._getRootElement().on("submit.backboneIntercept",b.bind(this._interceptForms,this))},stop:function(){this._getRootElement().off(".backboneIntercept")},navigate:function(b,c){a.history.navigate(b,c)},_getRootElement:function(){return this._body?this._body:(this._body=a.$(this.rootSelector),this._body)},_interceptForms:function(a){a.target&&a.target.action||a.preventDefault()},_interceptLinks:function(b){if(1===b.which){var c=a.$(b.currentTarget),d=c.attr("href");if(d){var e=this._getAttr(c,"bypass");if(void 0===e||"false"===e){var f={trigger:this.defaults.trigger},g=this._getAttr(c,"trigger");"false"===g?f.trigger=!1:"true"===g&&(f.trigger=!0),/^#|javascript:|mailto:|(?:\w+:)?\/\//.test(d)||(b.preventDefault(),this.navigate&&this.navigate(d,f))}}}},_getAttr:function(a,b){var c=a.attr(b);if(void 0!==c)return c;var d=a.attr("data-"+b);return void 0!==d?d:void 0}},a.Intercept}); | ||
//# sourceMappingURL=backbone.intercept.min.js.map |
{ | ||
"name": "backbone.intercept", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Automatically manage link clicks and form submissions within Backbone applications.", | ||
@@ -38,3 +38,3 @@ "main": "dist/backbone.intercept.js", | ||
"backbone": ">=0.9.9 <=1.1.2", | ||
"underscore": ">=1.3.3 <=1.6.0" | ||
"underscore": "<=1.7.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46365
24
+ Addedunderscore@1.7.0(transitive)
- Removedunderscore@1.6.0(transitive)
Updatedunderscore@<=1.7.0