BlogsMarks - Convert URL text to Link

In Mark description, convert plain text URLs to links (URLs into HTML hyperlinks that are clickable)

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         BlogsMarks - Convert URL text to Link
// @namespace    https://blogmarks.net
// @version      0.3
// @description  In Mark description, convert plain text URLs to links (URLs into HTML hyperlinks that are clickable)
// @author       Decembre
// @icon         https://icons.iconarchive.com/icons/sicons/basic-round-social/48/blogmarks-icon.png
// @match        https://blogmarks.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var urlRegex = /(https?:\/\/[^\s]+)/g;
    var elements = document.querySelectorAll('.b .description');

    elements.forEach(function(element) {
        element.innerHTML = element.innerHTML.replace(urlRegex, function(url) {
            return '<a href="' + url + '" target="_blank">' + url + '</a>';
        });
    });
})();