Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
Pages: Previous123Next
Current Page: 2 of 3
Re: Basic adblock
Posted by: Slickone
Date: December 14, 2015 11:02AM

I've only added the Easylist+Easyprivacy sub, which I used with ABP for KM, and have for years with Firefox.

I have javascript enabled.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 14, 2015 08:28PM

Quote
Slickone
I've only added the Easylist+Easyprivacy sub, which I used with ABP for KM, and have for years with Firefox

I don't have Easylist+Easyprivacy sub. Is that something that you can turn off and try the site?

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 14, 2015 09:20PM

This version of basic adblock control, v 2.5, includes the new icons by rodocop and provisions for handling K-Meleon being in the offline mode. It also includes the warning and control to allow user to delay the data download at first use.

The subscription list is hard coded into the program. However, that is used only the first time the control is run, unless that pref is deleted.

Users can, at their own risk, make additions to the pref "kmeleon.plugins.adblock.subscriptions".

Attachments: adblock control 25.7z (6.4 KB)  
Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 15, 2015 09:56AM

Quote
JamesD
Quote
Slickone
I've only added the Easylist+Easyprivacy sub, which I used with ABP for KM, and have for years with Firefox

I don't have Easylist+Easyprivacy sub. Is that something that you can turn off and try the site?
It's in kmeleon.plugins.adblock.subscriptions, as described in the first post in this thread.
I'm confused. Are you not using a subscription? What good is the adblock without a filter subscription? And I don't understand what your saying about the sub being hard coded. Did I miss something? Sounds like conflicting info.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 15, 2015 10:32AM

My bad. I did not remember the names of the subscriptions.

When I said the subscriptions were hard coded into the macro, this is what I meant.
$_Adblockplugin_load = "https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt";;
$_Adblockplugin_load = $_Adblockplugin_load ."|". "https://secure.fanboy.co.nz/fanboy-social.txt"; ; 
setpref(STRING, "kmeleon.plugins.adblock.subscriptions", $_Adblockplugin_load ) ;
The subscriptions become the string in the pref. This code runs only one time unless the user deletes the pref or changes the data to have a length of less than 3.

I can see the TV listing in a different tab right now. My adblock is enabled. Some other factor must be involved, I think.

Options: ReplyQuote
Re: Basic adblock
Posted by: Dorian
Date: December 16, 2015 07:26AM

You should use the log to know what rule may remove the grid.
Enable the log, then load the page. Check the content of the log and post it here if not too big.


Whitelist can be added, by prefixing a rule with ## if I'm not wrong. But the plugin currently lack of a "user rules" file.

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 20, 2015 11:29PM

Is that with kmeleon.plugins.adblock.logging? I don't have that key so I created one, with boolean value set to true. Is that correct? I can't find a log anywhere. Where is it stored?

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 21, 2015 07:40AM

Quote
Slickone
I can't find a log anywhere. Where is it stored?
If logging is 'true' then the log is in 'adblock.log' within your profile.

Note that all of the controls and views of the logs, etc. are available in the 'Adblock control' that is a view posts before this one in this thread.

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 22, 2015 07:01AM

Quote
JamesD
Note that all of the controls and views of the logs, etc. are available in the 'Adblock control' that is a view posts before this one in this thread.
Not sure what you're trying to say here. Typo maybe.

OK, here's the log from just that page:
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://js-agent.newrelic.com/nr-768.min.js / Rule: ||newrelic.com^$third-party

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 22, 2015 08:01PM

Yes, it is a typo. I meant to to type the following.

Note that all of the controls and views of the logs, etc. are available in the 'Adblock control' that is a few posts before this one in this thread.

That reference is to this post:
http://kmeleonbrowser.org/forum/read.php?9,135175,136807#msg-136807

The control included with the post includes the new adblock icons for the button. Clicking the button toggles the adblock.dll plugin on or off. A right click on the button, will bring up the menus. There is a main menu which has two popup menus.



The Main menu contains a menu repeat of the button toggle, an item to enable the plugin logging, two popup menu named Actions and Automatics, and a quick view of all the current settings.



The Actions menu has items to view the subscriptions list, the rules, the logs of the plugin and the log of the control's actions. Also there are items to clear [delete] plugin's rules and log.



The Automatics menu allows the user to enable the automatic deletion of the rules and log on a scheduled basis and set the number of days for each.

In the comments section of the macro module, I have listed the KM prefs associated with the plugin and also those associated with the control.



Edited 1 time(s). Last edit at 12/22/2015 08:02PM by JamesD.

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 23, 2015 12:52AM

Thank you for the explanation.
You might already know but there's a typo in the menu - "Ouick" view settings.
Also, I would add the words on/off to the icons, as green and red could be interpreted either way, depending on how you look at it. In fact, I thought I had it enabled, but didn't.

Regarding the log I posted, any idea what's going on?



Edited 1 time(s). Last edit at 12/23/2015 01:13AM by Slickone.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 23, 2015 03:48AM

Quote
Slickone
You might already know but there's a typo in the menu - "Ouick" view settings.

Thank you for noticing that. I am 74 years old today and it seems that my eyes are as old as I.

Quote
Slickone
Also, I would add the words on/off to the icons, as green and red could be interpreted either way, depending on how you look at it. In fact, I thought I had it enabled, but didn't.

Rodocop provided the images for the 2.4 version. I agree that there is room for interpretation there. I had completely different images in all the versions prior to 2.4. Personally, I do not like red in my toolbars for anything except a problem. These images are similar to the official adblock and adblock plus products. Rodocop thought users would expect these button images to be similar. I will try to find a solution, but I am not a graphics expert.

Options: ReplyQuote
Re: Basic adblock
Posted by: siria
Date: December 23, 2015 04:12AM

Oh, so additional happy birthday to you!! grinning smiley

A little renaming suggestion for "Enable Plugin Logging":
"Log Blocked Elements"

The new button icons are nice. And the red-green is in line with the red-green privbar icons.

It is true that red-green buttons can mean everything depending on viewpoint, that's a real dilemma. But then, same prob goes for most privbar buttons too! Interestingly those were always clear though. Probably because they look "pressed" and (the ones I use) have a cross inside. But looks like not everyone likes the look of "pressed" buttons among otherwise flat ones nowadays.

How to make things really clear??
At the least a status bar message when toggling.
And perhaps a double menu entry? 2 lines, one for "Adblock enabled" and below one for "Adblock disabled", so that at least 1 of them is always checked?
Or keep a single menu line for the state and rename it after each toggle, but have found this to be not very reliable.
Or show a little info popup after each toggling, telling clearly "Adblock enabled/disabled"? It can get on the nerves after awhile, but I've started loving those little popupmenus which don't need to click them to close, but just click anywere. They could also be used as less intrusive info-popups, but probably still a matter of taste.

Options: ReplyQuote
Re: Basic adblock
Posted by: Dorian
Date: December 23, 2015 06:17AM

Quote
Slickone
OK, here's the log from just that page:
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://js-agent.newrelic.com/nr-768.min.js / Rule: ||newrelic.com^$third-party

Ok, the bugsnag rule should not apply because it's whitelisted for tvguide. So it's a bug in the plugin.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 23, 2015 09:08AM

This latest version of the adblock control, ver 2.6, has the following changes.

Typo in menu fixed.
Both the original and new icons supported.
The icon tooltip is updated at switch of icon.
The icon tooltip indicates the colors for enabled and disabled states.
Statusbar updated after a toggle for enable/disable.

Attachments: adblock control 26.7z (12.2 KB)  
Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 23, 2015 09:25AM

Quote
siria
A little renaming suggestion for "Enable Plugin Logging":
"Log Blocked Elements"

The new button icons are nice. And the red-green is in line with the red-green privbar icons.

It is true that red-green buttons can mean everything depending on viewpoint, that's a real dilemma. But then, same prob goes for most privbar buttons too! Interestingly those were always clear though. Probably because they look "pressed" and (the ones I use) have a cross inside. But looks like not everyone likes the look of "pressed" buttons among otherwise flat ones nowadays.

How to make things really clear??
At the least a status bar message when toggling.
And perhaps a double menu entry? 2 lines, one for "Adblock enabled" and below one for "Adblock disabled", so that at least 1 of them is always checked?
Or keep a single menu line for the state and rename it after each toggle, but have found this to be not very reliable.
Or show a little info popup after each toggling, telling clearly "Adblock enabled/disabled"? It can get on the nerves after awhile, but I've started loving those little popupmenus which don't need to click them to close, but just click anywere. They could also be used as less intrusive info-popups, but probably still a matter of taste.

I got the statusbar item in ver 2.6.
I have had more possible menu item names proposed than I can remember. I am just not sure on that.
I hope the new tooltips help. Let me know what you think of that method of conveying information.
I have a "thing" about red on my toolbars. Green is good, but red is bad or a warning. That is why I don't use the privacy bar and my JS button is backward from the norm.
I feel bad for anyone trying to make a locale file for the control. Maybe it will be settled and stay in one form soon.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 23, 2015 09:28AM

Quote
Dorian
Ok, the bugsnag rule should not apply because it's whitelisted for tvguide.

Is whitelisting something I need to cover in the adblock control?

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 24, 2015 11:00PM

Quote
Dorian
Quote
Slickone
OK, here's the log from just that page:
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://js-agent.newrelic.com/nr-768.min.js / Rule: ||newrelic.com^$third-party

Ok, the bugsnag rule should not apply because it's whitelisted for tvguide. So it's a bug in the plugin.
Will you be fixing that?

Options: ReplyQuote
Re: Basic adblock
Posted by: siria
Date: December 26, 2015 08:30AM

Good improvements. And like the new user pref for different icon sets, seems really necessary smiling smiley

Surprised: can KM use "ico" pics in toolbars and menus now? Since which version exactly? (not yet tested myself)

Not quite clear: which of the toggles actually need a restart? Is it possible to enable/disable the adblocking during a session? Or does that only toggle the prefs, checkmarks and button, but not the plugin-function itself? And what if rules are deleted, or filled? Guess it was said something does need a restart (new rules?), but so far users get the impression all would work instantly. Probably some more info texts would help.

Noticed the kmm still contains 2 different macros to do the same: toggle the disabled-pref. 1 for toolbar and 1 for menu, only one writes log and shows statusbar. Not sure if it's intentional not to use the same toggle-macro for button + menu?

The BUTTON stuff - ouff... It has meanwhile gotten so chaotic, had to struggle understanding it roughly at least. For example "buildmenu" ADDs the button, then calls the "toolbar_set" macro which may REMOVE it again, then ADD it again (as dummy button) after checking if it was fired by "IcoChg".. and right afterwards may REMOVE/ADD it yet another time after checking if rules exist...
Couldn't resist to think about simplification and came up with this, just suggestion of course, your taste may vary:

- Only 1 shared and simplified macro "toolbar_set" handles ADDING the button and icon stuff alone (see below)
- "addtoolbar" remains outside, preferably called $OnSetup only
- the calling toggle-macros only change prefs and do "removebutton" then call "toolbar_set"
- The images of both icon sets are named similar (easier code for replacing)

_Adblockplugin_toolbar_set {
$_icon="adblockKM_active.png";
getpref(BOOL,"kmeleon.plugins.adblock.disabled")) ? $_icon="adblockKM_disabled.png" : 0;
getpref(BOOL, "kmeleon.plugins.adblock.rules.cleared")) ? $_icon="adblockKM_dead.png" : 0;
#
getpref(BOOL, "kmeleon.plugins.adblock.icons.alternate" ) ? $_iconset="2.png" : $_iconset="1.ico";
$_icon=sub(".png",$_iconset,$_icon);
setcmdicon("macros(_Adblockplugin_toggle)", $_icon);
#
# button replacement only needed for tooltip-toggle:
$_iconset=="1.ico" ? $_tooltip = "Adblock plugin ON[red]/OFF[green]" : 0;
$_iconset=="2.png" ? $_tooltip = "Adblock plugin ON[green]/OFF[red]" : 0;
getpref(BOOL, "kmeleon.plugins.adblock.rules.cleared")) ? $_tooltip="Adblock plugin INACTIVE \n no rules") : 0;
addbutton("Adblock_plugin", "macros(_Adblockplugin_toggle)", "Adblock Plugin", $_tooltip);
$_icon=""; $_iconset=""; $_tooltip="";
}

Yes, I've intentionally killed the &Dummy button workaround cool smiley
On one hand a macro called just "&Dummy" is likely to be multi-used for different macros and toolbars, that can create bugs on toolbars (had such a case just recently again). On the other I'd rather keep the normal toggle-macro anyway, only start it with a "rules.cleared" check. If true, either have it do nothing, or better show an info-alert, or info+question (Disable now? Enable now?), or perhaps run popupmenu("Adblock Plugin")...

And always think it would be very helpful to add in the kmm-headers a link to their forum threads, at least for such more important macros...



Edited 3 time(s). Last edit at 12/26/2015 09:49PM by siria.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 26, 2015 09:11PM

siria

I have started on some changes, but it may take me a while to get a new package ready.

Yes, the forum reference should be included. DONE

Yes, the first menu item is redundant. It is a leftover
from the first macro which did not have a button. REMOVED

My first macro for this was only 921 bytes, whereas the 2.6 version control has grown to 12.2 KB in size. I suspect that a complete rewrite is needed but I am just lazy. I knew the &Dummy might become a problem, but it was expedient.

The ico's are from rodocop. This is the first time I have ever used ico files in a toolbar. If I were any good a graphics, I would have just one png file with six parts just for the reduced space requirements.

There is more to say, but I have to go now.

Options: ReplyQuote
Re: Basic adblock
Posted by: siria
Date: December 27, 2015 01:55AM

Of course, am in the same boat and understand that perfectly cool smiley

But not sure if there's a misunderstanding now:

Quote
siria
Noticed the kmm still contains 2 different macros to do the same: toggle the disabled-pref. 1 for toolbar and 1 for menu, only one writes log and shows statusbar. Not sure if it's intentional not to use the same toggle-macro for button + menu?

Never meant to remove either the menuline or the button, only to have them both run the same macro.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 27, 2015 08:00AM

Quote
siria
Never meant to remove either the menuline or the button, only to have them both run the same macro.

That is easy to try. Now the menu item shows the image on the button ALWAYS instead of check or no check. I am not sure if anyone can tell the state. I think I will go back to original method and just try to put a statusbar line with code for the menu. That will take more code, but I think it will be best to do it this way.

Options: ReplyQuote
Re: Basic adblock
Posted by: siria
Date: December 27, 2015 08:26AM

Ah... the double macros are about checkmarks vs. icons?
Frankly I was believing that "menuchecked" lines are overruling menu-icons. But now not sure anymore... or if perhaps priority may be lost after changing icons during a session... Guess only testing will clear this up.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 27, 2015 08:27PM

I don't really remember if the 'disabled' macro is a leftover from the first version or needed to keep a check mark instead of the icon. The history of it does not matter. I have been able to reuse the toggle code and reduce the size by a few lines.

_Adblockplugin_disable {
menuchecked= getpref( BOOL, "kmeleon.plugins.adblock.disabled") ;
macroinfo= _("Disable the plugin, checked or enable the plugin, un-checked.");
macros("_Adblockplugin_toggle");
}

Now both methods display statusbar info and are logged.

_Adblockplugin_toggle {
togglepref( BOOL, "kmeleon.plugins.adblock.disabled") ;
macros("_Adblockplugin_toolbar_set");
$__adbdisabled = getpref(BOOL, "kmeleon.plugins.adblock.disabled");
$__adbdisabled ? $__adbdisabled = _("DISABLED") : $__adbdisabled = _("ENABLED");
$_adblockmacro_text = date( "%Y-%m-%d %H:%M" )." >> "._("Ad blocking set to ").$__adbdisabled._(" by user.");
appendfile($__abpmacro_path, "\n".$_adblockmacro_text);
statusbar(_("Ad blocking set to ").$__adbdisabled);
}

Now I will have a look at the &Dummy code.
Edit: Changing the "Dummy" to "basic_ab_Dummy" moves the likelihood of a conflict from possible to statistically impossible.



Edited 1 time(s). Last edit at 12/27/2015 09:25PM by JamesD.

Options: ReplyQuote
Re: Basic adblock
Posted by: Dorian
Date: December 28, 2015 11:51PM

@Slickone
Updated first post. The bug should be fixed.

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 29, 2015 04:24AM

For me, after updating with adblock76, the listing grid at tvguide.com is still missing with adblock enabled.

Log:
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js / Rule: /bugsnag-
Block: http://ox-d.cbs.servedbyopenx.com.tvgcdn.net/www/js/ads.js / Rule: /js/ads.
Block: http://js-agent.newrelic.com/nr-768.min.js / Rule: ||newrelic.com^$third-party



Edited 1 time(s). Last edit at 12/29/2015 04:25AM by Slickone.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 29, 2015 07:46AM

Slickone

Do you think our locations make a difference in what we are show by tvguide? Right above the listings is an item named PROVIDER. Mine shows Eastern (ET). What does yours show? I am seeing the listing grid and I have the new dll file.

I searched my log file and did not find the string 'bugsnag'.

The string 'bugsnag' does not appear in my rules file. Does it appear in yours? My rules are dated as Dernière modification le 28 Dec 2015 17:51 UTC

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 29, 2015 10:30AM

I have it set to Central time. Eastern is the default.

Yes, several bugsnag rules. But we're probably not using the same subscription. I'm using Easylist+Easyprivacy.

Options: ReplyQuote
Re: Basic adblock
Posted by: JamesD
Date: December 29, 2015 07:51PM

You are correct. I have easylist and fanboy-social.

Options: ReplyQuote
Re: Basic adblock
Posted by: Slickone
Date: December 30, 2015 10:23AM

I also used Easylist+Easyprivacy (plus one or two mores subs...malware domains was one) with Firefox and didn't have this problem.

Options: ReplyQuote
Pages: Previous123Next
Current Page: 2 of 3


K-Meleon forum is powered by Phorum.