diff --git a/bower.json b/bower.json index bba540a..d5743f5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-history-browser", - "version": "0.2.1", + "version": "0.2.2", "description": "An implementation of the Aurelia history interface based on standard browser hash change and push state mechanisms.", "keywords": [ "aurelia", diff --git a/dist/amd/index.js b/dist/amd/index.js index 817ac63..023360e 100644 --- a/dist/amd/index.js +++ b/dist/amd/index.js @@ -6,19 +6,19 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; - var _inherits = function (child, parent) { - if (typeof parent !== "function" && parent !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof parent); + var _inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } - child.prototype = Object.create(parent && parent.prototype, { + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { - value: child, + value: subClass, enumerable: false, writable: true, configurable: true } }); - if (parent) child.__proto__ = parent; + if (superClass) subClass.__proto__ = superClass; }; var History = _aureliaHistory.History; @@ -40,7 +40,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { } var BrowserHistory = (function (History) { - var BrowserHistory = function BrowserHistory() { + function BrowserHistory() { this.interval = 50; this.active = false; this.previousFragment = ""; @@ -50,13 +50,13 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { this.location = window.location; this.history = window.history; } - }; + } _inherits(BrowserHistory, History); _prototypeProperties(BrowserHistory, null, { getHash: { - value: function (window) { + value: function getHash(window) { var match = (window || this).location.href.match(/#(.*)$/); return match ? match[1] : ""; }, @@ -65,7 +65,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, getFragment: { - value: function (fragment, forcePushState) { + value: function getFragment(fragment, forcePushState) { var root; if (!fragment) { @@ -87,7 +87,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, activate: { - value: function (options) { + value: function activate(options) { if (this.active) { throw new Error("History has already been activated."); } @@ -137,7 +137,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, deactivate: { - value: function () { + value: function deactivate() { window.onpopstate = null; window.removeEventListener("hashchange", this._checkUrlCallback); clearInterval(this._checkUrlInterval); @@ -148,7 +148,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, checkUrl: { - value: function () { + value: function checkUrl() { var current = this.getFragment(); if (current === this.fragment && this.iframe) { @@ -170,7 +170,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, loadUrl: { - value: function (fragmentOverride) { + value: function loadUrl(fragmentOverride) { var fragment = this.fragment = this.getFragment(fragmentOverride); return this.options.routeHandler ? this.options.routeHandler(fragment) : false; @@ -180,7 +180,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, navigate: { - value: function (fragment, options) { + value: function navigate(fragment, options) { if (fragment && fragment.indexOf("://") != -1) { window.location.href = fragment; return true; @@ -241,7 +241,7 @@ define(["exports", "aurelia-history"], function (exports, _aureliaHistory) { configurable: true }, navigateBack: { - value: function () { + value: function navigateBack() { this.history.back(); }, writable: true, diff --git a/dist/commonjs/index.js b/dist/commonjs/index.js index f122756..8f5bf64 100644 --- a/dist/commonjs/index.js +++ b/dist/commonjs/index.js @@ -5,19 +5,19 @@ var _prototypeProperties = function (child, staticProps, instanceProps) { if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; -var _inherits = function (child, parent) { - if (typeof parent !== "function" && parent !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof parent); +var _inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } - child.prototype = Object.create(parent && parent.prototype, { + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { - value: child, + value: subClass, enumerable: false, writable: true, configurable: true } }); - if (parent) child.__proto__ = parent; + if (superClass) subClass.__proto__ = superClass; }; var History = require("aurelia-history").History; @@ -39,7 +39,7 @@ function updateHash(location, fragment, replace) { } var BrowserHistory = (function (History) { - var BrowserHistory = function BrowserHistory() { + function BrowserHistory() { this.interval = 50; this.active = false; this.previousFragment = ""; @@ -49,13 +49,13 @@ var BrowserHistory = (function (History) { this.location = window.location; this.history = window.history; } - }; + } _inherits(BrowserHistory, History); _prototypeProperties(BrowserHistory, null, { getHash: { - value: function (window) { + value: function getHash(window) { var match = (window || this).location.href.match(/#(.*)$/); return match ? match[1] : ""; }, @@ -64,7 +64,7 @@ var BrowserHistory = (function (History) { configurable: true }, getFragment: { - value: function (fragment, forcePushState) { + value: function getFragment(fragment, forcePushState) { var root; if (!fragment) { @@ -86,7 +86,7 @@ var BrowserHistory = (function (History) { configurable: true }, activate: { - value: function (options) { + value: function activate(options) { if (this.active) { throw new Error("History has already been activated."); } @@ -136,7 +136,7 @@ var BrowserHistory = (function (History) { configurable: true }, deactivate: { - value: function () { + value: function deactivate() { window.onpopstate = null; window.removeEventListener("hashchange", this._checkUrlCallback); clearInterval(this._checkUrlInterval); @@ -147,7 +147,7 @@ var BrowserHistory = (function (History) { configurable: true }, checkUrl: { - value: function () { + value: function checkUrl() { var current = this.getFragment(); if (current === this.fragment && this.iframe) { @@ -169,7 +169,7 @@ var BrowserHistory = (function (History) { configurable: true }, loadUrl: { - value: function (fragmentOverride) { + value: function loadUrl(fragmentOverride) { var fragment = this.fragment = this.getFragment(fragmentOverride); return this.options.routeHandler ? this.options.routeHandler(fragment) : false; @@ -179,7 +179,7 @@ var BrowserHistory = (function (History) { configurable: true }, navigate: { - value: function (fragment, options) { + value: function navigate(fragment, options) { if (fragment && fragment.indexOf("://") != -1) { window.location.href = fragment; return true; @@ -240,7 +240,7 @@ var BrowserHistory = (function (History) { configurable: true }, navigateBack: { - value: function () { + value: function navigateBack() { this.history.back(); }, writable: true, diff --git a/dist/system/index.js b/dist/system/index.js index 25f69be..5320627 100644 --- a/dist/system/index.js +++ b/dist/system/index.js @@ -25,19 +25,19 @@ System.register(["aurelia-history"], function (_export) { if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; - _inherits = function (child, parent) { - if (typeof parent !== "function" && parent !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof parent); + _inherits = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } - child.prototype = Object.create(parent && parent.prototype, { + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { - value: child, + value: subClass, enumerable: false, writable: true, configurable: true } }); - if (parent) child.__proto__ = parent; + if (superClass) subClass.__proto__ = superClass; }; routeStripper = /^[#\/]|\s+$/g; @@ -45,7 +45,7 @@ System.register(["aurelia-history"], function (_export) { isExplorer = /msie [\w.]+/; trailingSlash = /\/$/; BrowserHistory = (function (History) { - var BrowserHistory = function BrowserHistory() { + function BrowserHistory() { this.interval = 50; this.active = false; this.previousFragment = ""; @@ -55,13 +55,13 @@ System.register(["aurelia-history"], function (_export) { this.location = window.location; this.history = window.history; } - }; + } _inherits(BrowserHistory, History); _prototypeProperties(BrowserHistory, null, { getHash: { - value: function (window) { + value: function getHash(window) { var match = (window || this).location.href.match(/#(.*)$/); return match ? match[1] : ""; }, @@ -70,7 +70,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, getFragment: { - value: function (fragment, forcePushState) { + value: function getFragment(fragment, forcePushState) { var root; if (!fragment) { @@ -92,7 +92,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, activate: { - value: function (options) { + value: function activate(options) { if (this.active) { throw new Error("History has already been activated."); } @@ -142,7 +142,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, deactivate: { - value: function () { + value: function deactivate() { window.onpopstate = null; window.removeEventListener("hashchange", this._checkUrlCallback); clearInterval(this._checkUrlInterval); @@ -153,7 +153,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, checkUrl: { - value: function () { + value: function checkUrl() { var current = this.getFragment(); if (current === this.fragment && this.iframe) { @@ -175,7 +175,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, loadUrl: { - value: function (fragmentOverride) { + value: function loadUrl(fragmentOverride) { var fragment = this.fragment = this.getFragment(fragmentOverride); return this.options.routeHandler ? this.options.routeHandler(fragment) : false; @@ -185,7 +185,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, navigate: { - value: function (fragment, options) { + value: function navigate(fragment, options) { if (fragment && fragment.indexOf("://") != -1) { window.location.href = fragment; return true; @@ -246,7 +246,7 @@ System.register(["aurelia-history"], function (_export) { configurable: true }, navigateBack: { - value: function () { + value: function navigateBack() { this.history.back(); }, writable: true, diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index aa91370..67861f7 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,11 @@ +### 0.2.2 (2015-01-22) + + +#### Bug Fixes + +* **package:** update dependencies ([0f9bc51a](http://github.com/aurelia/history-browser/commit/0f9bc51aa77e2441b6ad6c2454bdb79601e35c14)) + + ### 0.2.1 (2015-01-12) diff --git a/package.json b/package.json index 347b502..f708ed2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-history-browser", - "version": "0.2.1", + "version": "0.2.2", "description": "An implementation of the Aurelia history interface based on standard browser hash change and push state mechanisms.", "keywords": [ "aurelia",