国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home WeChat Applet WeChat Development How to deal with WeChat prohibiting scrolling down to view URLs

How to deal with WeChat prohibiting scrolling down to view URLs

Jan 29, 2018 pm 05:18 PM
deal with how Check

You can view the URL when you pull down on WeChat. It is one of WeChat's security policies and a user-friendly interactive experience. This article mainly introduces how to disable pull-down to view the URL on WeChat. Friends who need it can refer to it. Hope it helps everyone.

Effect principle:

The WeChat drop-down elastic effect is actually a feature of the browser itself, and the focus is a manifestation of the scroll value;

Processing strategy:

1. Directly prohibit the touchmove event on the mobile side;

This strategy is generally suitable for use when the page has only one screen and does not require pull-down;


var touch1 = function(){
  document.querySelector(‘body‘).addEventListener(‘touchmove‘, function (e) { 
    e.preventDefault(); 
  });
}

Disadvantages: For screens of different sizes, it is necessary to consider that the content can be displayed on one screen, otherwise the content on 2+ screens will not be viewable;

2. Touchmove is prohibited At the same time, determine whether the scroll position reaches the top;

Consider whether the scroll bar reaches the top when pulling down <= 10 to prohibit the touchmove event, and consider that there is a situation of first pulling up and then pulling down, so the touchend event is monitored and calculated The highest point position in a touch event stream is used to determine


var touch2 = function () {
  var lastY;//最后一次y坐標(biāo)點
  var betterY;//每次touch最高點
  document.querySelector(‘body‘).addEventListener(&#39;touchstart&#39;, function(event) {
    lastY = event.originalEvent.changedTouches[0].clientY;
    betterY = lastY;
  });
  document.querySelector(‘body‘).addEventListener(&#39;touchmove&#39;, function(event) {
    var y = event.originalEvent.changedTouches[0].clientY;
    if(y > betterY){
      betterY = y;
    }
    var st = document.body.scrollTop; //滾動條高度
    if (y >= lastY && st <= 10) {
      lastY = y;
      event.preventDefault();
    }
    lastY = y;
  });
  document.querySelector(‘body‘).addEventListener(&#39;touchend&#39;, function(event) {
    var y = event.originalEvent.changedTouches[0].clientY;
    var st = document.body.scrollTop; //滾動條高度
    if(y < betterY && st <= 10){
      event.preventDefault();
    }
  });
}

Disadvantages: There are vulnerabilities in the first touchmove, and there are also vulnerabilities in the touchmove process

3. Listen to the scroll event of scroll and prohibit height < 0;

Whenever the height of the scroll bar is less than 0, reset it to 0 and force the return to the top position


var touch3 = function () {
  window.onscroll = function () {
    var top = document.documentElement.scrollTop || document.body.scrollTop;
    if(top <= 0){
      document.body.scrollTop = 0;
    }
  }
}

Disadvantages: There will be a drop-down URL splash screen phenomenon

Related recommendations:

Introduction to the http module and url module in node.js

Detailed explanation of modifying the root address of url() in Laravel

How php parses Chinese characters in the url

The above is the detailed content of How to deal with WeChat prohibiting scrolling down to view URLs. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The operation process of WIN10 service host occupying too much CPU The operation process of WIN10 service host occupying too much CPU Mar 27, 2024 pm 02:41 PM

1. First, we right-click the blank space of the taskbar and select the [Task Manager] option, or right-click the start logo, and then select the [Task Manager] option. 2. In the opened Task Manager interface, we click the [Services] tab on the far right. 3. In the opened [Service] tab, click the [Open Service] option below. 4. In the [Services] window that opens, right-click the [InternetConnectionSharing(ICS)] service, and then select the [Properties] option. 5. In the properties window that opens, change [Open with] to [Disabled], click [Apply] and then click [OK]. 6. Click the start logo, then click the shutdown button, select [Restart], and complete the computer restart.

Check out the steps to delete a logged-in device on Douyin Check out the steps to delete a logged-in device on Douyin Mar 26, 2024 am 09:01 AM

1. First, click to open the Douyin app and click [Me]. 2. Click the three-dot icon in the upper right corner. 3. Click to enter [Settings]. 4. Click to open [Account and Security]. 5. Select and click [Log in to device management]. 6. Finally, click to select the device and click [Remove].

Learn how to handle special characters and convert single quotes in PHP Learn how to handle special characters and convert single quotes in PHP Mar 27, 2024 pm 12:39 PM

In the process of PHP development, dealing with special characters is a common problem, especially in string processing, special characters are often escaped. Among them, converting special characters into single quotes is a relatively common requirement, because in PHP, single quotes are a common way to wrap strings. In this article, we will explain how to handle special character conversion single quotes in PHP and provide specific code examples. In PHP, special characters include but are not limited to single quotes ('), double quotes ("), backslash (), etc. In strings

Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music Mar 25, 2024 am 11:40 AM

1. After turning on the phone, select NetEase Cloud Music. 2. After entering the homepage, you can see the [Ranking List] and click to enter. 3. In the ranking list, you can select any list and click [New Song List]. 4. Select your favorite song and click on it. 5. Return to the previous page to see more lists.

How to view the hot list of Kuaishou Live Companion videos How to view the hot list of Kuaishou Live Companion videos Mar 29, 2024 pm 08:09 PM

Kuaishou Live Companion is not only a powerful live broadcast auxiliary tool, but also a real-time insight platform for hot topics and trends created for broadcasters. Through this function, anchors can quickly capture the content that audiences are most concerned about, and then adjust the live content to make it more in line with the audience's tastes and interests. So how to check the hot video list in the Kuaishou Live Companion app? This tutorial guide will provide you with a detailed introduction to the steps. I hope it can help you. How to view the hot video list on Kuaishou Live Companion? The second step is to click on the daily video hot list. The third step is to check the daily video hot list.

How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu Mar 22, 2024 am 08:21 AM

As a trading platform, Xianyu requires you to register and log in to your account before using it. Users can set an ID name for their account. What if they want to check what their ID is? Let’s find out together below! Introduction to how to view personal nicknames on Xianyu. First, start the Xianyu app. After entering the homepage, switch to the page of selling idle, messages, and me, and click the [My] option in the lower right corner. 2. Then on my page we need to click [Avatar] in the upper left corner; 2. Then when we go to the personal homepage page we can see different information, we need to click the [Edit Information] button here; 4. Finally click We can see it later on the page where we edit information;

How to check how many groups you have joined on WeChat: a simple step How to check how many groups you have joined on WeChat: a simple step Mar 26, 2024 am 10:06 AM

Regardless of life or work, many people have long been deeply tied to WeChat and will be pulled into various groups at any time. So how many WeChat groups have you joined? You may immediately want to view the group chats in your address book, but only the WeChat groups you have saved in your address book will appear there, and other groups will not be visible. If you want to see all the WeChat groups you have joined, it is very simple: enter your nickname in the search box on the WeChat homepage, then find the group chat section in the search results, and click &quot;More Group Chats&quot; to view all related group chat information. Anyway, I was shocked. There were more than a hundred of them, and the scroll bar on the right became very small. Unfortunately, there is no specific number statistics... This method is also applicable to checking the QQ groups you have joined. PS: Some netizens also provided a trick:

How do I check which groups I have joined? How do I check which groups I have joined? Apr 01, 2024 pm 05:34 PM

WeChat group chat is not only a simple chat platform, but also a communication circle that brings together elites and enthusiastic friends from all walks of life. So today I will teach you how to see how many groups you have added on WeChat and how to save group chats. Usually Users who use WeChat must not miss it. How to check how many groups you have added to WeChat and how to save group chats To check how many groups you have added to WeChat: 1. You can view your group chat window in the WeChat main interface 2. If you have already saved the group chat, you can tap [ Address Book] - [Group Chat] 3. After entering the group chat, you can view the saved group. Save the WeChat group: 1. Select the group you want to save, top right [...] 2. Open in the chat message [Save to address book] 3. On the main WeChat interface, tap [Address Book]-[Group Chat] to view

See all articles