FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScriptButtons/src/button.js at master · steverife/JavaScriptButtons · GitHub
steverife
/
JavaScriptButtons
Public
forked from
jbillimoria/JavaScriptButtons
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScriptButtons
/
src
/
button.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (18 loc) · 693 Bytes
Breadcrumbs
JavaScriptButtons
/
src
/
button.js
Copy path
File metadata and controls
26 lines (18 loc) · 693 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict'
;
var
template
=
require
(
'./util/template'
)
,
constants
=
require
(
'./constants'
)
;
module
.
exports
=
function
button
(
label
,
data
,
config
)
{
var
model
,
locale
,
style
;
config
=
config
||
{
}
;
locale
=
data
.
get
(
'lc'
)
||
constants
.
DEFAULT_LOCALE
;
style
=
config
.
style
||
constants
.
DEFAULT_STYLE
;
label
=
constants
.
STRINGS
[
locale
]
[
label
]
;
label
=
label
.
replace
(
'{wordmark}'
,
'<img src="'
+
constants
.
WORDMARK
[
style
]
+
'" alt="PayPal" />'
)
;
model
=
{
style
:
style
,
size
:
config
.
size
||
constants
.
DEFAULT_SIZE
,
logo
:
constants
.
LOGO
,
label
:
label
}
;
return
template
(
constants
.
TEMPLATES
.
button
,
model
)
;
}
;
Back
|
FazBrowse Home
|
New Git URL