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

للحاسوب

Questo script non dovrebbe essere installato direttamente. È una libreria per altri script da includere con la chiave // @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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
ghita katrina
Versione
0.0.1.20260618185650
Creato il
18/06/2026
Aggiornato il
18/06/2026
Dimensione
1,2 KB
Licenza
Non disponibile

// ==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;
})();