From c240de50b1db477387b37886123d13048bd19004 Mon Sep 17 00:00:00 2001 From: ken Date: Mon, 3 Aug 2026 11:42:43 +0800 Subject: [PATCH] js --- assets/javascripts/app.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 1b361e2..4edc200 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -2966,6 +2966,24 @@ function fixTabKeyboardNav() { $(document).ready(function () { fixTabKeyboardNav(); +}); +function removeBareUrlLinks() { + setTimeout(function () { + $('.dtr-control a').each(function () { + var $a = $(this); + var text = $a.text().trim(); + var href = $a.attr('href') || ''; + + // 判斷連結文字是否為網址(以 http:// 或 https:// 開頭) + if (/^https?:\/\//i.test(text)) { + $a.replaceWith(text); + } + }); + }, 500); +} + +$(document).ready(function () { + removeBareUrlLinks(); }); // 執行 member等高計算,目前改用flexbox故mark掉 by ika 20160105 // $(window).load(function() {