mirror of
				https://github.com/amiaopensource/ffmprovisr.git
				synced 2025-10-31 00:48:10 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			854 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			854 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| $(document).ready(function() {
 | |
| 
 | |
|   // open recipe window if a hash is found in URL
 | |
|   if(window.location.hash) {
 | |
|     id = window.location.hash
 | |
|     document.getElementById(id.substring(1)).checked = true;
 | |
|     $('html, body').animate({ scrollTop: $(id).offset().top}, 1000);
 | |
|     $(id).closest('div').find('.link').empty();
 | |
|     $(id).closest('div').find('.link').append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
 | |
|   }
 | |
| 
 | |
|   // add hash URL when recipe is opened
 | |
|   $('label[class="recipe"]').on("click", function(){
 | |
|     id = $(this).attr("for");
 | |
|     window.location.hash = ('#' + id)
 | |
|     $('#' + id).closest('div').find('.link').empty();
 | |
|     $('#' + id).closest('div').find('.link').append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
 | |
|   });
 | |
| 
 | |
| });
 |