Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone.intercept

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone.intercept - npm Package Compare versions

Comparing version 0.3.3 to 0.4.0

9

bower.json
{
"name": "backbone.intercept",
"main": "dist/backbone.intercept.js",
"version": "0.3.3",
"version": "0.4.0",
"homepage": "https://github.com/jmeas/backbone.intercept",

@@ -36,9 +36,8 @@ "authors": [

"dependencies": {
"underscore": ">=1.3.3 <=1.6.0",
"backbone": ">=0.9.9 <=1.1.2"
"underscore": ">=1.3.3 <=1.8.3",
"backbone": ">=0.9.9 <=1.2.1"
},
"devDependencies": {
"jquery": ">=1.8 <=3.0",
"backbone.radio": "~0.6.0"
"jquery": ">=1.8 <=3.0"
}
}

@@ -0,1 +1,5 @@

### [0.4.0](https://github.com/jmeas/backbone.intercept/releases/tag/0.4.0)
- Updated dependencies to support the latest Backbone and Underscore.
### [0.3.3](https://github.com/jmeas/backbone.intercept/releases/tag/v0.3.3)

@@ -2,0 +6,0 @@

@@ -1,2 +0,2 @@

// Backbone.Intercept v0.3.3
// Backbone.Intercept v0.4.0
(function(root, factory) {

@@ -21,3 +21,3 @@ if (typeof define === 'function' && define.amd) {

VERSION: '0.3.3',
VERSION: '0.4.0',

@@ -24,0 +24,0 @@ rootSelector: 'body',

@@ -1,4 +0,4 @@

// Backbone.Intercept v0.3.3
// Backbone.Intercept v0.4.0
!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.3",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");if("false"===g?f.trigger=!1:"true"===g&&(f.trigger=!0),!/^#|javascript:|mailto:|(?:\w+:)?\/\//.test(d)){b.preventDefault();var h=c[0].pathname.replace(/^\//,"")+c[0].search;this.navigate&&this.navigate(h,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.4.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");if("false"===g?f.trigger=!1:"true"===g&&(f.trigger=!0),!/^#|javascript:|mailto:|(?:\w+:)?\/\//.test(d)){b.preventDefault();var h=c[0].pathname.replace(/^\//,"")+c[0].search;this.navigate&&this.navigate(h,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.3",
"version": "0.4.0",
"description": "Automatically manage link clicks and form submissions within Backbone applications.",

@@ -37,7 +37,6 @@ "main": "dist/backbone.intercept.js",

"dependencies": {
"backbone": ">=0.9.9 <=1.1.2",
"underscore": "<=1.7.0"
"backbone": ">=0.9.9 <=1.2.1",
"underscore": ">=1.3.3 <=1.8.3"
},
"devDependencies": {
"backbone.radio": "^0.6.0",
"chai": "^1.9.1",

@@ -44,0 +43,0 @@ "grunt": "^0.4.5",

@@ -21,3 +21,2 @@ // Create our JSDom document

global.Backbone.$ = global.$;
global.Radio = require('backbone.radio');

@@ -24,0 +23,0 @@ chai.use(sinonChai);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc