Browse Source

Show URL in unfurl card

JC Brand 4 years ago
parent
commit
a778f3866a
3 changed files with 4 additions and 1 deletions
  1. 1 0
      src/shared/chat/templates/unfurl.js
  2. 3 0
      src/utils/html.js
  3. 0 1
      webpack.html

+ 1 - 0
src/shared/chat/templates/unfurl.js

@@ -8,6 +8,7 @@ export default (o) => {
         <div class="card-body">
             <a href="${o.url}" target="_blank" rel="noopener"><h5 class="card-title">${o.title}</h5></a>
             <p class="card-text">${u.addHyperlinks(o.description)}</p>
+            <p class="card-text"><a href="${o.url}" target="_blank" rel="noopener">${u.getURI(o.url).domain()}</a></p>
         </div>
     </div>`;
 }

+ 3 - 0
src/utils/html.js

@@ -61,6 +61,9 @@ function getURI (url) {
     }
 }
 
+u.getURI = getURI;
+
+
 function checkTLS (uri) {
     return window.location.protocol === 'http:' ||
            window.location.protocol === 'https:' && uri.protocol().toLowerCase() === "https";

+ 0 - 1
webpack.html

@@ -26,7 +26,6 @@
         auto_away: 300,
         auto_register_muc_nickname: true,
         loglevel: 'debug',
-        message_limit: 300,
         modtools_disable_assign: ['owner', 'moderator', 'participant', 'visitor'],
         modtools_disable_query: ['moderator', 'participant', 'visitor'],
         enable_smacks: true,