Go to file
Phyks 59da40c8ec Started the replacement function
Set the tests for replacement

TODO : Do replacement itself
2013-08-04 22:54:58 +02:00
adblock Started the replacement function 2013-08-04 22:54:58 +02:00
.gitignore Added a README file and started to handle params saving 2013-08-04 20:13:32 +02:00
README.md Updated dir structure to ease installation 2013-08-04 21:55:25 +02:00

Adblock for Leed

This is a plugin for Leed written by Phyks (phyks@phyks.me) to allow a leed user to :

  • Mask all embedded flash contents in the feeds (and allow him to play this content in a click to play way)
  • Mask all the images in the feeds to load the pages faster

This behavior can be fully customized in a per feed way (with either a blacklist or a whitelist). You can also choose to disable images only on mobile browsers.

Important note : To install the plugin, just do as usual with leed plugins. The adblock folder goes in the plugins directory of your leed installation. Don't rename the adblock directory unless you know what you do (you will need to change some paths values in the script itself).

Constants (adblock_constants.php file)

Parameter Possible values
_flash_enabled_ _0_ to disable flash blocking, _1_ to enable
_flash_block_ _1_ to block all flash content by default, _0_ to allow flash and block with a blacklist (per feed)
_flash_list_ Comma-separated list of feeds to allow (if _flash_block_ is _1_) or to block (if _flash_block_ is _0_)
_img_enabled_ _1_ to enable image blocking, _0_ to disable
_img_block_ _1_ to blockall images by default, _0_ to allow images and block selectively with a blacklist (per feed)
_img_only_mobiles_ _1_ to make all the rules relative to images work only on mobiles, _0_ else
_img_list_ Comma-separated list of feeds to allow (if _img_block_ is _1_) or to block (if _img_block_ is _0_)

For the _*list paramaters, the comma-separated list is a comma-separated list of feed ids. You can find these ids in the address bar when viewing the feed in list. The URL in the address bar should be like this (just take the ID in the URL) :

http://LEED_URL/index.php?action=selectedFeed&feed=ID

License

Please, send me an email if you use or modify this program, just to let me know if this program is useful to anybody or how did you improve it :) You can also send me an email to tell me how lame it is ! :)

TLDR;

I don't give a damn to anything you can do using this code. It would just be nice to quote where the original code comes from.


"THE NO-ALCOHOL BEER-WARE LICENSE" (Revision 42) :

Phyks (phyks@phyks.me) wrote this file. As long as you retain this notice you
can do whatever you want with this stuff (and you can also do whatever you want
with this stuff without retaining it, but that's not cool...). If we meet some 
day, and you think this stuff is worth it, you can buy me a <del>beer</del> soda 
in return.
                                                                 Phyks