Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Moecube Store
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Moecube Store
Commits
7fa99095
Commit
7fa99095
authored
Dec 26, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
download
parent
36b7a1b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
26 deletions
+14
-26
.gitattributes
.gitattributes
+7
-1
assets/javascripts/mycard.coffee
assets/javascripts/mycard.coffee
+3
-9
assets/javascripts/mycard.js
assets/javascripts/mycard.js
+3
-15
index.html
index.html
+1
-1
No files found.
.gitattributes
View file @
7fa99095
# Auto detect text files and perform LF normalization
# Auto detect text files and perform LF normalization
* text=auto
* text=auto
\ No newline at end of file
*.html text
*.js text
*.coffee text
*.css text
*.less text
assets/javascripts/mycard.coffee
View file @
7fa99095
...
@@ -6,14 +6,8 @@ $(document).ready ->
...
@@ -6,14 +6,8 @@ $(document).ready ->
timeout
:
7200
timeout
:
7200
random
:
1
random
:
1
$
.
getJSON
'https://api.github.com/repos/zh99998/mycard/downloads?callback=?'
,
(
data
)
->
$
.
get
'/mycard/download.url'
,
(
data
)
->
for
download
in
data
.
data
if
data
.
match
(
/mycard-(.*)-win32\.7z/
)
if
v
=
download
.
name
.
match
(
/mycard-(.*)-win32\.7z/
)
$
(
'#download_version'
).
html
v
[
1
]
if
!
version
or
v
[
1
]
>
version
version
=
v
[
1
]
url
=
download
.
html_url
if
version
$
(
'#download_url'
).
attr
'href'
,
url
$
(
'#download_version'
).
html
version
else
else
$
(
'#download_version'
).
html
'读取失败'
$
(
'#download_version'
).
html
'读取失败'
\ No newline at end of file
assets/javascripts/mycard.js
View file @
7fa99095
...
@@ -7,21 +7,9 @@
...
@@ -7,21 +7,9 @@
timeout
:
7200
,
timeout
:
7200
,
random
:
1
random
:
1
});
});
return
$
.
getJSON
(
'
https://api.github.com/repos/zh99998/mycard/downloads?callback=?
'
,
function
(
data
)
{
return
$
.
get
(
'
http://my-card.in/mycard/download.url
'
,
function
(
data
)
{
var
download
,
url
,
v
,
version
,
_i
,
_len
,
_ref
;
if
(
data
.
match
(
/mycard-
(
.*
)
-win32
\.
7z/
))
{
_ref
=
data
.
data
;
return
$
(
'
#download_version
'
).
html
(
v
[
1
]);
for
(
_i
=
0
,
_len
=
_ref
.
length
;
_i
<
_len
;
_i
++
)
{
download
=
_ref
[
_i
];
if
(
v
=
download
.
name
.
match
(
/mycard-
(
.*
)
-win32
\.
7z/
))
{
if
(
!
version
||
v
[
1
]
>
version
)
{
version
=
v
[
1
];
url
=
download
.
html_url
;
}
}
}
if
(
version
)
{
$
(
'
#download_url
'
).
attr
(
'
href
'
,
url
);
return
$
(
'
#download_version
'
).
html
(
version
);
}
else
{
}
else
{
return
$
(
'
#download_version
'
).
html
(
'
读取失败
'
);
return
$
(
'
#download_version
'
).
html
(
'
读取失败
'
);
}
}
...
...
index.html
View file @
7fa99095
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
<div
id=
"buttons"
>
<div
id=
"buttons"
>
<div
id=
"download"
>
<div
id=
"download"
>
<a
id=
"download_url"
href=
"
#
"
class=
"download_active"
>
立即下载
</a>
<a
id=
"download_url"
href=
"
http://my-card.in/mycard/download
"
class=
"download_active"
>
立即下载
</a>
<a
class=
"download_information"
>
最新版本:
<span
id=
"download_version"
>
Loading...
</span></a>
<a
class=
"download_information"
>
最新版本:
<span
id=
"download_version"
>
Loading...
</span></a>
</div>
</div>
<div
id=
"download_sublist"
>
<div
id=
"download_sublist"
>
...
...
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