Disables pull to refresh
目前為
// ==UserScript==
// @name Disable pull to refresh
// @namespace disablepullrefresh
// @match *
// @grant none
// @version 1.5
// @run-at document-end
// @author ab498
// @description Disables pull to refresh
// ==/UserScript==
document.addEventListener('touchmove', function(event) {
// Check if the user is at the top of the page
if (window.pageYOffset === 0) {
// Prevent the default action (e.g., pull-to-refresh)
event.preventDefault();
}
}, { passive: false });