mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-10-21 08:22:43 +00:00
Fix the 'Chat' link on user profiles
This commit is contained in:
@@ -171,7 +171,7 @@ function handleLoad() {
|
||||
|
||||
function modifyLinks() {
|
||||
for (var ls = document.links, numLinks = ls.length, i=0; i<numLinks; i++){
|
||||
if(ls[i].href.indexOf(location.protocol+'//'+location.host) !== -1 && ls[i].href.match(new RegExp(/\/[A-Za-z0-9_\-~]+\.[A-Za-z0-9]+$/)) === null) {
|
||||
if(ls[i].href.indexOf(location.protocol+'//'+location.host) !== -1 && ls[i].href.match(new RegExp(/\/[A-Za-z0-9_\-~]+\.[A-Za-z0-9]+$/)) === null && ls[i].href.match(new RegExp(/\/chat\?room=.+$/)) === null) {
|
||||
//should be a regular link
|
||||
ls[i].setAttribute('onclick', 'return internalLink(\"'+ls[i].href.substring((location.protocol+'//'+location.host).length)+'\")');
|
||||
}
|
||||
@@ -245,3 +245,8 @@ function onError(error) {
|
||||
// Log the error.
|
||||
console.error('Error code', error.code, 'object', error);
|
||||
}
|
||||
|
||||
function newPopup(url) {
|
||||
popupWindow = window.open(
|
||||
url,'popUpWindow','height=700,width=450,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes')
|
||||
}
|
||||
|
Reference in New Issue
Block a user