Skip to content

[BUG] popup当前页运行脚本展示的并不是实际运行的脚本 #1687

Description

@WzLYVg387U

提交前检查

  • 我已经搜索过现有 issues,并尽量用最新 stable 或 beta 版本确认问题仍然存在

问题描述

我有几个

@match http*://*/*

的脚本,在当前页为比如其他扩展页、chrome://* 浏览器内部页等脚本猫根本无法触及的页面时,点击popup会发现这几个脚本会显示在【当前页运行脚本】区域
而当为脚本添加一行

// @exclude      <target url pattern>

时,它们就不会在被指定排除的这个页面显示了
看起来似乎这个显示逻辑只按pattern进行了匹配和筛选,而非显示出实际真正在当前页运行的脚本

复现步骤

// ==UserScript==
// @name         test
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Capture specific hotkeys and prevent their default behavior
// @author       Your Name
// @match        chrome://settings/*
// @exclude      chrome://flags/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';
})();

以上脚本会在chrome://flags/*页显示为正在运行,而在chrome://flags/*不显示,但实际上它根本无法在以上两个页面运行,所以理应都不显示

ScriptCat 版本

v1.5.0-beta.2

系统 / 浏览器及版本

Chrome Version 148.0.7778.167 (Official Build) (64-bit)

相关脚本 / 日志 / 截图

Image

Activity

  1. added theissue type on Aug 23, 2026
  2. WzLYVg387U commented on Aug 23, 2026

    @WzLYVg387U
    Author

    发现一个新问题:popup【当前页运行脚本】只显示最顶层页面运行的脚本,在iframe里运行的不会包含在内

  3. CodFrm commented on Aug 24, 2026

    @CodFrm
    Member

    我优化一下这个交互,可以在脚本猫根本无法触及的页面上换一种展示方式

    发现一个新问题:popup【当前页运行脚本】只显示最顶层页面运行的脚本,在iframe里运行的不会包含在内

    已复现

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

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions