Javascript parseURL method example
How do I make an javascript parseurl method example?
What is a javascript parseurl method example? How do you make a javascript parseurl method example? This script and codes were developed by Emre on 11 October 2022, Tuesday.
Javascript parseURL method example - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Javascript parseURL method example</title>
</head>
<body> <div class="tw_text">5 on the 5th Interview: Ian Anderson Gray by @memktgservices
https://t.co/Mb0BCQxwDp</div>
<br>
<div class="tw_text">The Best WordPress Plugins of 2015 30 Pros Reveal Theirs by @madlemmingz
https://t.co/sdfLrcUtCV</div>
<br>
<div class="tw_text">#Anlamanıİstiyorum Biraz düşünelim kardeşler.... http://t.co/3c00RlPFeN</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Javascript parseURL method example - Script Codes JS Codes
String.prototype.parseURL = function(){
return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=]+/g, function(url) {
return url.link(url);
});
};
String.prototype.parseHashtag = function() {
return this.replace(/[#]+[A-Za-z0-9-_şıöüğçİŞÖĞÜÇ]+/g, function(t) {
var tag = t.replace("#","")
return t.link("https://twitter.com/hashtag/"+tag+"?src=hash");
});
};
String.prototype.parseUsername = function() {
return this.replace(/[@]+[A-Za-z0-9-_şıöüğçİŞÖĞÜÇ]+/gi, function(u) {
var username = u.replace("@","")
return u.link("https://twitter.com/"+username);
});
};
$('.tw_text').each(function(){
var test = $(this).text();
$(this).html(test.parseURL().parseUsername().parseHashtag());
});
Developer | Emre |
Username | emredenx |
Uploaded | October 11, 2022 |
Rating | 3 |
Size | 1,905 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Simple Responsive Popup | 2,310 Kb |
A Pen by emre | 1,698 Kb |
Unordered List Table System | 2,508 Kb |
Border Arrow Example | 1,731 Kb |
CSS - Auto Resize for Video Embed | 1,730 Kb |
Responsive CSS3 Left Menu Width Toggle Animation | 3,051 Kb |
Combining z-axis and x-axis translation | 1,531 Kb |
Login Form | 1,996 Kb |
Profile CSS Hover Effect | 2,530 Kb |
Jquery Numeric Keypad Plugin - Mobile Supported | 2,867 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS Donut Charts | Seanstopnik | 2,908 Kb |
GLSL Hills | Ykob | 6,991 Kb |
Image Hover | Johnheiner | 3,409 Kb |
Minimal Material Design Form Input | Koenigsegg1 | 3,076 Kb |
Flex layout example | Mofny | 1,663 Kb |
Under construction | GhostRider | 1,642 Kb |
Sidebar Thing | Jonambas | 2,779 Kb |
A Pen by Jess | Jessamyne | 5,100 Kb |
Background Images | Jooonebug | 2,100 Kb |
Box-sizing | Elad2412 | 1,572 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!