We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Овај сајт ће имати ограничену функционалност док га будемо ажурирали у циљу побољшања вашег искуства. Ако неки чланак не реши ваш проблем и желите да поставите питање, на располагању ће вам бити наше заједнице подршке @FirefoxSupport на Twitter-у и /r/firefox на Reddit-у.

Претражи подршку

Избегните преваре подршке. Никада од вас нећемо тражити да зовете или шаљете поруке на број или да делите личне податке. Пријавите сумњиве радње преко „Пријавите злоупотребу” опције.

Сазнај више

Firefox 31 should run Greasemonkey scripts on POST pages

  • 4 одговорa
  • 19 има овај проблем
  • 1 преглед
  • Последњи одговор послао Markus Keller

more options

The Firefox 31 update has broken some Greasemonkey 2.1 functionality. Greasemonkey scripts are not run anymore on pages that are shown as response to a POST event. Works fine again when I revert to Firefox 30.

Steps: - Install https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ - Install https://www.eclipse.org/jdt/ui/scripts/jdtbugzilla.user.js - Go to https://bugs.eclipse.org/bugs/query.cgi?format=advanced

   => page is correctly tweaked (e.g. "eclipse bugs" header image removed)

- Select some filters (e.g. Target Milestone 4.5 M1) and click Search

   => result list is not tweaked (e.g. bug summaries are underlined)

The first action in the script is the following, which isn't executed on the POST page: console.log("Running jdtbugzilla.user.js on " + window.location);

Filed https://github.com/greasemonkey/greasemonkey/issues/1977 for this, but the bug could just as well be in Firefox. Maybe same issue as https://support.mozilla.org/en-US/questions/1012688

The Firefox 31 update has broken some Greasemonkey 2.1 functionality. Greasemonkey scripts are not run anymore on pages that are shown as response to a POST event. Works fine again when I revert to Firefox 30. Steps: - Install https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ - Install https://www.eclipse.org/jdt/ui/scripts/jdtbugzilla.user.js - Go to https://bugs.eclipse.org/bugs/query.cgi?format=advanced => page is correctly tweaked (e.g. "eclipse bugs" header image removed) - Select some filters (e.g. Target Milestone 4.5 M1) and click Search => result list is not tweaked (e.g. bug summaries are underlined) The first action in the script is the following, which isn't executed on the POST page: console.log("Running jdtbugzilla.user.js on " + window.location); Filed https://github.com/greasemonkey/greasemonkey/issues/1977 for this, but the bug could just as well be in Firefox. Maybe same issue as https://support.mozilla.org/en-US/questions/1012688

Изабрано решење

With the infos from https://github.com/greasemonkey/greasemonkey/issues/1970 , I could write this workaround script for FF 31: https://www.eclipse.org/jdt/ui/scripts/jdtbugzilla-start.user.js

This template could help others create a workaround for their broken pages:

// ==UserScript==
// @name        Remove history.replaceState from buglist.cgi
// @description Removes history.replaceState from buglist.cgi to work around https://github.com/greasemonkey/greasemonkey/issues/1970
// @include     https://your/page*

// @version 1
// @grant       none
// @run-at document-start
// ==/UserScript==
history.replaceState = function(data, title, url) {
	console.log("caught history.replaceState(" + data + ", " + title + ", " + url + ")");
};
Прочитајте овај одговор са објашњењем 👍 1

Сви одговори (4)

more options

I took a screenshot after installing on a windows 7 VM on the right. The left is view of the last page without Greasemonkey.

However the header is only removed on that first page. After searching the header came back.

I attached the errors from the Browser Console, if this is a Firefox issue we can file a bug in bugzilla, but this is not my technical expertise.

It also looks like the issue on github continued in this issue: https://github.com/greasemonkey/greas.../1970

more options

Одабрано решење

With the infos from https://github.com/greasemonkey/greasemonkey/issues/1970 , I could write this workaround script for FF 31: https://www.eclipse.org/jdt/ui/scripts/jdtbugzilla-start.user.js

This template could help others create a workaround for their broken pages:

// ==UserScript==
// @name        Remove history.replaceState from buglist.cgi
// @description Removes history.replaceState from buglist.cgi to work around https://github.com/greasemonkey/greasemonkey/issues/1970
// @include     https://your/page*

// @version 1
// @grant       none
// @run-at document-start
// ==/UserScript==
history.replaceState = function(data, title, url) {
	console.log("caught history.replaceState(" + data + ", " + title + ", " + url + ")");
};
more options

I cross referenced the post to the issue in github. Would this template replace the history record?

more options

> Would this template replace the history record?

No, it effectively disables the history.replaceState() function. The URL in the history will not be updated any more, but that's less of an issue for me than not having the script run at all.

Note that my script just works for pages like Bugzilla that use the replaceState() function. For other pages, you may have to replace the pushState() function.

In https://github.com/greasemonkey/greasemonkey/issues/1970#issuecomment-50781923 , the Greasemonkey developer identified where GM fails, so I eventually expect a real solution from him (or a bug report for Firefox if he can't cope with FF's changed behavior).