Refactores entry model.

This commit is contained in:
Lars Jung 2012-07-17 21:28:34 +02:00
parent 050d91daa8
commit 3349108f7e

View file

@ -18,7 +18,9 @@ modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, ty
}, },
rePrePathname = /.*:\/\/[^\/]*/, location = (function () {
var rePrePathname = /.*:\/\/[^\/]*/,
rePostPathname = /[^\/]*$/, rePostPathname = /[^\/]*$/,
uriToPathname = function (uri) { uriToPathname = function (uri) {
@ -26,10 +28,7 @@ modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, ty
return uri.replace(rePrePathname, '').replace(rePostPathname, ''); return uri.replace(rePrePathname, '').replace(rePostPathname, '');
}, },
testpathname = '/a b',
location = (function () {
var testpathname = '/a b',
a = doc.createElement('a'), a = doc.createElement('a'),
isDecoded, location; isDecoded, location;