Add function common.refresh.
This commit is contained in:
		
							parent
							
								
									113a92fb5b
								
							
						
					
					
						commit
						d0a0a87b43
					
				
					 3 changed files with 10 additions and 4 deletions
				
			
		|  | @ -140,6 +140,12 @@ function init_atag_merge_params() | |||
|     }); | ||||
| } | ||||
| 
 | ||||
| common.refresh = | ||||
| function refresh() | ||||
| { | ||||
|     window.location.reload(); | ||||
| } | ||||
| 
 | ||||
| common.on_pageload = | ||||
| function on_pageload() | ||||
| { | ||||
|  |  | |||
|  | @ -154,8 +154,8 @@ https://stackoverflow.com/a/35153397 | |||
| {{header.make_header()}} | ||||
| <div id="content_body"> | ||||
|     {% if channel is not none %} | ||||
|     <span><button class="refresh_button" onclick="refresh_channel('{{channel.id}}', false, function(){location.reload()})">Refresh new videos</button></span> | ||||
|     <span><button class="refresh_button" onclick="refresh_channel('{{channel.id}}', true, function(){location.reload()})">Refresh everything</button></span> | ||||
|     <span><button class="refresh_button" onclick="refresh_channel('{{channel.id}}', false, common.refresh)">Refresh new videos</button></span> | ||||
|     <span><button class="refresh_button" onclick="refresh_channel('{{channel.id}}', true, common.refresh)">Refresh everything</button></span> | ||||
| 
 | ||||
|     <span><a class="merge_params" href="/channel/{{channel.id}}">All</a></span> | ||||
|     {% else %} | ||||
|  |  | |||
|  | @ -48,8 +48,8 @@ | |||
| <body> | ||||
| {{header.make_header()}} | ||||
| <div id="content_body"> | ||||
|     <span><button class="refresh_button" onclick="refresh_all_channels(false, function(){location.reload()})">Refresh new videos</button></span> | ||||
|     <span><button class="refresh_button" onclick="refresh_all_channels(true, function(){location.reload()})">Refresh everything</button></span> | ||||
|     <span><button class="refresh_button" onclick="refresh_all_channels(false, common.refresh)">Refresh new videos</button></span> | ||||
|     <span><button class="refresh_button" onclick="refresh_all_channels(true, common.refresh)">Refresh everything</button></span> | ||||
|     <div> | ||||
|         <input type="text" id="new_channel_textbox"> | ||||
|         <button id="new_channel_button" onclick="add_channel_form(event)">Add new channel</button> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue