من حاسوب الى هاتف

للحاسوب

Ten skrypt nie powinien być instalowany bezpośrednio. Jest to biblioteka dla innych skyptów do włączenia dyrektywą meta // @require https://update.greasyfork.org/scripts/583351/1857923/%D9%85%D9%86%20%D8%AD%D8%A7%D8%B3%D9%88%D8%A8%20%D8%A7%D9%84%D9%89%20%D9%87%D8%A7%D8%AA%D9%81.js

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Autor
ghita katrina
Wersja
0.0.1.20260618185650
Utworzono
18-06-2026
Zaktualizowano
18-06-2026
Rozmiar
1,2 KB
Licencja
Brak licencji

// ==UserScript==
// @name Force Mobile View
// @namespace http://tampermonkey.net/
// @version 1.0
// @description تصفح المواقع بنسخة الهاتف وتفعيل ميزات اللمس
// @author Yassir
// @match *://*/*
// @grant none
// @run-at document-start
// ==/Class==

(function() {
'use strict';

// 1. تغيير الـ User-Agent لتبدو وكأنك تستخدم هاتف آيفون أو أندرويد
const mobileUA = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1";

Object.defineProperty(navigator, 'userAgent', {
get: function () { return mobileUA; }
});

// 2. تفعيل ميزات اللمس (Touch Events) التي تحتاجها ميزات الهاتف في المواقع
if ('maxTouchPoints' in navigator) {
Object.defineProperty(navigator, 'maxTouchPoints', { get: () => 5 });
}
if ('msMaxTouchPoints' in navigator) {
Object.defineProperty(navigator, 'msMaxTouchPoints', { get: () => 5 });
}

// 3. محاكاة دعم اللمس في المستند
window.Ontouchstart = true;
})();