1225 条记录
52 私有链接
52 私有链接
内容主要介绍了一个油猴脚本,用于解除OAI(OpenAI)的降智限制。脚本通过模拟移动设备的用户代理(User-Agent)来实现这一功能。用户反馈显示,该脚本在某些情况下有效,但在某些账号(如Plus号)上可能仍会被标记为降智。总体来说,脚本提供了一种简单的方法来尝试绕过降智限制。
// ==UserScript==
// @name OAI降智解除
// @namespace http://tampermonkey.net/
// @version 1.0
// @description 通过模拟移动设备的方式,解除OAI降智限制
// @author zgccrui
// @match https://chatgpt.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// 定义移动设备的User-Agent字符串(以iPhone为例)
const mobileUA = "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) " +
"AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1";
// 覆盖 navigator.userAgent
Object.defineProperty(navigator, 'userAgent', {
get: function () { return mobileUA; },
configurable: false
});
// 覆盖 navigator.platform
Object.defineProperty(navigator, 'platform', {
get: function () { return 'iPhone'; },
configurable: false
});
// 覆盖 window.screen properties
Object.defineProperty(window.screen, 'width', {
get: function () { return 375; },
configurable: false
});
Object.defineProperty(window.screen, 'height', {
get: function () { return 812; },
configurable: false
});
Object.defineProperty(window.screen, 'availWidth', {
get: function () { return 375; },
configurable: false
});
Object.defineProperty(window.screen, 'availHeight', {
get: function () { return 812; },
configurable: false
});
// 覆盖 window.innerWidth 和 window.innerHeight
Object.defineProperty(window, 'innerWidth', {
get: function () { return 375; },
configurable: false
});
Object.defineProperty(window, 'innerHeight', {
get: function () { return 812; },
configurable: false
});
// 覆盖 window.outerWidth 和 window.outerHeight
Object.defineProperty(window, 'outerWidth', {
get: function () { return 375; },
configurable: false
});
Object.defineProperty(window, 'outerHeight', {
get: function () { return 812; },
configurable: false
});
// 覆盖 devicePixelRatio
Object.defineProperty(window, 'devicePixelRatio', {
get: function () { return 3; }, // 根据需要调整,例如iPhone 12 Pro的 devicePixelRatio
configurable: false
});
// 覆盖 touch 事件支持
window.ontouchstart = function() {};
// 模拟触摸事件
Object.defineProperty(navigator, 'maxTouchPoints', {
get: function () { return 1; },
configurable: false
});
// 覆盖 window.matchMedia 以支持移动设备的媒体查询
const originalMatchMedia = window.matchMedia;
window.matchMedia = function(query) {
const mql = originalMatchMedia.call(this, query);
if (query.includes('(pointer: coarse)')) {
return {
matches: true,
media: query,
onchange: null,
addListener: function() {},
removeListener: function() {},
addEventListener: function() {},
removeEventListener: function() {},
dispatchEvent: function() { return false; }
};
}
return mql;
};
// 触发 resize 和 orientationchange 事件以确保页面适应新尺寸
window.dispatchEvent(new Event('resize'));
window.dispatchEvent(new Event('orientationchange'));
})();