1637940318
Neste artigo, você aprenderá como criar um detector AdBlock usando apenas HTML, CSS e JavaScript.
Neste tutorial, criei um detector AdBlock. Tecnicamente, os bloqueadores de anúncios atualmente não bloqueiam anúncios - eles bloqueiam solicitações da web que baixam conteúdo para o navegador. Em outras palavras, os bloqueadores de anúncios impedem o download de anúncios em seu navegador, permitindo que as páginas da web carreguem mais rapidamente e proporcionando uma navegação melhor.
A geração de AdBlock é baseada em listas simples, chamadas listas de filtros, que determinam o que bloquear e mascarar ou permitir que apareça nas páginas que você visita. essas listas consistem, na verdade, em uma lista de URLs na forma de “lista branca” ou “lista de bloqueio”.
ao visitar um site, bloqueie a revisão expressa se o site estiver em uma lista tão óbvia. Nesse caso, as solicitações de material de conteúdo externo serão bloqueadas e os anúncios não baixados para o site. Em suma, a tecnologia adblock é uma tecnologia dura e rápida que consiste em políticas que podem ser anexadas a essas listas de filtros para decidir qual conteúdo deve ser bloqueado ou não nos sites em que você está navegando.
Primeiro, você deve criar três arquivos. Um deles é HTML, o outro é CSS e o terceiro é JavaScript. Depois de criar o arquivo, cole o código fornecido a seguir.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Adblock detecter | By Codequs</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<img src="pic/logo.png">
<p class="detect">Detecting...</p>
<p class="ad-p">Please wait!</p>
</div>
<script src="main.js"></script>
</body>
</html>
Em segundo lugar, crie um arquivo CSS com o nome style.css e cole os códigos fornecidos em seu arquivo CSS. Lembre-se de que você deve criar um arquivo com a extensão .css.
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap");
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #1da1f2;
font-family: "Poppins", sans-serif;
}
.wrapper{
background: #fff;
max-width: 400px;
width: 100%;
border-radius: 15px;
padding: 25px;
box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
}
img{
width: 120px;
margin: 18px 30%;
}
.detect{
background: #1da1f2;
color: #fff;
padding: 8px 15px;
font-weight: 600;
font-size: 22px;
text-align: center;
cursor: pointer;
}
.ad-p{
margin-top: 20px;
text-align: center;
}
.detect.ab{
background: red;
}
.detect.no-ab{
background: #1da1f2;
}
Terceiro, crie um arquivo JavaScript denominado main.js e cole os códigos fornecidos em seu arquivo JavaScript. Lembre-se de que você deve criar um arquivo .js.
setTimeout(() => {
var adblockEnabled = false;
document.body.innerHTML +='<div class="adsbygoogle" id="ad-detector"> </div>';
var adElement = document.getElementById("ad-detector");
var adElementStyle = getComputedStyle(adElement, null);
if(adElementStyle.display === "none"){
document.getElementsByClassName("detect")[0].innerHTML = "Adblock detected!";
document.getElementsByClassName("detect")[0].classList.add("ab");
document.getElementsByClassName("ad-p")[0].innerHTML = "Our website is made possible by displaying online advertisements to our visitors.Please consider supporting us by disabling your ad blocker on our website.";
}
else{
document.getElementsByClassName("detect")[0].innerHTML = "Adblock disabled! :)";
document.getElementsByClassName("detect")[0].classList.add("no-ab");
document.getElementsByClassName("ad-p")[0].innerHTML = "Thank you for disabling ad blocker :)";
}
}, 2000);
1677108125
Are you looking to build a professional-looking blog with HTML, CSS, and JavaScript? In this video
tutorial, we'll walk you through the process of designing and developing a blog from scratch, step-by-step.
From creating the layout of your blog with HTML and CSS to adding interactivity and functionality with JavaScript,
we'll cover everything you need to know to create a fully functional blog. Whether you're a blogger,
web developer, or simply looking to learn new skills, this tutorial is for you!
We'll also provide some tips and tricks along the way to help you optimize your blog for search engines, improve your website's accessibility, and enhance the user experience.
🔔 Subscribe for more!
https://www.youtube.com/channel/UCHI9Mo7HCSlqum1UMP2APFQ
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
🔗 Source code
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
☝ Start developing the project (base files + images)
- Click on the UpFiles link
- Click the green button (code)
- Click Download ZIP
- Extract the project to the desired location
📂Assets
Icons: https://boxicon.com/
Fonts: https://fonts.google.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
🔥 Follow me!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tags:
#responsiveportfolio #portfoliohtmlcssjs #webmonster #html #css #javascript #webdesign #website #react #blog, #HTML #CSS #JavaScript #web_development #responsive_design #accessibility #user_experience #tutorial.
So, if you're ready to start building your own blog, this video is the perfect place to start. Be sure to like this video and subscribe to our channel for more web development tutorials and tips!
Link of The Video :
https://youtu.be/BqgWIel4uuU
1628189100
Image Uploader with Preview || Html CSS JavaScript || #html #css #javascript #coding
1671267560
In this tutorial we are going to make a personal Portfolio in this website there are six section Home, About, Services,Portfolio , Skills, and Contact the main features of this is dark/light mode function
∎ Download Source codes - https://www.thesimplifieddev.com/make-a-personal-portfolio-website
Features : -
1630506330
This video is about the product landing page using HTML CSS And JavaScript, in which we created a simple product landing page using HTML CSS and in order to perform those powerful animations we use the GSAP a JavaScript animation library for work done.
In this video we broadly cover the concepts of CSS Flex box and CSS Grid system and Some CSS Properties such as nth child selector, ::before & ::after much more.
Don't forget to join the channel for more videos like this. Code Savvy
0:00 - Intro
0:10 - Result
0:38 - Project Setup
01:35 – Reset HTML
02:21 – Left Container HTML
03:41 – Wrapper
14:58 – Bottom Shoe Nav
26:23 – Right Container HTML
33:10 – Product Size
35:49 – Reviews
41:11 – GSAP Animations
Click to Watch Full tutorial on YOUTUBE
1629473371
Html, CSS (Flexbox), JavaScript DOM, Javascript Animations.
Anyway, you can learn everything mentioned. Follow the tutorial.