MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1,230: Line 1,230:
     $(".oo-ui-actionFieldLayout-button .oo-ui-buttonInputWidget").remove();
     $(".oo-ui-actionFieldLayout-button .oo-ui-buttonInputWidget").remove();


     $('#submit').click(function() {
     document.querySelector('#submit a').addEventListener('click', function(event) {
        event.preventDefault(); // Prevent the default link behavior
 
         var email = 'submit@softwear.directory';
         var email = 'submit@softwear.directory';
         var subject = 'new entry to the softwear directory';
         var subject = 'new entry to the softwear directory';
Line 1,244: Line 1,246:
                   '[ your name / contact / social ]\n\n' +
                   '[ your name / contact / social ]\n\n' +
                   '---';
                   '---';
   
 
         var mailtoLink = 'mailto:' + encodeURIComponent(email) +
         var mailtoLink = 'mailto:' + encodeURIComponent(email) +
                         '?subject=' + encodeURIComponent(subject) +
                         '?subject=' + encodeURIComponent(subject) +
                         '&body=' + encodeURIComponent(body).replace(/%20/g, ' ');
                         '&body=' + encodeURIComponent(body).replace(/%20/g, ' ');
   
 
         window.location.href = mailtoLink;
         window.location.href = mailtoLink;
     });
     });
});
});

Navigation menu