mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Replace ajax with fetch, improve image diff (#27267)
1. Dropzone attachment removal, pretty simple replacement 2. Image diff: The previous code fetched every image twice, once via `img[src]` and once via `$.ajax`. Now it's only fetched once and a second time only when necessary. The image diff code was partially rewritten. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		@@ -128,3 +128,14 @@ export function decodeURLEncodedBase64(base64url) {
 | 
			
		||||
    .replace(/_/g, '/')
 | 
			
		||||
    .replace(/-/g, '+'));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const domParser = new DOMParser();
 | 
			
		||||
const xmlSerializer = new XMLSerializer();
 | 
			
		||||
 | 
			
		||||
export function parseDom(text, contentType) {
 | 
			
		||||
  return domParser.parseFromString(text, contentType);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function serializeXml(node) {
 | 
			
		||||
  return xmlSerializer.serializeToString(node);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user