File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 23
23
},
24
24
"homepage" : " https://github.com/xbsoftware/enjoyhint" ,
25
25
"devDependencies" : {
26
- "grunt-contrib-cssmin" : " ^0.11.0"
26
+ "grunt-contrib-concat" : " ^0.5.1" ,
27
+ "grunt-contrib-cssmin" : " ^0.11.0" ,
28
+ "grunt-contrib-jshint" : " ^0.11.2" ,
29
+ "grunt-contrib-uglify" : " ^0.9.1"
27
30
},
28
31
"dependencies" : {
29
32
"grunt" : " ^0.4.5" ,
Original file line number Diff line number Diff line change @@ -69,10 +69,11 @@ var EnjoyHint = function (_options) {
69
69
if ( ! step_data . selector ) {
70
70
for ( var prop in step_data ) {
71
71
if ( step_data . hasOwnProperty ( prop ) && prop . split ( " " ) [ 1 ] ) {
72
- step_data . selector = prop . split ( " " ) [ 1 ] ;
73
- step_data . event = prop . split ( " " ) [ 0 ] ;
74
- if ( prop . split ( " " ) [ 0 ] == 'next' || prop . split ( " " ) [ 0 ] == 'auto' || prop . split ( " " ) [ 0 ] == 'custom' ) {
75
- step_data . event_type = prop . split ( " " ) [ 0 ] ;
72
+ var space_index = prop . indexOf ( " " ) ;
73
+ step_data . event = prop . slice ( 0 , space_index ) ;
74
+ step_data . selector = prop . slice ( space_index + 1 ) ;
75
+ if ( step_data . event == 'next' || step_data . event == 'auto' || step_data . event == 'custom' ) {
76
+ step_data . event_type = step_data . event ;
76
77
}
77
78
step_data . description = step_data [ prop ] ;
78
79
}
You can’t perform that action at this time.
0 commit comments