Jump to content

URL Link Identification


Setraxis

Recommended Posts

How can i color external url's in the code to have internal codes like www.myforum.com as normal white and external code like www.myfakeboard.com as red links? in all links you can have should have a red line and internal links are all white

 

Example :

- Internal URL => White Link https://webflake.sx

- External URL => Red Link https://webflake.sooo

- Fake Internal Link => Red Link https://webflake.sx

Link to comment
Share on other sites

  • Administrator
3 minutes ago, Setraxis said:

DAMNED..... Read Please!

Ok I’m not helping you anymore... you are posting in IPS Support and bringing up a different forum software and getting pissy for no reason 

 

image.gif.3fae207ae8f285af330ea5477b476f86.gif

Link to comment
Share on other sites

regex for detecting url

^(?!http|https|https:\/\/|http:\/\/)([?a-zA-Z0-9-.\+]{2,256}\.[a-z]{2,4}\b)

a href color change on button click

var btn1 = document.getElementById('btn-1'),
    btn2 = document.getElementById('btn-2');

btn1.addEventListener('click', handler);
btn2.addEventListener('click', handler);

function handler(e) {
  if(e.target === btn1) {
    // selecting the 'a' element using 'getElementById'.
    var a = document.getElementById('some-id');
    a.style.color = 'red';
  } else {
    // selecting the 'a' element using 'getElementsByClassName'.
    var a = document.getElementsByClassName('some-class')[0];
    a.style.color = 'green';
  }
}

edit it by urself

you just have to compare detected url and ur website url and change color of link with js

244125173664448512.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...