Tips for preventing changes to the HTML code using the inspect tool

Seeking to prevent recommended videos from appearing when pausing or ending a YouTube video, I resorted to a CSS and JS modification. I successfully placed an image over the video during these events, achieving the desired outcome.

However, upon inspecting the code using the browser's tool, I realized it's possible to modify the files containing the CSS and JS code directly. Removing the established code leads to the video being displayed without my intended modification.

I'm unsure of how to address this issue or what steps to take next. Any suggestions or guidance on resolving this matter would be greatly appreciated.

Below is the code snippet I've been working with:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/styles.css">
    <link rel="shortcut icon" href="imgs/icon/favicon.ico">
    <style>
    .hytPlayerWrap {
        display: inline-block;
        position: relative;
    }

    .ytp-copylink-title{
        display: none;
    }
    /* Modified CSS and JS code goes here */
</style>
    <title> 2021</title>
</head>
<body id="plenario">
<div class="container-fluid">
<div class="row">

    <div class="col-12">
        <br><br><br><br>
        <div class="row">
            <div class="col-2">&nbsp;</div>
            <div class="col-8 text-center">
                <div class="hytPlayerWrapOuter" >
                    <div class="hytPlayerWrap" style="background-image:url(imgs/Captura.jpg)">
                        <iframe width="640" height="360" src="https://www.youtube-nocookie.com/embed/wzWmZYi4qMg?rel=0&controls=0&enablejsapi=1"  allowfullscreen="allowfullscreen" frameborder="0"></iframe>
                    </div>
                </div>

            </div>
            <div class="col-2">&nbsp;</div> 
        </div>
    </div>
    <div class="seccion-regresar-plenario"> 
    </div>  
</div>
</div>
<script src="js/jquery-3.5.1.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>  
<script src="js/utiles.js"></script>

<script>
    /* Modified JS code here */
</script>   
</body>
</html>

Answer №1

Preventing users from editing code via inspect element is not possible.

However, this only affects their side and does not pose a risk to your official website.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What methods can I utilize to showcase the JSON data on my webpage efficiently?

I'm currently working on a script that makes an ajax request. The Cloud appears to be responding with JSON data, but I'm not sure how to display this data on my webpage. Any suggestions? Here you can find a link to view the neatly formatted JSON ...

The impact of Ajax on jQuery document loading within an Ajax form

I'm currently using jQuery to change the colors of cancelled bookings in a Drupal view, and it's working well. jQuery(document).ready(function(){ jQuery(".bookingstatus:contains('Cancelled')").css("color","red"); }); However, when ...

Creating a Personalized Dropdown Menu Within the <div> Tag

My current task involves obtaining an element in the following format: https://i.sstatic.net/uhHkL.png Inside the nav-item, there is a dropdown with a top-centered triangle on it, and the dropdown is positioned at the center. Below is what I have achiev ...

Nested Property Binding in CallByName

I am looking to utilize CallByName in VBA to extract specific data from various webpages with differing html structures. In my scenario, I need to reference multiple parent nodes to access an element with or tags. Here is an example of the code: The eleme ...

sending a JSON string from the Visual Basic.NET side to the ASP.NET server

Struggling with transferring a JSON string to my asp.net using jQuery? Unclear about web methods, arrays, or functions and need assistance parsing the JSON string? Here is an example of how you can achieve this using VB.NET: Protected Sub Page_Load(ByVal ...

A Greasemonkey script for organizing and categorizing webpage elements

I've been working on a script to enhance the functionality of Facebook's find friends page by organizing suggested friends based on mutual connections. If you're interested in checking out the code, you can find it right here: http://pasteb ...

Issue with automatic sorting of prices for products on the shopping platform, along with difficulty in retrieving accurate product details

Part of a script that tracks prices: # Imported libraries import pandas as pd from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait ...

triggering a touchend event using jQuery Mobile

I'm currently utilizing jQuery Mobile in my project. Is there a way to terminate a gesture using jQuery Mobile? Let's say a user places their fingers on the screen and performs a drag - can I end this action programmatically with JavaScript, eve ...

What is the best way to highlight and extract only the white-coded texts on VSCode to facilitate the process of translating webpages manually?

Currently, I'm engaged in a project where my task involves duplicating an entire website using HTTrack. However, I only need to copy the main page and web pages that are one link deep. Upon copying the website, my next challenge is to translate all of ...

Achieving full child div coverage within a bordered parent div on Chrome

I am encountering an issue where I am trying to insert an image into a bordered div, but in Chrome 96.0 there are unexpected margins appearing from the top and left that I cannot seem to remove. Below is the code I am using: .wrapper { width: 36px; ...

Ways to implement schema.org and JSON-LD for data labeling on a homepage of a website

After reading extensively on utilizing schema.org to mark structured data, I have a couple of questions. Firstly, is it advisable to use json-ld considering that it's relatively new and not fully supported yet? Secondly, how can I implement schema.org ...

Exploring the Canvas with Full Element Panning, Minimap Included

Currently, I am working on incorporating a mini map onto my canvas that mirrors what is displayed on the main canvas. The main canvas includes zoom and pan functions. I have created a rectangular shape for the minimap to display the content of the canvas. ...

Exploring the possibilities of PhoneGap, leveraging the power of jQuery getJSON

I'm currently working on a mobile application using PhoneGap that requires AJAX functionality with jQuery. However, I've encountered an issue when trying to retrieve a JSON from a PHP web service with CORS enabled. The strange thing is that the c ...

Need help using JQuery to set the focus on the initial <select> element on a webpage?

Upon loading the page, I am looking to set focus on the initial element through JQuery. So far, I have managed to achieve this by using: $(":input:visible:first").focus(); or $(':input:enabled:visible:first').focus(); as described in a helpf ...

The IDs and classes of HTML elements

I have two different implementations of a livechat script. On my sandbox site, the livechat is fixed to the bottom right of the page and scrolls with the window. However, on my live site (where this specific code comes from), it is attached to the footer. ...

Phonegap integration with Web services

My index.html file includes an ajax call to a webservice (ASP.NET) that functions properly when deployed on the bigrock server with my domain. $.ajax({ type: "POST", url: "myurl/mywebservice.asmx", contentType: "application/json; ...

Reprinting information from my server / overlooked a task

After saving "Ben and Jerry's" to my database and retrieving it later for editing/resaving in an input tag, I am encountering an issue. Ben & Jerry&#39;s What could be the problem? (I have noticed that the "&" is correctly translated but ...

Textfield style in Struts2 customization

How can I change the appearance of the textfield? [https://i.sstatic.net/TkQ0i.png] I am trying to remove the background color The code snippet in question: <s:form action ="Update_datos_XML"> <s:hidden id="id" name="id_sesion" value=" ...

Guide on invoking the server-side method in Office 365 using JavaScript files

Exploring the capabilities of office 365 API apps and looking for documentation on how to access specific row(s) and cell(s) values / select a particular sheet programmatically in a .js file. Currently, I am utilizing the following code within a function: ...

The method to disable the dropdown for a select tag in a Polymer Dom-module is not functioning properly

I need help modifying the country dropdown based on a value retrieved from backend code If the disabled_value is 0, I want to hide the dropdown and make it unselectable If the disabled_value is 1, I want to enable the dropdown for selecting countries &l ...