@@ -128,29 +128,46 @@ import 'jquery-effects-shake';
128128 }
129129 ) ;
130130
131- Cache . add_btn . on ( 'click' , function ( ) {
132- const newIp = Cache . empty_ip
133- . clone ( )
134- . appendTo ( Cache . ip_list_wrap ) ;
135- newIp . removeAttr ( 'id' ) . slideDown ( 250 ) ;
136- } ) ;
131+ Cache . add_btn . on (
132+ 'click' ,
133+ function ( ) {
134+ const newIp = Cache . empty_ip
135+ . clone ( )
136+ . appendTo ( Cache . ip_list_wrap ) ;
137+ newIp . removeAttr ( 'id' ) . slideDown ( 250 ) ;
138+ }
139+ ) ;
137140
138- $ ( Cache . ip_list_wrap ) . on ( 'blur' , '.ip.code' , function ( ) {
139- addIp ( $ ( this ) . val ( ) , $ ( this ) . next ( ) . val ( ) , $ ( this ) ) ;
140- } ) ;
141+ $ ( Cache . ip_list_wrap ) . on (
142+ 'blur' ,
143+ '.ip.code' ,
144+ function ( ) {
145+ addIp ( $ ( this ) . val ( ) , $ ( this ) . next ( ) . val ( ) , $ ( this ) ) ;
146+ }
147+ ) ;
141148
142149 const myipBtn = document . getElementById ( 'rsa_myip' ) ;
143150 if ( null !== myipBtn ) {
144- $ ( myipBtn ) . on ( 'click' , function ( ) {
145- $ ( '.ip.code:last' ) . val ( $ ( this ) . data ( 'myip' ) ) . blur ( ) ;
146- } ) ;
151+ $ ( myipBtn ) . on (
152+ 'click' ,
153+ function ( ) {
154+ $ ( '.ip.code:last' ) . val ( $ ( this ) . data ( 'myip' ) ) . blur ( ) ;
155+ }
156+ ) ;
147157 }
148158
149- $ ( Cache . ip_list_wrap ) . on ( 'click' , '.remove_btn' , function ( ) {
150- $ ( this . parentNode ) . slideUp ( 250 , function ( ) {
151- $ ( this ) . remove ( ) ;
152- } ) ;
153- } ) ;
159+ $ ( Cache . ip_list_wrap ) . on (
160+ 'click' ,
161+ '.remove_btn' ,
162+ function ( ) {
163+ $ ( this . parentNode ) . slideUp (
164+ 250 ,
165+ function ( ) {
166+ $ ( this ) . remove ( ) ;
167+ }
168+ ) ;
169+ }
170+ ) ;
154171 }
155172
156173 function addIp ( ip , comment , obj ) {
@@ -196,7 +213,9 @@ import 'jquery-effects-shake';
196213 ) ;
197214 }
198215
199- $ ( function ( ) {
200- init ( ) ;
201- } ) ;
216+ $ (
217+ function ( ) {
218+ init ( ) ;
219+ }
220+ ) ;
202221} ( window , jQuery ) ) ;
0 commit comments