Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
be64961d
Commit
be64961d
authored
6 years ago
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cosmetics comic reader
parent
405a3909
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
527 deletions
+49
-527
archive.js
cps/static/js/archive/archive.js
+36
-31
io.js
cps/static/js/io.js
+0
-483
logviewer.js
cps/static/js/logviewer.js
+13
-13
No files found.
cps/static/js/archive/archive.js
View file @
be64961d
...
@@ -24,40 +24,45 @@
...
@@ -24,40 +24,45 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
/* ********************************************************************
/* ********************************************************************
* Alphanum sort() function version - case insensitive
* Alphanum sort() function version - case insensitive
* - Slower, but easier to modify for arrays of objects which contain
* - Slower, but easier to modify for arrays of objects which contain
* string properties
* string properties
*
*
*/
*/
/* exported alphanumCase */
function
alphanumCase
(
a
,
b
)
{
function
alphanumCase
(
a
,
b
)
{
function
chunkify
(
t
)
{
function
chunkify
(
t
)
{
var
tz
=
new
Array
();
var
tz
=
new
Array
();
var
x
=
0
,
y
=
-
1
,
n
=
0
,
i
,
j
;
var
x
=
0
,
y
=
-
1
,
n
=
0
,
i
,
j
;
while
(
i
=
(
j
=
t
.
charAt
(
x
++
)).
charCodeAt
(
0
))
{
while
(
i
=
(
j
=
t
.
charAt
(
x
++
)).
charCodeAt
(
0
))
{
var
m
=
(
i
==
46
||
(
i
>=
48
&&
i
<=
57
));
var
m
=
(
i
===
46
||
(
i
>=
48
&&
i
<=
57
));
if
(
m
!==
n
)
{
if
(
m
!==
n
)
{
tz
[
++
y
]
=
""
;
tz
[
++
y
]
=
""
;
n
=
m
;
n
=
m
;
}
}
tz
[
y
]
+=
j
;
tz
[
y
]
+=
j
;
}
return
tz
;
}
}
return
tz
;
}
var
aa
=
chunkify
(
a
.
filename
.
toLowerCase
());
var
bb
=
chunkify
(
b
.
filename
.
toLowerCase
());
var
aa
=
chunkify
(
a
.
filename
.
toLowerCase
());
var
bb
=
chunkify
(
b
.
filename
.
toLowerCase
());
for
(
var
x
=
0
;
aa
[
x
]
&&
bb
[
x
];
x
++
)
{
if
(
aa
[
x
]
!==
bb
[
x
])
{
for
(
x
=
0
;
aa
[
x
]
&&
bb
[
x
];
x
++
)
{
var
c
=
Number
(
aa
[
x
]),
d
=
Number
(
bb
[
x
]);
if
(
aa
[
x
]
!==
bb
[
x
])
{
if
(
c
===
aa
[
x
]
&&
d
===
bb
[
x
])
{
var
c
=
Number
(
aa
[
x
]),
d
=
Number
(
bb
[
x
]);
return
c
-
d
;
if
(
c
==
aa
[
x
]
&&
d
==
bb
[
x
])
{
}
else
{
return
c
-
d
;
return
(
aa
[
x
]
>
bb
[
x
])
?
1
:
-
1
;
}
else
return
(
aa
[
x
]
>
bb
[
x
])
?
1
:
-
1
;
}
}
}
}
}
return
aa
.
length
-
bb
.
length
;
return
aa
.
length
-
bb
.
length
;
}
}
// ===========================================================================
// ===========================================================================
...
...
This diff is collapsed.
Click to expand it.
cps/static/js/io.js
deleted
100644 → 0
View file @
405a3909
This diff is collapsed.
Click to expand it.
cps/static/js/logviewer.js
View file @
be64961d
...
@@ -46,19 +46,19 @@ function init(logType) {
...
@@ -46,19 +46,19 @@ function init(logType) {
};
};
r.send();*/
r.send();*/
$
.
ajax
({
$
.
ajax
({
url
:
"/ajax/log/"
+
logType
,
url
:
"/ajax/log/"
+
logType
,
datatype
:
'text'
,
datatype
:
"text"
,
cache
:
false
cache
:
false
})
})
.
done
(
function
(
data
)
{
.
done
(
function
(
data
)
{
var
text
;
var
text
;
$
(
"#renderer"
).
text
(
""
);
$
(
"#renderer"
).
text
(
""
);
text
=
(
data
).
split
(
"
\n
"
);
text
=
(
data
).
split
(
"
\n
"
);
console
.
log
(
text
.
length
);
//
console.log(text.length);
for
(
var
i
=
0
;
i
<
text
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
text
.
length
;
i
++
)
{
$
(
"#renderer"
).
append
(
"<div>"
+
_sanitize
(
text
[
i
])
+
"</div>"
);
$
(
"#renderer"
).
append
(
"<div>"
+
_sanitize
(
text
[
i
])
+
"</div>"
);
}
}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment