Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Last active November 4, 2023 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nocodesupplyco/3d328987a898bc8a06bd7b37b50f5522 to your computer and use it in GitHub Desktop.
Save nocodesupplyco/3d328987a898bc8a06bd7b37b50f5522 to your computer and use it in GitHub Desktop.
Remove https:// from text link
// See test example of this here: https://codepen.io/cmoen89/pen/Baxdwxe?editors=1010
$(function () {
$( "a[data-clean='remove-http']" ).each(function() {
var clean = $(this).text().replace(/^\/\/|^.*?:(\/\/)?/, '');
$(this).text(clean);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment