-1

I'm trying to set up a script to run on Quora, but it's running on every other site instead.
I have the @include directive in the metadata block, and under script settings/include, it's set to include *, and I can't see any way to remove that.

Here's a thread about the same issue I'm having, but there's no @exclude directive to remove (although I did try putting @exclude * before the @include, but that didn't fix anything). I also checked my formatting against the answer here and I don't see any typos.

Here's my metadata block.

// ==UserScript==
// @name        Quora fixer
// @namespace   quora
// @include     https://www.quora.com/*
// @version     1
// @grant       none
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @description prevents links from opening in a new tab
// @run-at      document-idle
// ==UserScript==
Community
  • 1
  • 1
zzxjoanw
  • 374
  • 4
  • 16

1 Answers1

1

First, see and follow My very simple Greasemonkey script is not running?.
If the script is running on every other page, and there are no Quora-specific @excludes, then the script most-likely is running on Quora -- just not doing what you expect.

Other issues or actions:

  1. You are using @grant none and @require-ing jQuery. This leads to conflicts and javascript crashes on sites like Quora. Use @grant GM_addStyle.

  2. If the Script Settings tab (not to be confused with the User Settings tab) shows differently than the actual script source, then either you are not looking at the same file Greasemonkey is, or Greasemonkey and/or Firefox has become corrupted/confused. In that case:

    1. Uninstall the Greasemonkey script.
    2. Completely clear the browser cache.
    3. Shutdown Firefox completely. Use Task Manager, or equivalent, to verify that there is no Firefox thread/task/process in memory.
    4. Go to your Firefox profile folder.
    5. Enter the gm_scripts folder therein.
    6. If there are any subfolders left over from the script you just uninstalled, delete them. In your case, the folders should have names similar to Quora_fixer.
    7. Restart Firefox.
    8. Make sure the script is not listed.
    9. Install the Greasemonkey script afresh.
    10. If it still doesn't work, create a new Firefox profile or try a different computer altogether.
  3. Once the script fires on Quora and no relevant errors show on Firefox's Browser Console (see the first link above), then if the script still does not do what you expect, you may need to apply AJAX-aware techniques.

Community
  • 1
  • 1
Brock Adams
  • 90,639
  • 22
  • 233
  • 295