From fa2df09b1b359b69a44f6840d83e11e146d55910 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Tue, 25 Jul 2017 15:39:26 +0200 Subject: [PATCH] [FacebookBridge] Add option to hide posts with facebook videos This adds a new option 'novideo' that can be set to 'on' or 'off' in order to skip posts that include facebook videos (does not work for linked videos like YouTube). This option is 'off' by default. References #533 --- bridges/FacebookBridge.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index 71e5ed0..ba41498 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -12,6 +12,12 @@ class FacebookBridge extends BridgeAbstract { 'u' => array( 'name' => 'Username', 'required' => true + ), + 'novideo' => array( + 'name' => 'No Videos', + 'type' => 'checkbox', + 'required' => false, + 'title' => 'Activate to remove posts including (facebook) videos' ) )); @@ -190,6 +196,10 @@ EOD; foreach($posts as $post){ + // (optionally) skip posts that include facebook videos + if($this->getInput('novideo') && !empty($post->find('[aria-label=Video]'))) + continue; + $item = array(); if(count($post->find('abbr')) > 0){