lovebyte / Lardi Phone Numbers Links

// ==UserScript==
// @name         Lardi Phone Numbers Links
// @version      0.3
// @description  chnage numbers to links and staff
// @author       lovebyte
// @match        https://lardi-trans.com/*
// @grant        none
// @license MIT
// @updateURL https://openuserjs.org/meta/lovebyte/Lardi_Phone_Numbers_Links.meta.js
// @downloadURL https://openuserjs.org/install/lovebyte/Lardi_Phone_Numbers_Links.user.js
// @copyright 2019, lovebyte (https://openuserjs.org/users/lovebyte)
// ==/UserScript==

(function() {
    'use strict';
    document.body.innerHTML = document.body.innerHTML.replace(/<span>(\+?[\d|\(][\h|\(\d{3}\)|\.|\-|\d]{6,}\d)<\/span>/g, function (match, p1) {
		p1 = p1.replace(/[^\d+]+/g, function () {
			return '';
		});
	return '<a href="tel:'+p1+'">'+p1+'</a>  <a href="viber://chat?number='+p1+'"><img src="https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/359_Viber_logo-512.png" width="15px" height="15px"></a>';
});
})();