mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			837 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			837 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <%+cbi/valueheader%>
 | |
| 
 | |
| <script type="text/javascript">//<![CDATA[
 | |
| 	function act_download_rule(btn,filename)
 | |
| 	{
 | |
| 		btn.disabled = true;
 | |
| 		btn.value    = '<%:Downloading...%> ';
 | |
| 		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "clash","game_rule")%>',
 | |
| 			{
 | |
| 				filename: filename
 | |
| 			},
 | |
| 			function(x,status)
 | |
| 			{
 | |
| 				if ( x && x.status == 200 ) {
 | |
| 					if(status.game_rule=="0")
 | |
| 					{
 | |
| 						btn.value    = '<%:Error%>';
 | |
| 					}
 | |
| 					else
 | |
| 					{
 | |
| 						btn.value    = '<%:Successful%>';
 | |
| 						window.location.reload();
 | |
| 					}
 | |
| 				}
 | |
| 				else {
 | |
| 					btn.value    = '<%:Timeout%>';
 | |
| 				}
 | |
| 			}
 | |
| 		);
 | |
| 		btn.disabled = false;
 | |
| 		return false;
 | |
| 	}
 | |
| //]]></script>
 | |
| 
 | |
| 
 | |
| <input type="button" class="cbi-button cbi-input-reload" value="<%:Update Rule%>" onclick="return act_download_rule(this,'<%=self:cfgvalue(section)%>')" />
 | |
| 
 | |
| <%+cbi/valuefooter%> | 
![github-actions[bot]](/assets/img/avatar_default.png)