Ticket #174 (new defect)

Opened 2 months ago

Last modified 2 months ago

User Script commands persist after navigating away from page

Reported by: noah.easter..@gmail.com Assigned to:
Priority: minor Milestone:
Version: 0.8.20080609.0 Keywords: GM_registerMenuCommand
Cc:

Description

When I create a User Script Command in a user script, and then navigate away from the page that created it (but stay in that tab), the user script command persists in the page menu until the tab is closed or reloaded.

A demonstration script:

  // ==UserScript==
  // @name        BugDemo__GM_registerMenuCommand
  // @namespace   bugdemos
  // @description Demonstrates a bug with user script commands
  // @include     *
  // @exclude     http://www.yahoo.com*
  // ==/UserScript==

  const loc = window.location;
  GM_registerMenuCommand(loc, function(){GM_log("callback defined for
"+loc)});

This adds a different user script command after every page visit (except when visiting yahoo pages) but the commands are all visible and available on every page (including yahoo pages) until the tab is either closed or reloaded.

I could see how this could be construed as useful, but to me it's counterintuitive. I expected the user script commands created for a page to be removed once I navigated away from the page.

Attachments

Change History

09/24/08 15:40:04 changed by noah.easter..@gmail.com

For example, if you visit in order:

  • http://www.google.com/search?q=frog
  • http://www.google.com/search?q=toad
  • http://www.yahoo.com/

on the last page you'll see listed (under Tools->Greasemonkey->User Script Commands...) commands called "...?q=frog" and "...?q=toad".

09/24/08 15:40:41 changed by anonymous


Add/Change #174 (User Script commands persist after navigating away from page)