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() {