You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
515 B
PHP
27 lines
515 B
PHP
<?php
|
|
|
|
namespace Proxy\Plugin;
|
|
|
|
use Proxy\Plugin\AbstractPlugin;
|
|
use Proxy\Event\ProxyEvent;
|
|
|
|
use Proxy\Html;
|
|
|
|
class TwitterPlugin extends AbstractPlugin {
|
|
|
|
protected $url_pattern = 'twitter.com';
|
|
|
|
public function onCompleted(ProxyEvent $event){
|
|
|
|
// there is some problem with content-length when submitting form...
|
|
$response = $event['response'];
|
|
$content = $response->getContent();
|
|
|
|
// remove all javascript
|
|
$content = Html::remove_scripts($content);
|
|
|
|
$response->setContent($content);
|
|
}
|
|
}
|
|
|
|
?>
|