Page Menu
Home
Wildfire Games
Search
Configure Global Search
Log In
Paste
P254
Wordpress os detection scrip
Active
Public
Actions
Authored by
Stan
on Aug 8 2021, 12:30 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
<
script
type
=
"text/javascript"
>
// <![CDATA[
var
OSName
=
"Unknown OS"
;
if
(
navigator
.
platform
.
indexOf
(
"Win"
)
!==
-
1
)
{
OSName
=
"Windows"
;
}
if
(
navigator
.
platform
.
indexOf
(
"Mac"
)
!==
-
1
)
{
OSName
=
"MacOS"
;
}
if
(
navigator
.
platform
.
indexOf
(
"Linux"
)
!==
-
1
)
{
OSName
=
"Linux"
;
}
if
(
OSName
.
indexOf
(
"Windows"
)
!==
-
1
)
{
document
.
getElementById
(
"dl-page-button"
).
innerHTML
=
'Download for Windows »'
;
document
.
getElementById
(
"dl-page-button"
).
href
=
'win'
;
}
if
(
OSName
.
indexOf
(
"MacOS"
)
!==
-
1
)
{
document
.
getElementById
(
"dl-page-button"
).
innerHTML
=
'Download for macOS »'
;
document
.
getElementById
(
"dl-page-button"
).
href
=
'mac'
;
}
if
(
OSName
.
indexOf
(
"Linux"
)
!==
-
1
)
{
document
.
getElementById
(
"dl-page-button"
).
innerHTML
=
'Download for Linux »'
;
document
.
getElementById
(
"dl-page-button"
).
href
=
'linux'
;
}
// ]]>
</
script
>
Event Timeline
Stan
created this paste.
Aug 8 2021, 12:30 PM
Stan
created this object with visibility "Public (No Login Required)".
Log In to Comment