Skip to content
代码片段 群组 项目
提交 6c8b149f 编辑于 作者: Daniel Schoemer's avatar Daniel Schoemer
浏览文件

Replace jQuery in init_details_button.js

This commit replaces jQuery with vanilla JavaScript in file
app/assets/javascripts/projects/commit_box/info/init_details_button.js

Fixes https://gitlab.com/gitlab-org/gitlab/-/issues/362997

Changelog: changed
上级 ab6ae620
No related branches found
No related tags found
无相关合并请求
import $ from 'jquery';
export const initDetailsButton = () => { export const initDetailsButton = () => {
$('body').on('click', '.js-details-expand', function expand(e) { document.querySelector('.commit-info').addEventListener('click', function expand(e) {
e.preventDefault(); e.preventDefault();
$(this).next('.js-details-content').removeClass('hide'); this.querySelector('.js-details-content').classList.remove('hide');
$(this).hide(); this.querySelector('.js-details-expand').classList.add('gl-display-none');
}); });
}; };
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册