From 4d7f53380d31154709faa3f9d6cdc467ff141951 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 29 Aug 2013 13:30:38 +0200 Subject: allow more than one article enhancer per url based on the url regex, also allow embedded youtube videos that start with // --- utility/articleenhancer/cyanideandhappinessenhancer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'utility/articleenhancer/cyanideandhappinessenhancer.php') diff --git a/utility/articleenhancer/cyanideandhappinessenhancer.php b/utility/articleenhancer/cyanideandhappinessenhancer.php index 1faee6d5c..037a3179e 100644 --- a/utility/articleenhancer/cyanideandhappinessenhancer.php +++ b/utility/articleenhancer/cyanideandhappinessenhancer.php @@ -36,8 +36,10 @@ class CyanideAndHappinessEnhancer extends ArticleEnhancer { parent::__construct( $purifier, $fileFactory, - '/explosm.net\/comics/', // match article url - '//*[@id=\'maincontent\']/div[2]/div', // xpath statement to extract the html from the page + array( + '/explosm.net\/comics/' => '//*[@id=\'maincontent\']/div[2]/div', + '/explosm.net\/show/' => '//*[@id=\'videoPlayer\']/iframe' + ), $timeout ); } -- cgit v1.2.3