swopsmart.com Ads.txt file
<!DOCTYPE html>
<html lang="en">
<head>
<title>404 - Page Not Found | Swopsmart</title>
<meta name="description" content="Every company has a story and this is ours. Come in and find out more abour Swopsmart"><meta name="msvalidate.01" content="700FC7D2305D3525F302131FFF533636" />
<meta name="keywords" content="sell iphone, sell cell phone, sell iPad, sell tablet, cash for electronics, sell gadgets, cash for iphone, swopsmart, swopsmart.com">
<meta name="revisit-after" content="3 days">
<!-- Facebook open graph tags -->
<meta property="og:url" xml:lang="EN" content="//www.facebook.com/swopsmart">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Swopsmart.com">
<meta property="og:title" content="404 - Page Not Found | Swopsmart">
<meta property="og:description" content="Every company has a story and this is ours. Come in and find out more abour Swopsmart">
<meta property="og:image" content="https://www.swopsmart.com/assets/front/images/ss-og-image.png">
<!-- twitter summary card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@swopsmart" />
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="16x16" href="https://www.swopsmart.com/assets/front/favicon/16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://www.swopsmart.com/assets/front/favicon/32x32.png">
<link rel="icon" type="image/png" sizes="192x192" href="https://www.swopsmart.com/assets/front/favicon/192x192.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://www.swopsmart.com/assets/front/favicon/180x180.png">
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Custom ui styles -->
<link href="https://cdn.swopsmart.com/assets/front/css/main.min.1292021.css" rel="stylesheet" type="text/css" media="all" />
<!-- Google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-79995837-1', 'auto');
ga('send', 'pageview');
</script>
<!-- Google analytics ends -->
</head>
<body>
<!--Skips direct to content-->
<a href="#main-content" class="skip-main">Skip to main content</a>
<!-- Header begins-->
<header class="global-nav">
<div class="container">
<div class="nav-wrapper">
<a href="/" class="logo-link"><img src="https://www.swopsmart.com/assets/front/images/ss-logo.svg" class="logo" alt="Swopsmart logo"/></a>
<!-- desktop navigation links-->
<nav class="desktop">
<ul class="nav-links">
<li ><a href="https://www.swopsmart.com/sell" aria-label="Start selling your electronics">Start Selling</a></li>
<li><a href="https://www.swopsmart.com/reviews">Reviews</a></li>
<li>
<a href="https://www.swopsmart.com/sign-in">Sign In</a>
</li>
</ul>
<div class="nav-cart">
<!--Gets items in cart -->
<a href="https://www.swopsmart.com/process/cart" aria-label="Shopping cart"><img src="https://cdn.swopsmart.com/assets/front/images/shopping_cart-24px.svg" alt="Shipping cart icon" />
<span class="cart-circle" aria-label="0 items in shopping cart">0</span></a>
</div>
</nav>
<input class="menu-btn mobile" type="checkbox" id="menu-btn">
<label class="menu-icon mobile" for="menu-btn"><span class="nav-icon mobile"></span></label>
<!--mobile navigation links-->
<nav class="mobile">
<div class="top-nav">
<ul>
<li>
<a href="https://www.swopsmart.com/sign-in"><img src="https://cdn.swopsmart.com/assets/front/images/user.svg" alt="user icon" loading="lazy"> Sign In</a>
</li>
<li class="m-nav-phone"><a href="tel:800-707-9043">(800)-707-9043</a></li>
</ul>
</div>
<div class="bottom-nav">
<span>Sell your...</span>
<ul>
<li><a href="https://www.swopsmart.com/sell/iphone" aria-label="Sell your iPhone" >iPhone</a></li>
<li><a href="https://www.swopsmart.com/sell/cell-phones/samsung" aria-label="Sell your Samsung">Samsung</a></li>
<li><a href="https://www.swopsmart.com/sell/cell-phones" aria-label="Sell your Tablet">Android</a></li>
<li><a href="https://www.swopsmart.com/sell/apple-products/headphones" aria-label="Sell your AirPods">AirPods</a></li>
<li><a href="https://www.swopsmart.com/sell/tablets" aria-label="Sell your Tablet">Tablet</a></li>
<li><a href="https://www.swopsmart.com/sell/ipad" aria-label="Sell your iPad">iPad</a></li>
<li><a href="https://www.swopsmart.com/sell" aria-label="Start selling your electronics" >Others</a></li>
</ul>
</div>
</nav>
<div class="nav-cart mobile">
<a href="https://www.swopsmart.com/process/cart"><img src="https://cdn.swopsmart.com/assets/front/images/shopping_cart-24px.svg" alt="Shipping cart icon" loading="lazy" />
<span class="cart-circle" aria-label="0 items in shopping card">0</span></a>
</div>
</div>
</div>
</header>
<!-- Header ends-->
<main id="main-content">
<section class="not-found">
<h1 class="not-found__message">We are sorry, the page you requested cannot be found.</h1>
<h3 class="not-found__help">Let us help you sell something.</h3>
<a class="not_found__btn global--blue-btn" href="start-selling" aria-label="Start selling your electronics">Start Selling</a>
</section>
</main>
<!--Footer begins-->
<footer>
<div class="container">
<div class="global-footer-top">
<div class="subscribe">
<h3 class="subscribe__title footer--title">Subscribe</h3>
<form class="subscribe__form" id="nlSubscribe" >
<input type="email" aria-label="Subscribe email" placeholder="Enter your email" class="nlEmail" required="">
<button type="submit">GO!</button>
</form>
<p class="subscribe__form-text">Sign up to receive offers</p>
<img src="/assets/front/images/ss-logo-white.svg" style="width: 100px;padding: 1.5rem 0;" class="subscribe__logo" alt="Swopsmart logo" />
<p class="subscribe__say-hello">Say hello</p>
<a class="subscribe__contact" href="tel:800-707-9043">(800)-707-9043</a>
</div>
<div class="pop-search">
<h3 class="pop-search__title footer--title">POPULAR SEARCHES</h3>
<ul class="pop-search__list">
<li class="pop-search__item"><a href="https://www.swopsmart.com/sell/iphone">Sell iPhone</a></li>
<li class="pop-search__item"><a href="https://www.swopsmart.com/sell/ipad">Sell iPad</a></li>
<li class="pop-search__item"><a href="https://www.swopsmart.com/sell/ipod">Sell iPod</a></li>
<li class="pop-search__item"><a href="https://www.swopsmart.com/sell/tablets">Sell Tablet</a></li>
<li class="pop-search__item"><a href="https://www.swopsmart.com/sell/cell-phones/samsung">Sell Samsung</a></li>
<li class="pop-search__item"><a href="https://www.swopsmart.com/sell/cell-phones">Sell Cell Phone</a></li>
</ul>
</div>
<div class="resources">
<h3 class="resources__title footer--title">Resources</h3>
<ul class="resources__list">
<li class="resources__item"><a href="https://www.swopsmart.com/check-esn">Check IMEI/ESN</a></li>
<li class="resources__item"><a href="https://www.swopsmart.com/check-verizon-esn">Check Verizon ESN</a></li>
<li class="resources__item"><a href="https://www.swopsmart.com/check-att-imei">Check AT&T IMEI</a></li>
<li class="resources__item"><a href="https://www.swopsmart.com/check-tmobile-imei">Check T-Mobile IMEI</a></li>
<li class="resources__item"><a href="https://www.swopsmart.com/check-cricket-imei">Check Cricket IMEI</a></li>
</ul>
</div>
<div class="support">
<h3 class="support__title footer--title">Support</h3>
<ul class="support__list">
<li class="support__item"><a href="https://www.swopsmart.com/contact-us">Contact Us</a></li>
<li class="support__item"><a href="https://www.swopsmart.com/track-order">Track My Order</a></li>
<li class="support__item"><a href="https://www.swopsmart.com/support/faq">FAQs</a></li>
<li class="support__item"><a href="https://www.swopsmart.com/blog">Blog</a></li>
</ul>
</div>
<div class="about">
<h3 class="about__title footer--title">About SWOPSMART</h3>
<ul class="about__list">
<li class="about__item"><a href="https://www.swopsmart.com/about-us">About Us</a></li>
<li class="about__item"><a href="https://www.swopsmart.com/how-it-works">How it Works</a></li>
<li class="support__item"><a href="https://www.swopsmart.com/scholarship">Scholarship</a></li>
<li class="about__item"><a href="https://www.swopsmart.com/privacy">Privacy Policy</a></li>
<li class="about__item"><a href="https://www.swopsmart.com/terms-and-condition">Terms & Condition</a></li>
</ul>
</div>
</div>
<!--Bottom part -- copyright and social-->
<div class="global-footer-bottom">
<div class="copyright">
<ul class="copyright__list">
<li class="copyright__item">© 2020 Swopsmart, LLC. All rights reserved.</li>
<li class="copyright__item">Brands and Trademarks found on swopsmart.com are property of their respective owners.</li>
</ul>
</div>
<div class="social">
<ul class="social__list">
<li class="social__item"> <a href="https://www.youtube.com/c/Swopsmart"> <img src="data:image/svg+xml;base64,PD94bW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EtNC42LDAuMS01LDBjMC44LDIuNCwzLjMsMy45LDYsNGMtMi4xLDEuNi00LjYsMi41LTcuNSwyLjVjLTAuNSwwLTEsMC0xLjUtMC4xICBjMi43LDEuNyw2LjUsMi42LDEwLDIuNmMxMS4zLDAsMTctOC45LDE3LTE3YzAtMC4zLDAtMC43LDAtMUMzOC4yLDE4LjYsMzkuMiwxNy40LDQwLDE2LjJ6IiBmaWxsPSIjRkZGRkZGIiBpZD0iQnJpZF8xXyIvPjwvc3ZnPg==" alt="twitter icon" /> </a> </li>
<li class="social__item"> <a href="https://www.instagram.com/swopsmart"> <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaWQ9IkxheWVyXzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiA1MTI7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOnVybCgjU1ZHSURfMV8pO30KCS5zdDF7ZmlsbDojRkZGRkZGO30KPC9zdHlsZT48Zz48cmFkaWFsR3JhZGllbnQgY3g9IjIyNS40NzM3IiBjeT0iMjIyLjgwNDYiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMTQuMjE3NSAwIDAgMTQuMjE3MSAtMzA1NS43MDM5IC0yNjE1Ljk5NTgpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgaWQ9IlNWR0lEXzFfIiByPSI0Ny43MjEyIj48c3RvcCBvZmZzZXQ9IjkuNjkzODgwZS0wMiIgc3R5bGU9InN0b3AtY29sb3I6I0ZGRDg3QSIvPjxzdG9wIG9mZnNld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xMy41eiIvPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0yNjEsMTU5Yy01NCwwLTk3LjcsNDMuNy05Ny43LDk3LjdjMCw1My45LDQzLjcsOTcuNyw5Ny43LDk3LjdjNTMuOSwwLDk3LjctNDMuNyw5Ny43LTk3LjcgICAgQzM1OC42LDIwMi43LDMxNC45LDE1OSwyNjEsMTU5eiBNMjYxLDMxNS40Yy0zMi41LDAtNTguOC0yNi4zLTU4LjgtNTguOGMwLTMyLjUsMjYuMy01OC44LDU4LjgtNTguOGMzMi40LDAsNTguOCwyNi4zLDU4LjgsNTguOCAgICBDMzE5LjcsMjg5LjEsMjkzLjQsMzE1LjQsMjYxLDMxNS40eiIvPjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0zNzYuNywxNTcuNWMwLDEzLjctMTEuMSwyNC44LTI0LjgsMjQuOGMtMTMuNywwLTI0LjgtMTEuMS0yNC44LTI0LjhjMC0xMy43LDExLjEtMjQuOSwyNC44LTI0LjkgICAgQzM2NS42LDEzMi42LDM3Ni43LDE0My43LDM3Ni43LDE1Ny41eiIvPjwvZz48L2c+PC9zdmc+" alt="instagram icon" /> </a> </li>
<li class="social__item"> <a href="https://www.facebook.com/swopsmart"> <img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDUwIDUwIiBpZD0iTGF5ZXJfMSIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNTAgNTAiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxwYXRoIGQ9Ik00NSwxSDVDMi44LDEsMSwyLjgsMSw1djQwYzAsMi4yLDEuOCw0LDQsNGg0MGMyLjIsMCw0LTEuOCw0LTRWNUM0OSwyLjgsNDcuMiwxLDQ1LDF6IiBmaWxsPSIjM0E1QkEwIi8+PHBhdGggZD0iTTMyLDI2bDEtNWwtNSwwdi00YzAtMS41LDAuOC0yLDMtMmgydi01YzAsMC0yLDAtNCwwYy00LjEsMC03LDIuNC03LDd2NGgtNXY1aDV2MTRoNlYyNkgzMnoiIGZpbGw9IiNGRkZGRkYiIGlkPSJmXzFfIi8+PC9zdmc+" alt="facebook icon" /> </a> </li>
</ul>
</div>
</div>
</div>
</footer>
<!--Footer Ends-->
<!--Subscribe modal-->
<div class="modal" id="subscribe">
<div class="inner-modal">
<span class="subscribe-response">Thanks!</span>
<p>You have been added to our list</p>
<button class="close" id="closeSubscribeModal"><img alt="close button" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDIwIDIwIj48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMiAtMikiPjxwYXRoIGQ9Ik0xMiwyYTkuOTkxLDkuOTkxLDAsMSwwLDcuMDc0LDIuOTI2QTEwLDEwLDAsMCwwLDEyLDJabTUsMTMuNTlMMTUuNTksMTcsMTIsMTMuNDEsOC40MSwxNyw3LDE1LjU5LDEwLjU5LDEyLDcsOC40MSw4LjQxLDcsMTIsMTAuNTksMTUuNTksNywxNyw4LjQxLDEzLjQxLDEyWiIgZmlsbD0iIzBiNmRjNiIvPjwvZz48L3N2Zz4=" /></button>
</div>
</div>
<!--Subscribe modal ends-->
</body>
</html>
<script>
document.getElementById("nlSubscribe").addEventListener("submit", submitSubscribe);
function submitSubscribe() {
event.preventDefault();
let userEmail = document.getElementsByClassName("nlEmail");
userEmail = userEmail[0].value;
//POST request
var httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function (data) {
let response = httpRequest.response;
response = JSON.parse(response);
openModal();
}
httpRequest.open('POST', 'https://www.swopsmart.com/Front/subscribe', true);
httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
httpRequest.send('email=' + encodeURIComponent(userEmail))
}
</script>
<!--Subscribe javascript -->
<script>
const emailInput = document.querySelector(".nlEmail"),
modal = document.querySelector("#subscribe"),
closeButton = document.querySelector("#closeSubscribeModal");
// If there is a modal button, open the modal when it's clicked
// and close it if someone clicks the close button, or if they
// hit escape
function openModal() {
fadeIn(modal);
closeButton.addEventListener("click", () => closeModal());
document.onkeydown = (e) => {
if (e.keyCode == 27) {
// keyCode 27 is esc
closeModal();
}
};
};
function closeModal() {
emailInput.value = '';
emailInput.blur();
emailInput.style.outline = '2px solid #223260';
fadeOut(modal);
};
function fadeOut(element) {
var opacity = 1;
function decrease() {
opacity -= 0.05;
if (opacity <=0) {
//complete
element.style.opacity = 0;
element.classList.remove('is-open');
return true;
}
element.style.opacity = opacity;
requestAnimationFrame(decrease);
}
decrease();
};
function fadeIn(element) {
var opacity = 0;
element.classList.add('is-open');
function increase() {
opacity += 0.05;
if (opacity >=1) {
//complete
element.style.opacity = 1;
return true;
}
element.style.opacity = opacity;
requestAnimationFrame(increase);
}
increase();
};
</script>