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
Jul 13, 2019
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 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* ********************************************************************
* Alphanum sort() function version - case insensitive
* - Slower, but easier to modify for arrays of objects which contain
* string properties
*
*/
/* ********************************************************************
* Alphanum sort() function version - case insensitive
* - Slower, but easier to modify for arrays of objects which contain
* string properties
*
*/
/* exported alphanumCase */
function
alphanumCase
(
a
,
b
)
{
function
chunkify
(
t
)
{
var
tz
=
new
Array
();
var
x
=
0
,
y
=
-
1
,
n
=
0
,
i
,
j
;
while
(
i
=
(
j
=
t
.
charAt
(
x
++
)).
charCodeAt
(
0
))
{
var
m
=
(
i
==
46
||
(
i
>=
48
&&
i
<=
57
));
if
(
m
!==
n
)
{
tz
[
++
y
]
=
""
;
n
=
m
;
}
tz
[
y
]
+=
j
;
function
chunkify
(
t
)
{
var
tz
=
new
Array
();
var
x
=
0
,
y
=
-
1
,
n
=
0
,
i
,
j
;
while
(
i
=
(
j
=
t
.
charAt
(
x
++
)).
charCodeAt
(
0
))
{
var
m
=
(
i
===
46
||
(
i
>=
48
&&
i
<=
57
));
if
(
m
!==
n
)
{
tz
[
++
y
]
=
""
;
n
=
m
;
}
tz
[
y
]
+=
j
;
}
return
tz
;
}
return
tz
;
}
var
aa
=
chunkify
(
a
.
filename
.
toLowerCase
());
var
bb
=
chunkify
(
b
.
filename
.
toLowerCase
());
for
(
x
=
0
;
aa
[
x
]
&&
bb
[
x
];
x
++
)
{
if
(
aa
[
x
]
!==
bb
[
x
])
{
var
c
=
Number
(
aa
[
x
]),
d
=
Number
(
bb
[
x
]);
if
(
c
==
aa
[
x
]
&&
d
==
bb
[
x
])
{
return
c
-
d
;
}
else
return
(
aa
[
x
]
>
bb
[
x
])
?
1
:
-
1
;
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
])
{
var
c
=
Number
(
aa
[
x
]),
d
=
Number
(
bb
[
x
]);
if
(
c
===
aa
[
x
]
&&
d
===
bb
[
x
])
{
return
c
-
d
;
}
else
{
return
(
aa
[
x
]
>
bb
[
x
])
?
1
:
-
1
;
}
}
}
}
return
aa
.
length
-
bb
.
length
;
return
aa
.
length
-
bb
.
length
;
}
// ===========================================================================
...
...
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) {
};
r.send();*/
$
.
ajax
({
url
:
"/ajax/log/"
+
logType
,
datatype
:
'text'
,
cache
:
false
})
.
done
(
function
(
data
)
{
var
text
;
$
(
"#renderer"
).
text
(
""
);
text
=
(
data
).
split
(
"
\n
"
);
console
.
log
(
text
.
length
);
for
(
var
i
=
0
;
i
<
text
.
length
;
i
++
)
{
$
(
"#renderer"
).
append
(
"<div>"
+
_sanitize
(
text
[
i
])
+
"</div>"
);
}
});
url
:
"/ajax/log/"
+
logType
,
datatype
:
"text"
,
cache
:
false
})
.
done
(
function
(
data
)
{
var
text
;
$
(
"#renderer"
).
text
(
""
);
text
=
(
data
).
split
(
"
\n
"
);
//
console.log(text.length);
for
(
var
i
=
0
;
i
<
text
.
length
;
i
++
)
{
$
(
"#renderer"
).
append
(
"<div>"
+
_sanitize
(
text
[
i
])
+
"</div>"
);
}
});
}
...
...
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