Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var removeOverlay = function(re) {
- this.href = this.getAttribute('onclick').match(re).pop();
- this.removeAttribute('onclick');
- this.setAttribute('target', '_blank');
- };
- $('a.img_filename, a.expand_image').each((i,v) => {
- switch(v.className) {
- case 'img_filename':
- removeOverlay.call(v, /'(.*)'/)
- break;
- case 'expand_image':
- removeOverlay.call(v, /','(.*)',/)
- break;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement