URL Compare

Size
2,519 Kb
Views
4,048

How do I make an url compare?

What is a url compare? How do you make a url compare? This script and codes were developed by Martin Baillie on 25 January 2023, Wednesday.

URL Compare Previews

URL Compare - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>URL Compare</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <form class="urls"> <div> <label for="url0">Enter URL1</label> <textarea id="url0" class="url" type="textbox" value="http://www.phase-eight.com/dresses/garment/fcp-category/categorylist?isInStock=true&isSearchFilterSuffix=true&60&visModel=CHANNEL_COUNTRY_CURRENCY&filters=Hierarchy_TOP_NAVIGATION_FILTER:/TOP_NAVIGATION/wc_dresses/wc_garment_dresses&page=1&results=240"></textarea> </div> <div> <label for="url1">Enter URL2</label> <textarea id="url1" class="url" type="textbox" value="http://www.phase-eight.com/fcp/categorylist/garment/dresses?isInStock=true&isSearchFilterSuffix=true&results=240&visModel=CHANNEL_COUNTRY_CURRENCY&filters=Hierarchy_TOP_NAVIGATION_FILTER:/TOP_NAVIGATION/wc_dresses/wc_garment_dresses!PWS_available_sizes_FILTER_LANG_en:18"></textarea> </div> <button type="submit">Submit</button>
</form>
<div class="output"> <div class="output0"></div> <div class="output1"></div>
</div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

URL Compare - Script Codes CSS Codes

/*
http://www.phase-eight.com/dresses/garment/fcp-category/categorylist?isInStock=true&isSearchFilterSuffix=true&60&visModel=CHANNEL_COUNTRY_CURRENCY&filters=Hierarchy_TOP_NAVIGATION_FILTER:/TOP_NAVIGATION/wc_dresses/wc_garment_dresses&page=1&results=240
http://www.phase-eight.com/fcp/categorylist/garment/dresses?isInStock=true&isSearchFilterSuffix=true&results=240&visModel=CHANNEL_COUNTRY_CURRENCY&filters=Hierarchy_TOP_NAVIGATION_FILTER:/TOP_NAVIGATION/wc_dresses/wc_garment_dresses!PWS_available_sizes_FILTER_LANG_en:18
*/
.output div { float:left; width: 50%; word-wrap: break-word;
}

URL Compare - Script Codes JS Codes

function arrayOfUrls (el) { var urls = []; $(el).find('.url').each(function(i, el) { urls[i] = new URL($(el).attr('value')); }); return urls;
}
$(function() { $('.urls').on('submit', function(e) { e.preventDefault(); var urls = arrayOfUrls(this); $.each(urls, function(i, v) { var $output = $('.output' + i); function updateOutput(p) { if (typeof p === 'string') { if (/^\?/.test(p)) { updateOutput(p.replace('?', '').split('&')); } else { $output.append(p + '<br />'); } } else if (p instanceof Array && p.length > 0) { $output.append(p[0] + '<br />'); p.shift(); updateOutput(p); } } updateOutput(v.protocol + '//'); updateOutput(v.hostname); updateOutput(v.pathname); updateOutput(v.search); }); }); $('.urls').submit();
});
URL Compare - Script Codes
URL Compare - Script Codes
Home Page Home
Developer Martin Baillie
Username martin42
Uploaded January 25, 2023
Rating 3
Size 2,519 Kb
Views 4,048
Do you need developer help for URL Compare?

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!

Martin Baillie (martin42) Script Codes
Create amazing captions with AI!

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!