I'm having Trouble with the Scripts and Greasemonkey

User Help for Mozilla Firefox
Post Reply
DonaldCroyle12
Posts: 1
Joined: March 8th, 2019, 11:07 pm

I'm having Trouble with the Scripts and Greasemonkey

Post by DonaldCroyle12 »

I'm having Trouble with the Scripts and Greasemonkey
Everything looks like its in Order but nothing is Working.
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: I'm having Trouble with the Scripts and Greasemonkey

Post by DanRaisch »

What version of Firefox?
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: I'm having Trouble with the Scripts and Greasemonkey

Post by morat »

A csp problem?

You can disable csp temporarily for testing with the security.csp.enable preference.

Content Security Policy
http://en.wikipedia.org/wiki/Content_Security_Policy

Scripts will not run
http://github.com/greasemonkey/greasemonkey/issues/2046

Greasemonkey
http://addons.mozilla.org/firefox/addon/greasemonkey/

Try the Tampermonkey extension. It's working correctly in Firefox 65.

Example:

Code: Select all

// ==UserScript==
// @name         Test
// @match        http://*.mozillazine.org/*
// @grant        none
// ==/UserScript==

(function () {

  "use strict";

  var style = document.createElement("style");
  style.type = "text/css";
  style.textContent = [
    "* { background: #000000 !important; }",
    "* { color: #CCCCCC !important; }",
    "a { color: #FFCC66 !important; }",
    "a:link { color: #FFCC66 !important; }",
    "a:visited { color: #FFB720 !important; }",
    "a:hover { color: #FFFFCC !important; }",
    "a:active { color: #FFFFCC !important; }",
  ].join("\n");
  if (document.head) {
    document.head.appendChild(style);
  } else {
    document.documentElement.appendChild(style);
  }

})();
Test page
http://www.mozillazine.org/

Tampermonkey
http://addons.mozilla.org/firefox/addon/tampermonkey/
User avatar
jscher2000
Posts: 11762
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: I'm having Trouble with the Scripts and Greasemonkey

Post by jscher2000 »

In the legacy version of Greasemonkey, it was possible to totally disable the extension and all scripts by clicking the monkey button on the toolbar. Not sure if there is anything similar to that in the WebExtensions version.
Post Reply