Added a common util to get project slug.
This commit is contained in:
parent
8aad788383
commit
b13f6fa99d
|
@ -0,0 +1,13 @@
|
|||
((w) ->
|
||||
|
||||
w.gl or= {}
|
||||
w.gl.utils or= {}
|
||||
|
||||
w.gl.utils.getProjectSlug = ->
|
||||
|
||||
$body = $ 'body'
|
||||
isInProjectPage = $body.data('page').split(':')[0] is 'projects'
|
||||
|
||||
return if isInProjectPage then $body.data 'project' else null
|
||||
|
||||
) window
|
Loading…
Reference in New Issue