全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 893|回复: 4

[美国VPS] (搬运)免费无限制使用magai.co,支持gpt-4o等各大模型

[复制链接]
发表于 2024-7-23 20:02:27 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2024-7-23 20:04:01 | 显示全部楼层
能不能生成图片
 楼主| 发表于 2024-7-23 20:04:47 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2024-7-23 20:09:43 | 显示全部楼层
本帖最后由 oneLN 于 2024-7-23 20:26 编辑

哎呀呀。搞好了。但是呢。不能生图。
发表于 2024-7-23 20:29:20 | 显示全部楼层
  1. // ==UserScript==
  2. // [url=home.php?mod=space&uid=5839]@name[/url]         New Userscript
  3. // @namespace    http://tampermonkey.net/
  4. // @version      2024-07-23
  5. // @description  移除Magai.co上的模糊效果,隐藏特定元素,并启用文本输入
  6. // @author       Mahjongmaster88
  7. // @match        https://app.magai.co/*
  8. // @grant        none
  9. // ==/UserScript==

  10. (function() {
  11.     'use strict';

  12.     function removeElements() {
  13.         const selectors = [
  14.             '.column.flex.bubble-r-container.baTwaZp1.Group.bubble-element',
  15.             '.baTydaY.greyout',
  16.             '.baTwaQaG.greyout',
  17.             '.column.flex.bubble-r-container.baTwaQaG.CustomElement.bubble-element > .column.flex.bubble-r-container.baTwcaY.CustomElement.bubble-element',
  18.             '.column.flex.bubble-r-container.baTydaY.CustomElement.bubble-element > .column.flex.bubble-r-container.baTwcaY.CustomElement.bubble-element',
  19.             '.column.flex.bubble-r-container.baTydaY.CustomElement.bubble-element',
  20.             '.column.flex.bubble-r-container.baTwaQaG.CustomElement.bubble-element'
  21.         ];

  22.         selectors.forEach(selector => {
  23.             const elements = document.querySelectorAll(selector);
  24.             elements.forEach(element => {
  25.                 element.style.display = 'none';
  26.             });
  27.         });
  28.     }

  29.     // 移除模糊效果相关代码
  30.     const observer = new MutationObserver(mutations => {
  31.         mutations.forEach(mutation => {
  32.             if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
  33.                 const element = mutation.target;
  34.                 if (element.style.filter.includes('blur')) {
  35.                     console.log('移除模糊效果:', element);
  36.                     element.style.filter = 'none';
  37.                 }
  38.             }
  39.         });
  40.     });

  41.     const removeBlurEffect = () => {
  42.         document.querySelectorAll('*').forEach(element => {
  43.             const style = window.getComputedStyle(element);
  44.             if (style.filter.includes('blur')) {
  45.                 element.style.filter = 'none';
  46.             }

  47.             observer.observe(element, { attributes: true });
  48.         });

  49.         console.log('MutationObserver已启动。');
  50.     };

  51.     removeBlurEffect();

  52.     const bodyObserver = new MutationObserver(mutations => {
  53.         mutations.forEach(mutation => {
  54.             if (mutation.type === 'childList') {
  55.                 mutation.addedNodes.forEach(node => {
  56.                     if (node.nodeType === 1) { // ELEMENT_NODE
  57.                         const style = window.getComputedStyle(node);
  58.                         if (style.filter.includes('blur')) {
  59.                             node.style.filter = 'none';
  60.                         }

  61.                         observer.observe(node, { attributes: true });
  62.                     }
  63.                 });
  64.             }
  65.         });

  66.         // 每当添加新元素时执行removeElements函数
  67.         removeElements();

  68.         // 每当添加新元素时执行enableTextInput函数
  69.         enableTextInput();
  70.     });

  71.     bodyObserver.observe(document.body, { childList: true, subtree: true });

  72.     // 启用文本输入功能
  73.     function enableTextInput() {
  74.         const textarea = document.querySelector('textarea#prompt');
  75.         if (textarea && textarea.disabled) {
  76.             textarea.disabled = false;
  77.             console.log('文本输入已启用。');
  78.         }
  79.     }

  80.     // 初始执行
  81.     removeElements();
  82.     enableTextInput();
  83. })();
复制代码




上面那个前三排报错。我这直接用自带的替换了名字之类的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-9-22 09:47 , Processed in 0.064309 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表