Skip to content

Commit

Permalink
Update ministylehub.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mingyigg authored Jan 21, 2024
1 parent c28bb6e commit 29c32eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ministylehub.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ document.addEventListener('DOMContentLoaded', (event) => {
// 选择一个始终存在于 DOM 中的父元素,例如 'body'
document.body.addEventListener('click', (e) => {
// 检查点击的元素是否是您想要的 'a' 标签
if (e.target && e.target.matches('.sqs-block-instagram img') || e.target.matches('.sqs-block-instagram a')) {
if (e.target && (e.target.matches('.sqs-block-instagram img') || e.target.matches('.sqs-block-instagram a') || e.target.matches('.sqs-gallery img') || e.target.matches('.sqs-gallery a'))) {
e.preventDefault(); // 阻止链接的默认动作
e.stopPropagation();
}
});
document.body.addEventListener('auxclick', (e) => {
// 检查点击的元素是否是您想要的 'a' 标签
if (e.target && e.target.matches('.sqs-block-instagram img') || e.target.matches('.sqs-block-instagram a')) {
if (e.target && (e.target.matches('.sqs-block-instagram img') || e.target.matches('.sqs-block-instagram a') || e.target.matches('.sqs-gallery img') || e.target.matches('.sqs-gallery a'))) {
e.preventDefault(); // 阻止链接的默认动作
e.stopPropagation();
}
Expand Down

0 comments on commit 29c32eb

Please sign in to comment.