All posts by James

FAQ: Can I block pages on the basis of the referring site?

Yes. The referrer prefix (>) can be used to block pages referred from a site.

For example, >somesite.com will block all pages where the referrer is somesite.com (i.e., if you click on a link on somesite.com then the linked page will be blocked).

Note that sometimes the URL of the referrer is not passed to the linked page, in which case LeechBlock will not detect it. In other words, do not expect this feature to work 100% of the time!

FAQ: How can I make it harder to remove the extension from Chrome?

In general, a Chrome extension cannot prevent the user from uninstalling it, so LeechBlock cannot offer this as an option within the extension itself.

However, it is possible to “force install” a Chrome extension by setting a Chrome Enterprise policy so that the option to remove the extension is disabled. (You should create a backup of your LeechBlock settings before you attempt this solution: Options > General > Export.)

On Windows, the policy can be set via the Registry Editor:

  • Navigate to the following registry key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
  • Add a new subkey (if it doesn’t already exist):
    • ExtensionInstallForcelist
  • Add a new value to that subkey:
    • Name: 1 (or some higher number if 1 is already used)
    • Type: String (REG_SZ)
    • Data: blaaajhemilngeeffpbfkdjjoefldkok;https://clients2.google.com/service/update2/crx

Warning: Do not attempt to edit the registry unless you really know what you’re doing! You should back up your registry before making any changes. The developer of LeechBlock will not be held responsible for any damage you do to your system by editing the registry.

For information on setting Chrome extension policies on Mac systems, see this article.

For information on setting Chrome extension policies on Linux systems, see this article.

FAQ: How can I disable the “Remove Extension” menu item on Firefox?

You can use the userChrome browser customization file to remove the “Remove Extension” menu item from the Firefox toolbar. Carefully follow these steps:

  • Locate your Firefox profile folder.
  • Create a new folder chrome inside your profile folder (if it doesn’t already exist).
  • Create a new file userChrome.css inside that folder with the following content: [label^='Remove Extension'] { display: none !important; }

You will need to close all Firefox windows and restart Firefox for it to take effect.

Note: If you’re using Firefox 69 or above, you’ll also need to go to about:config and ensure the toolkit.legacyUserProfileCustomizations.stylesheets preference is set to true (go here for more detailed instructions).

FAQ: LeechBlock seems to be slowing down my browser. What gives?

First of all, please check that it really is LeechBlock that’s slowing down your browser! Disable the extension and see whether the problem disappears. If your browser is still sluggish, LeechBlock isn’t to blame.

Second, make sure you have the latest version of LeechBlock installed, because version 0.9.11 introduced some major performance improvements.

If you have a large number of tabs open in your browser, LeechBlock can sometimes slow things down. (It depends on the specifics of your system.) Under normal operation, LeechBlock reviews all open tabs every second, to keep track of how much time is spent on the sites listed in your block sets and to determine whether any sites should now be blocked. If you have many tabs open, either (1) reduce the number of open tabs or (2) select the option Process only active tabs (under General tab in Options).

If you think LeechBlock is slowing down your browser even though you don’t have a large number of tabs open, please contact support.

FAQ: Why does LeechBlock require the permissions it asks for?

LeechBlock requires the following browser permissions to be granted by the user at installation:

  1. Access browser tabs
  2. Access browser activity during navigation
  3. Access your data for all websites
  4. Download files and read and modify the browser’s download history

The first three of these are required so that LeechBlock can check the URL of each page the browser tries to access (in any tab, not just the active tab) to see whether it should be blocked according to the user’s settings. If the user wants to block pages containing specific words or phrases, LeechBlock also needs to access the content of those pages (not just the URL).

The fourth is used only for the Export Options to File feature (see under General tab in Options). The file is saved using the browser’s download manager.

If the user enters a URL in the Load list of sites from URL field, LeechBlock will ask for additional permission to access external URLs. Most users will not use this feature.

LeechBlock does not send any information to external sites. (This can be confirmed by examining the source code.) All user settings and data are stored locally on the user’s computer (unless the user has chosen to use sync storage; see under General tab in Options). Uninstalling LeechBlock will remove all user settings and data.

FAQ: What does the “Offset time limit period” field do?

By default, the start of any time limit period (i.e., the period within which a time limit applies) will be aligned with midnight (12am) on Sunday. For example:

  • If you set a time limit of 10 minutes in every 6 hours, you will be allowed
    • 10 minutes between 12am and 6am
    • 10 minutes between 6am and 12pm
    • 10 minutes between 12pm and 6pm
    • 10 minutes between 6pm and 12am
  • If you set a time limit of 30 minutes in every 12 hours, you will be allowed
    • 30 minutes between 12am and 12pm
    • 30 minutes between 12pm and 12am
  • If you set a time limit of 60 minutes in every week, you will be allowed
    • 60 minutes between 12am on Sunday and 12am the following Sunday

The Offset time limit period field allows you to adjust this default behavior to suit your own schedule by specifying an offset (positive or negative) in hours. For example:

  • If you specify an offset of 6 hours, the time limit periods will be aligned with 6am on Sunday.
  • If you specify an offset of -3 hours, the time limit periods will be aligned with 9pm on Saturday.
  • If you specify an offset of 24 hours, the time limit periods will be aligned with midnight (12am) on Monday.
  • If you specify an offset of -36 hours, the time limit periods will be aligned with noon (12pm) on Friday.

If in doubt, just leave the offset field blank!

FAQ: How can I hide LeechBlock in Firefox’s Add-ons Manager?

The legacy version of LeechBlock included an option to hide the LeechBlock extension in Firefox’s Add-ons Manager, preventing users from easily disabling or uninstalling it. It’s no longer possible to provide this option due to restrictions on extensions that were introduced in Firefox 57.

However, there is another way to hide LeechBlock in the Add-ons Manager. Carefully follow these steps:

  • Locate your Firefox profile folder.
  • Create a new folder chrome inside your profile folder (if it doesn’t already exist).
  • Create a new file userContent.css inside that folder with the following content: [addon-id='leechblockng@proginosko.com'] { display: none !important; }

You will need to close all Firefox windows and restart Firefox for it to take effect.

Note: If you’re using Firefox 69 or above, you’ll also need to go to about:config and ensure the toolkit.legacyUserProfileCustomizations.stylesheets preference is set to true (go here for more detailed instructions).

FAQ: How can I disable safe mode on Firefox?

Completely disabling safe mode on Firefox is far from easy. You basically have to hack your Firefox installation, which requires a significant level of technical know-how. However, there are two relatively easy steps you can take to make it more difficult to start Firefox in safe mode.

Remove the Help Menu Item

You can use the userChrome browser customization file to remove the “Restart with Add-ons Disabled” menu item from the Help menus. Carefully follow these steps:

  • Locate your Firefox profile folder.
  • Create a new folder chrome inside your profile folder (if it doesn’t already exist).
  • Create a new file userChrome.css inside that folder with the following content: [label^='Restart with Add-ons Disabled'] { display: none !important; }

You will need to close all Firefox windows and restart Firefox for it to take effect.

Note: If you’re using Firefox 69 or above, you’ll also need to go to about:config and ensure the toolkit.legacyUserProfileCustomizations.stylesheets preference is set to true (go here for more detailed instructions).

(Credit to Metaception for suggesting this solution.)

If you also want to remove the button from the about:support and about:profiles pages, create another file userContent.css inside the same folder with the following content:

#safe-mode-box { display: none !important; }
#restart-in-safe-mode-button { display: none !important; }

If you also want to remove the “Create a New Profile” button from the about:profiles page, add the following line to userContent.css:

#create-button { display: none !important; }

Disable the Safe Mode Key

You can set the environment variable MOZ_DISABLE_SAFE_MODE_KEY (to any value) to prevent starting Firefox in safe mode by holding down the SHIFT key.

If you’re not sure how to set an environment variable, you can find guidance here.