Merge remote-tracking branch 'accelforce/custom/quote' into features/v4.1.2
This commit is contained in:
@@ -322,6 +322,29 @@ function main() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
delegate(document, '.quote-status', 'click', ({ target }) => {
|
||||
if (target.closest('.status__content__spoiler-link') ||
|
||||
target.closest('.media-gallery') ||
|
||||
target.closest('.video-player') ||
|
||||
target.closest('.audio-player')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let url = target.closest('.quote-status').getAttribute('dataurl');
|
||||
if (target.closest('.status__display-name')) {
|
||||
url = target.closest('.status__display-name').getAttribute('href');
|
||||
} else if (target.closest('.status-card')) {
|
||||
url = target.closest('.status-card').getAttribute('href');
|
||||
}
|
||||
|
||||
if (window.location.hostname === url.split('/')[2].split(':')[0]) {
|
||||
window.location.href = url;
|
||||
} else {
|
||||
window.open(url, 'blank');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
loadPolyfills()
|
||||
|
||||
Reference in New Issue
Block a user