Skip to content

KeepChatGPT无法正常运行 #189

Closed

Description

@JadynWong

安装KeepChatGPT无法正常运行

检查异常发现 执行setInterval, fetch都会报此错误终止Uncaught TypeError: Illegal invocation.

image

手动编辑脚本, 改为unsafeWindow.setInterval, unsafeWindow.fetch可以正常运行.

使用Tampermonkey不进行任何运行更改, 运行正常.

Activity

  1. CodFrm commented on May 17, 2023

    @CodFrm
    Member

    这也许和我的沙盒实现有关系,在一些特定的网站上会出现这个问题,我编写了一个简单的脚本,在chatgpt上无法运行,但是在其它网站上可以运行。应该是chatgpt网站对这些方法进行了处理,导致了上下文丢失而产生这个问题。我会尝试在今天解决这个问题

    // ==UserScript==
    // @name         New Userscript
    // @namespace    https://bbs.tampermonkey.net.cn/
    // @version      0.1.0
    // @description  try to take over the world!
    // @author       You
    // @match        https://chat.openai.com/?model=gpt-4
    // @grant        unsafeWindow
    // ==/UserScript==
    
    (function () {
        'use strict';
        setInterval(() => {
            console.log('123');
        }, 1000);
        // Your code here...
    })();

    临时解决方案:

    // ==UserScript==
    // @name         New Userscript
    // @namespace    https://bbs.tampermonkey.net.cn/
    // @version      0.1.0
    // @description  try to take over the world!
    // @author       You
    // @match        https://chat.openai.com/?model=gpt-4
    // @grant        unsafeWindow
    // ==/UserScript==
    
    const setInterval = unsafeWindow.setInterval;
    
    (function () {
        'use strict';
        setInterval(() => {
            console.log('123');
        }, 1000);
        // Your code here...
    })();
  2. added
    compatibility其它管理器可以运行,脚本猫不能运行
    and removed
    bugSomething isn't working
    on May 17, 2023
  3. added a commit that references this issue on May 17, 2023
  4. CodFrm commented on May 17, 2023

    @CodFrm
    Member

    修复

    哥哥试一下这个版本:https://github.com/scriptscat/scriptcat/actions/runs/5003742572

    近期准备把之前囤的issue都解决一下,然后再发下一个版本

  5. JadynWong commented on May 17, 2023

    @JadynWong
    Author

    感谢, 测试可用.

  6. CodFrm commented on May 17, 2023

    @CodFrm
    Member

    向着主流油猴扩展前进😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility其它管理器可以运行,脚本猫不能运行

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions