OSDN Git Service
(root)
/
pettanr
/
clientJs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.6.147, fix X.UA & X.URL & X.EventDispatcher & X.XHR.
[pettanr/clientJs.git]
/
0.6.x
/
js
/
01_core
/
06_XURL.js
diff --git
a/0.6.x/js/01_core/06_XURL.js
b/0.6.x/js/01_core/06_XURL.js
index
7d395f4
..
daa6a8e
100644
(file)
--- a/
0.6.x/js/01_core/06_XURL.js
+++ b/
0.6.x/js/01_core/06_XURL.js
@@
-39,6
+39,10
@@
X[ 'URL' ] = {
\r
'isSameDomain' : X_URL_isSameDomain,
\r
\r
\r
'isSameDomain' : X_URL_isSameDomain,
\r
\r
+ 'isSameProtocol' : X_URL_isSameProtocol,
\r
+
\r
+ 'isLocal' : X_URL_isLocal,
\r
+
\r
'cleanup' : X_URL_cleanup,
\r
\r
'getEXT' : X_URL_getEXT
\r
'cleanup' : X_URL_cleanup,
\r
\r
'getEXT' : X_URL_getEXT
\r
@@
-81,6
+85,14
@@
function X_URL_isSameDomain( path ){
return path === X_URL_BASE_URL || path.indexOf( X_URL_BASE_URL + '/' ) === 0;
\r
};
\r
\r
return path === X_URL_BASE_URL || path.indexOf( X_URL_BASE_URL + '/' ) === 0;
\r
};
\r
\r
+function X_URL_isSameProtocol( path ){
\r
+ return X_URL_toAbsolutePath( path ).indexOf( location.protocol ) === 0;
\r
+};
\r
+
\r
+function X_URL_isLocal( path ){
\r
+ return X_URL_toAbsolutePath( path ).indexOf( 'file:' ) === 0;
\r
+};
\r
+
\r
function X_URL_cleanup( path ){
\r
return path.split( '?' )[ 0 ].split( '#' )[ 0 ];
\r
};
\r
function X_URL_cleanup( path ){
\r
return path.split( '?' )[ 0 ].split( '#' )[ 0 ];
\r
};
\r