0

I want to hide some link with JS. I found a code to replace a span.

demoer = {'pofkepfisodijfsodijf':'hd@j|m'};
$('span', '#bottom').bind('click', function(){
str = demoer[$(this).attr('title')];
str = str.replace('h', 'http://');
str = str.replace('m', 'mloiqsaeranol');
str = str.replace('d', 'demo');
str = str.replace('j', 'johanbleuzen.fr');
str = str.replace('@', '.');
str = str.replace('|', '/');
window.open(str, '', '');
});

My span

<span title="Demos">Demos</span>

But with all my test nothing happen... Can you help me please ?

frontcodelover
  • 327
  • 2
  • 21
  • Your code doesn't make sense. You are using the `title` attribute value to retrieve a value from the `demoer` object, but there is no such key such as `Demos` in the object. Of course nothing will happen. – Terry May 02 '18 at 19:40
  • @Terry thanks for you reply, so what is the solution please ? – frontcodelover May 02 '18 at 19:45
  • I have no idea what you're trying to do here. Are you using actual code? The key used in `demoer` looks like gibberish to me. – Terry May 02 '18 at 19:46
  • You can find the code here http://www.slow-lab.com/obfuscation-lien.php (french) it's a solution for cloaking. – frontcodelover May 02 '18 at 19:49
  • Yes I use Jquery libary. – frontcodelover May 02 '18 at 19:53
  • Still, there is no `pofkepfisodijfsodijf` in your element's `title` attribute. So `src` will return `undefined` and nothing will work. – Terry May 02 '18 at 19:54
  • I don't understand with this method doesn't work :( – frontcodelover May 02 '18 at 19:56
  • @nicolaswecandoit In the browser, press F12 to show the developer tools. Locate the "Console" tab (where JavaScript errors are shown) and reload the page. Does it tell you anything useful? – Andrew Morton May 02 '18 at 20:33

0 Answers0