From 3349108f7ed77c8b5c0b2f25878ae795656438df Mon Sep 17 00:00:00 2001 From: Lars Jung <lrsjng@gmail.com> Date: Tue, 17 Jul 2012 21:28:34 +0200 Subject: [PATCH] Refactores entry model. --- src/_h5ai/js/inc/model/entry.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/_h5ai/js/inc/model/entry.js b/src/_h5ai/js/inc/model/entry.js index 8667ded2..4e6539a4 100644 --- a/src/_h5ai/js/inc/model/entry.js +++ b/src/_h5ai/js/inc/model/entry.js @@ -18,18 +18,17 @@ modulejs.define('model/entry', ['_', 'core/types', 'core/ajax'], function (_, ty }, - rePrePathname = /.*:\/\/[^\/]*/, - rePostPathname = /[^\/]*$/, - - uriToPathname = function (uri) { - - return uri.replace(rePrePathname, '').replace(rePostPathname, ''); - }, - - location = (function () { - var testpathname = '/a b', + var rePrePathname = /.*:\/\/[^\/]*/, + rePostPathname = /[^\/]*$/, + + uriToPathname = function (uri) { + + return uri.replace(rePrePathname, '').replace(rePostPathname, ''); + }, + + testpathname = '/a b', a = doc.createElement('a'), isDecoded, location;