User:Manishearth/scriptlinks.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
//Test stuff:
// [[User:Manishearth]] [[User:Manishearth|boom]]
// [http://en.wikipedia.org] [http://www.boom.com boom]
// http://www.wikia.com/blooper/testlink
/* [[Boomdeyada]] */
Line 18:
par[j].innerHTML=par[j].innerHTML.replace(/\[(http[s]?:\/\/[^\]\s]*)\]/g,"<a href='$1'>$1</a>");
par[j].innerHTML=par[j].innerHTML.replace(/\[(http[s]?:\/\[^\]\s]*)[\s]?([^\]]*)\]/g,"<a href='$1'>$2</a>");
//par[j].innerHTML=par[j].innerHTML.replace(/[^\"\>][\s]?+(http[s]?:\/\/[^\s]*)/g,"<a href='$1'>$1</a>");
}
}