Files
medicalalert-web-reloaded/wp/wp-content/plugins/wp-media-folder/assets/js/single_file.js
2024-07-16 13:57:46 +00:00

12 lines
461 B
JavaScript

jQuery(document).ready(function ($) {
$('.wpmf-defile').on('click', function (e) {
e.preventDefault();
var id = $(this).data('id');
var href = $(this).attr('href');
if (href.indexOf('docs.google.com') != -1) {
window.open(href);
} else {
window.location.href = wpmf_single.vars.site_url + '?act=wpmf_download_file&id=' + id + '&wpmf_nonce=' + wpmf_single.vars.wpmf_nonce;
}
});
});