Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
7dbe75f1
Commit
7dbe75f1
authored
Nov 23, 2016
by
Alexander Yuzhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mobile] Add format method for the String type.
parent
398004c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
apps/common/mobile/utils/extendes.js
apps/common/mobile/utils/extendes.js
+10
-0
No files found.
apps/common/mobile/utils/extendes.js
View file @
7dbe75f1
...
...
@@ -42,6 +42,16 @@
define
(
[
'
jquery
'
,
'
underscore
'
,
'
framework7
'
],
function
()
{
//Extend String
if
(
!
String
.
prototype
.
format
)
{
String
.
prototype
.
format
=
function
()
{
var
args
=
arguments
;
return
this
.
replace
(
/{
(\d
+
)
}/g
,
function
(
match
,
number
)
{
return
typeof
args
[
number
]
!=
'
undefined
'
?
args
[
number
]
:
match
;
});
};
}
//Extend jQuery functions
jQuery
.
fn
.
extend
(
{
single
:
function
(
types
,
selector
,
data
,
fn
)
{
...
...
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