Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bitmask_help
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meskio
bitmask_help
Commits
1083903e
Verified
Commit
1083903e
authored
7 years ago
by
meskio
Browse files
Options
Downloads
Patches
Plain Diff
Detect the platform on javascript
parent
52406dc6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
amber/layouts/home.html.haml
+3
-1
3 additions, 1 deletion
amber/layouts/home.html.haml
pages/assets/js/download.js
+22
-0
22 additions, 0 deletions
pages/assets/js/download.js
with
25 additions
and
1 deletion
amber/layouts/home.html.haml
+
3
−
1
View file @
1083903e
...
...
@@ -10,6 +10,8 @@
%link
(
rel=
"stylesheet"
href=
"/assets/bootstrap.min.css"
)
%link
(
rel=
"stylesheet"
href=
"/assets/font-awesome/css/font-awesome.min.css"
)
%link
(
rel=
"stylesheet"
href=
"/assets/style.css"
)
%script
(
src=
"/assets/js/jquery.min.js"
)
%script
(
src=
"/assets/js/download.js"
)
%link
(
rel=
"icon"
href=
"/favicon.ico"
type=
"image/x-icon"
)
=
html_head_base
%body
.home
...
...
@@ -30,7 +32,7 @@
.introtext
=
render
'home/intro'
.download.text-left
%a
.btn.btn-large.btn-primary
{
:href
=>
'install'
}
%a
.btn.btn-large.btn-primary
.download
{
:href
=>
'install'
}
%i
.fa.fa-download.fa-2x
%span
=
t
:download_bitmask
...
...
This diff is collapsed.
Click to expand it.
pages/assets/js/download.js
0 → 100644
+
22
−
0
View file @
1083903e
$
(
document
).
ready
(
function
()
{
$
(
"
.download
"
).
click
(
function
(
e
)
{
e
.
preventDefault
();
download
();
});
});
function
download
()
{
var
link
=
"
install
"
;
if
(
navigator
.
platform
.
indexOf
(
"
Linux
"
)
!=
-
1
)
{
link
=
"
https://dl.bitmask.net/client/linux/stable/Bitmask-linux64-latest.tar.gz
"
;
}
if
(
navigator
.
platform
.
indexOf
(
"
Mac
"
)
!=
-
1
)
{
link
=
"
https://dl.bitmask.net/client/osx/stable/Bitmask-latest.pkg
"
;
}
if
(
navigator
.
platform
.
indexOf
(
"
Android
"
)
!=
-
1
)
{
link
=
"
install/android
"
;
}
//if (navigator.platform.indexOf("Win") != -1) {
//}
window
.
location
=
link
;
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment