better truncating of hrefs
This commit is contained in:
parent
e0ee7e10e0
commit
28770956b4
|
@ -106,7 +106,9 @@ window.frontend = (opts) => new Proxy({
|
||||||
|
|
||||||
|
|
||||||
let topic = data.xrf ? data.xrf.string : data.mesh.userData.src
|
let topic = data.xrf ? data.xrf.string : data.mesh.userData.src
|
||||||
if( topic.length > 20 ) topic = topic.replace(/.*\//,'')
|
if( topic.match(/\.\.\//) || (topic.length > 20 && AFRAME.utils.device.isMobile() ) ){
|
||||||
|
topic = topic.replace(/.*\//,'')
|
||||||
|
}
|
||||||
|
|
||||||
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ topic }<br>` : ''
|
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ topic }<br>` : ''
|
||||||
let metadata = data.mesh.userData
|
let metadata = data.mesh.userData
|
||||||
|
|
Loading…
Reference in New Issue