FriendsOfREDAXO / FriendsOfREDAXO/emailobfuscator

jQuery Abhängigkeit entfernen?

Open
#40 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
45
Forks
2
PR merge metrics
No merged PRs in 30d

Description

In vielen Projekten nutze ich kein jQuery mehr und müsste es nur wegen des AddOns einsetzen.

Den JS-Code vom emailobfuscator könnte man auch ohne jQuery Abhängigkeiten umsetzen:

var email_links = document.querySelectorAll('[href^="javascript:decryptUnicorn"]');

Array.prototype.forEach.call(email_links, function(email_link, index, array) {

var email = email_link.href.match(/\((.*)\)/)[1];

email = email
// ROT13-Transformation
.replace(/[a-z]/gi, function (s) {
return String.fromCharCode(s.charCodeAt(0) + (s.toLowerCase() < 'n' ? 13 : -13));
})
// Ersetze # durch @
.replace(/\|/g, '@');

// Ersetze Einhörner
email_link.href = 'mailto:'+email;

});

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue provides no file or test path; first locate the emailobfuscator JavaScript entry point and its jQuery usage. Compare the proposed DOM-based behavior with the existing email-link handling, then verify that obfuscated links still become mailto links and that the dependency can be removed without regressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.