Refactor: Extract the cat generator
This commit is contained in:
		
							parent
							
								
									2218dba252
								
							
						
					
					
						commit
						23810d0ce5
					
				
					 3 changed files with 9 additions and 2 deletions
				
			
		
							
								
								
									
										3
									
								
								src/web/app/common/scripts/get-cat.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/web/app/common/scripts/get-cat.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| module.exports = function() { | ||||
| 	return '(=^・・^=)' | ||||
| }; | ||||
|  | @ -285,6 +285,8 @@ | |||
| 
 | ||||
| 	</style> | ||||
| 	<script> | ||||
| 		get-cat = require '../../common/scripts/get-cat' | ||||
| 
 | ||||
| 		@mixin \api | ||||
| 		@mixin \notify | ||||
| 		@mixin \autocomplete | ||||
|  | @ -429,6 +431,6 @@ | |||
| 				@update! | ||||
| 
 | ||||
| 		@cat = ~> | ||||
| 			@refs.text.value = @refs.text.value + '(=^・・^=)' | ||||
| 			@refs.text.value = @refs.text.value + get-cat! | ||||
| 	</script> | ||||
| </mk-post-form> | ||||
|  |  | |||
|  | @ -178,6 +178,8 @@ | |||
| 
 | ||||
| 	</style> | ||||
| 	<script> | ||||
| 		get-cat = require '../../common/scripts/get-cat' | ||||
| 
 | ||||
| 		@mixin \api | ||||
| 
 | ||||
| 		@wait = false | ||||
|  | @ -264,6 +266,6 @@ | |||
| 			@unmount! | ||||
| 
 | ||||
| 		@cat = ~> | ||||
| 			@refs.text.value = @refs.text.value + '(=^・・^=)' | ||||
| 			@refs.text.value = @refs.text.value + get-cat! | ||||
| 	</script> | ||||
| </mk-post-form> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue