Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
AdBlock Classic
Posted by: RJJIII
Date: February 26, 2022 09:23PM

There are 2 solid options for blocking ads on the current version of K-Meleon (76.X) and I've made packages for both. (If you're using an older, official build of K-Meleon just find a version of AdBlock Plus.) AdBlock Locus provides a button and menus for K-Meleon's built-in adblocker (BAcool smiley plugin. The BAB is included with version 76 and it's what creates that popup message on new installs and new profiles. AdBlock Classic is slightly heavier but more powerful in several ways.

AdBlock Classic contains code from the AdBlock Plus family of extensions, so it can use AdBlock Plus rules and subscriptions. I've removed all branding to distribute it as open-source software under the MPL 2.0. If you use AdBlock Classic, do not use AdBlock Plus, AdBlock Lattitude, or ABPrime. The extensions are too similar to use more than one at a time. You can download AdBlock Classic on the page below:

Get AdBlock Classic

To install it:
  1. Click the Install AdBlock Classic button.
  2. Click Install Now when prompted.
  3. Restart K-Meleon.

Upgrading:
If you have AdBlock Classic 1 or ABPrime installed, disable them from about:addons to continue using their settings.

Setting up subscriptions:
Subscriptions are simply lists of blocking rules that are updated periodically. Most versions of K-Meleon will already come with some blocking rules for AdBlock Plus. Until you set up subscriptions, K-Meleon will use those default rules. I would recommend you choose a single base list and then add as few supplemental lists as you can. You have three options for a base list:

  • EasyList. This is the default list of blocking rules for AdBlock Plus, Adblock, and uBlock Origin.
  • AdBlock Locus: Core. This is an optimized version of EasyList that I maintain for K-Meleon's built-in adblock. If your browser is starting up too slowly you can try this instead of EasyList. DO NOT USE both at one time.
  • Blockzilla. If your profile already contains blocking rules then Blockzilla is your base list. Blockzilla uses generic blocking rules. The benefit is that AdBlock Classic can more quickly load the rules and start K-Meleon. The downside is that it will miss more ads and create more errors.

You may notice that there are many more subscriptions available in the menu. Many of these are language packs that add additional coverage for a specific language. There is a language pack for each language supported by K-Meleon's localization. Subscriptions that target your current language will appear in bold text. The other supplemental subscriptions provide specific functions like blocking cookie warnings or improving privacy online. The extension builds on hermes' excellent work in porting ABPrime. And as such will only update a subscription when the user chooses the Update Filers option; it does not download subscriptions until you tell it to do so.

K-Meleon 74:
If you are using the unofficial K-Meleon 74 on Goanna for Windows 2000, AdBlock Classic will install but it will not create any GUI. Download the helper macro "AdBlockClassic_Menu.kmm" to create a Tools > AdBlock Classic menu option. Save this K-Meleon macro module (.kmm) file to your K-Meleon/macros/ or Profiles/your.profile/macros/ folder.

Updated on 6/22/2022:
Update: Version 2.1.0 includes improved icons, localization, a couple of bug fixes, a new subscription option, built-in help, and KM74 support.



Edited 4 time(s). Last edit at 06/23/2022 04:18AM by RJJIII.

Options: ReplyQuote
Re: AdBlock Classic
Posted by: J.G.
Date: March 01, 2022 09:00PM

@RJJIII thanks! smiling smiley

Options: ReplyQuote
Re: AdBlock Classic
Posted by: RJJIII
Date: March 05, 2022 04:20AM

You're quite welcome. But the bigger thanks to hermes for the legwork in porting things over.


Also, for anyone that's more skilled in coding than me: it should be fairly easy to add options to allow the current page or allow the current domain. There's already a XUL-option to whitelist pages live with this.pageWhitelist and this.siteWhitelist in appintegration.jsm. This works in New Moon and the same syntax works when used manually in K-Meleon. (@@|exact-url-here|$document)

I see 2 ways to included this in ABC. One, JSbridge could set those into K-Meleon's right-click menu for a page. Two, maybe they could be launched from a small xul window. I may come back this at some point.

Options: ReplyQuote
Re: AdBlock Classic
Posted by: RJJIII
Date: March 29, 2022 04:20PM

I'll edit the first post when I've had more time to test this, but I wanted to go ahead and share it. I've moved everything into the XPI file so that the extension can be managed just like a Firefox extension. This new version can be installed with just drag-and-drop or clicking a link. It can be updated, disabled, exported, and un-installed from the about:addons page. Rather than a separate toolbar, it adds a button to the main toolbar beside favorites and settings.

Edit: see next post for download link

My to-do list or roadmap going forward here is to:
- Create a replacement package to clear out old installations without deleting any settings.
- Code in better support for localization.
- Add Spanish and Russian language support.
- Add a simple menu + accelerator for K-Meleon 74.
- Test and update subscriptions.
- Maybe one day: allow page button, allow domain button, live-blocking, element hiding integration
Edit: updated above list with strikethroughs



Edited 1 time(s). Last edit at 04/17/2022 05:22AM by RJJIII.

Options: ReplyQuote
Re: AdBlock Classic
Posted by: RJJIII
Date: April 17, 2022 05:16AM

AdBlock Classic 2 is now available:

Get AdBlock Classic.

Changes from the AdBlock Classic 1.X to 2.0.4:
  • * Single .xpi file that is easy to install and easy to carry over during upgrades.
  • + Out of the box support for blocklist language packs for each language supported by K-Meleon.
  • + At least partial localization for every language supported by K-Meleon.
  • + Fixed checksum bug present even in current version of ABPrime.
  • + Menu control options under Tools.

If you have an older version of AdBlock Classic or ABPrime, disable them before using AdBlock Classic 2.X. If you leave these installed but disabled, AdBlock Classic 2 should be able to use all of your current settings. You can also use the Scrubber Package below to clear out an old install of ABPrime without touching the settings:

https://sourceforge.net/projects/adblock-classic/files/Scrubber/Scrub_AdBlock_Classic_kmext_pkg.7z/download

Options: ReplyQuote
Update: AdBlock Classic
Posted by: RJJIII
Date: June 23, 2022 04:18AM

I've updated the first post with new version of AdBlock Classic.

Changes and new features in version 2.1.0:
* Improved button to account for high resolution displays and color blindness.
* Fixed small bug present even in the current version of ABPrime.
* Finished localization using kml names for non-Latin characters.
+ AdBlock Classic runs on Goanna-based K-Meleon 74 for Windows 2000 and below.
+ The lightweight subscription from AdBlock Locus is now an option.
+ Built in help/about pages for a proper manual instead of the previous alert box.


Roadmap + ToDo:
- Add ability to place the icon in any toolbar.
- Allow options like AdBlock Plus. You can allow all on a page or site using custom rules, but I may create a menu option.

Download version 2.1:
https://github.com/rjjiii/AdBlock-Classic/releases/tag/v2.1.0

If you're using K-Meleon 74 you'll also want this additional macro to create a menu under "Tools" in the menu bar:
https://rjjiii.github.io/K-Meleon/AdBlockClassic/AdBlockClassic_Menu.kmm

And finally if you like the super-small blockzilla rules, I uploaded a mirror of that subscription's final release. You can change https://raw.githubusercontent.com/zpacman/Blockzilla/master/Blockzilla.txt in patterns.ini to https://raw.githubusercontent.com/rjjiii/AdBlock-Locus/main/blockzilla.txt to download a newer set of blocking rules.

Options: ReplyQuote
Re: Update: AdBlock Classic
Posted by: rodocop
Date: January 28, 2023 11:40PM

Dear RJJIII!

First of all you made a great stuff again!

And sorry but I found some glitch there. I can't 'reset hit statistics' as it resurrects on restart. I found that while the file
KMfolder\Profiles\profilealphanumeric.default\adblockplus\elemhide.css
updates in realtime, the other one
KMfolder\Profiles\profilealphanumeric.default\adblockplus\patterns.ini
- doesn't.

Can't you check this, please?

Options: ReplyQuote
Re: Update: AdBlock Classic
Posted by: WasiFH
Date: February 24, 2023 03:42AM

Live Block working?

Options: ReplyQuote
Re: Update: AdBlock Classic
Posted by: RJJIII
Date: February 24, 2023 08:14PM

Regarding Rodocop's post: I somehow missed this initially. Next week, I should be able to take some time and figure out why this happens.

Regarding Live Block: I believe you mean the ability to see and block active scripts on a page? AdBlock Plus for Firefox, ABPrime, old AdBlock Plus for KM, and naruman's AdBlock Plus for v. 75 all have this feature. I think it's possible to add this to AdBlock Classic but have not really experimented with porting it. If anyone else gets it working, I'm happy to merge that in.

Options: ReplyQuote
Re: AdBlock Classic
Posted by: hexagonwin
Date: April 01, 2023 01:58PM

Thanks a lot, with this installed with EasyList I don't see ads anymore.

BTW, did anyone get uBlock Origin working? I wanted to have a button for the ad blocker in the toolbar and AdBlock Classic doesn't seem to do this, and uBO(1) doesn't work.

(1) : https://github.com/gorhill/uBlock-for-firefox-legacy/

Options: ReplyQuote


K-Meleon forum is powered by Phorum.