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

للحاسوب

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị 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

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

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

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Tác giả
ghita katrina
Phiên bản
0.0.1.20260618185650
Đã tạo
18-06-2026
Đã cập nhật
18-06-2026
Kích thước
1 KB
Giấy phép
N/A

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