PluginProbe ʕ •ᴥ•ʔ
Check & Log Email – Easy Email Testing & Mail logging / 2.0.16
Check & Log Email – Easy Email Testing & Mail logging v2.0.16
2.0.16 2.0.15 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 2.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.13.1 2.0.13.2 2.0.14 2.0.2 2.0.3 2.0.4 2.0.5 2.0.5.1 2.0.6 2.0.7 2.0.8 2.0.9 trunk 0.5.7 0.6.0 0.6.1 0.6.2 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.12.1 1.0.13 1.0.13.1 1.0.2 1.0.3
check-email / assets / js / check-email-front.js
check-email / assets / js Last commit date
admin 4 days ago check-email-front.js 4 days ago check-email-front.min.js 4 days ago network-admin.js 4 days ago network-admin.min.js 4 days ago
check-email-front.js
59 lines
1 function check_email_rot47(str) {
2 let rotated = '';
3 for (let i = 0; i < str.length; i++) {
4 const charCode = str.charCodeAt(i);
5 if (charCode >= 33 && charCode <= 126) {
6 rotated += String.fromCharCode(33 + ((charCode + 14) % 94));
7 } else {
8 rotated += str[i]; // Non-ROT47 characters remain unchanged
9 }
10 }
11 return rotated;
12 }
13 document.addEventListener("DOMContentLoaded", function() {
14 // functionality for rot13
15 // this code for non-anchor email
16 if (checkemail_encoder_data.is_enable && checkemail_encoder_data.email_technique == 'rot_13') {
17 var emailLinks = document.querySelectorAll('.check-email-encoded-email');
18 emailLinks.forEach(function(emailElement) {
19 var encodedEmail = emailElement.textContent;
20 var decodedEmail = encodedEmail.replace(/[a-zA-Z]/g, function(c) {
21 return String.fromCharCode(
22 (c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26
23 );
24 });
25 emailElement.textContent = decodedEmail;
26 });
27 // this code for anchor tag
28 document.querySelectorAll('a[href^="mailto:"]').forEach(function(emailElement) {
29 var encodedEmail = emailElement.getAttribute('href').replace('mailto:', '');
30 var decodedEmail = encodedEmail.replace(/[a-zA-Z]/g, function(c) {
31 return String.fromCharCode(
32 (c <= 'Z' ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26
33 );
34 });
35 // emailElement.textContent = decodedEmail;
36 emailElement.setAttribute('href', 'mailto:' + decodedEmail);
37 });
38 }
39 if (checkemail_encoder_data.is_enable && checkemail_encoder_data.email_technique == 'rot_47') {
40 var emailLinks = document.querySelectorAll('.check-email-rot47-email');
41 emailLinks.forEach(function(emailElement) {
42 var encodedEmail = emailElement.textContent;
43 const decodedEmail = check_email_rot47(encodedEmail);
44 emailElement.textContent = decodedEmail;
45 });
46
47 document.querySelectorAll('a[href^="mailto:"]').forEach(function(emailElement) {
48 var encodedEmail = emailElement.getAttribute('href').replace('mailto:', '');
49 const decodedEmail = check_email_rot47(encodedEmail);
50 emailElement.setAttribute('href', 'mailto:' + decodedEmail);
51 });
52 }
53 if (checkemail_encoder_data.is_enable && checkemail_encoder_data.email_technique == 'css_direction') {
54 // this code for anchor tag
55 document.querySelectorAll('a[href^="mailto:"]').forEach(function(encodedEmail) {
56 encodedEmail.setAttribute("style", "direction: ltr;");
57 });
58 }
59 });