Skip to content

Commit b616f66

Browse files
Remove jQuery AJAX from the repo commit graph (go-gitea#29373)
- Removed all jQuery AJAX calls and replaced with our fetch wrapper - Tested the repo collaborator mode dropdown functionality and it works as before # Demo using `fetch` instead of jQuery AJAX ![action](https://github.com/go-gitea/gitea/assets/20454870/7e2f166e-9941-4f26-9666-d00cdf3d9f60) Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: Giteabot <[email protected]>
1 parent 328d908 commit b616f66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

web_src/js/features/repo-graph.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import $ from 'jquery';
2+
import {GET} from '../modules/fetch.js';
23

34
export function initRepoGraphGit() {
45
const graphContainer = document.getElementById('git-graph-container');
@@ -60,7 +61,9 @@ export function initRepoGraphGit() {
6061
$('#rev-container').addClass('gt-hidden');
6162
$('#loading-indicator').removeClass('gt-hidden');
6263
(async () => {
63-
const div = $(await $.ajax(String(ajaxUrl)));
64+
const response = await GET(String(ajaxUrl));
65+
const html = await response.text();
66+
const div = $(html);
6467
$('#pagination').html(div.find('#pagination').html());
6568
$('#rel-container').html(div.find('#rel-container').html());
6669
$('#rev-container').html(div.find('#rev-container').html());

0 commit comments

Comments
 (0)