Last active
June 12, 2021 00:32
-
-
Save aramis-it/c04b0d1ff09e39b8ba8921383eeea075 to your computer and use it in GitHub Desktop.
Hide trello first board
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Middleware; | |
use Psr\Http\Message\ResponseInterface; | |
use Psr\Http\Message\ServerRequestInterface; | |
use Psr\Http\Server\MiddlewareInterface; | |
use Psr\Http\Server\RequestHandlerInterface; | |
/** | |
* Cors middleware | |
*/ | |
class CorsMiddleware implements MiddlewareInterface | |
{ | |
/** | |
* Process method. | |
* | |
* @param \Psr\Http\Message\ServerRequestInterface $request The request. | |
* @param \Psr\Http\Server\RequestHandlerInterface $handler The request handler. | |
* @return \Psr\Http\Message\ResponseInterface A response. | |
*/ | |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface | |
{ | |
$response = $handler->handle($request); | |
if ($request->getHeader('Origin')) { | |
$response = $response | |
->withHeader('Access-Control-Allow-Origin', '*') | |
->withHeader('Access-Control-Allow-Headers', '*'); | |
if (strtoupper($request->getMethod()) === 'OPTIONS') { | |
$response = $response | |
->withStatus(200, __('Say cheese!')); | |
} | |
} | |
return $response; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here You can type your custom JavaScript... | |
$('#board .js-list .list-cards').first().hide(); | |
$('#board .js-list').first().hover(function() { | |
$('#board .js-list .list-cards').first().show(); | |
}); | |
$('#board .js-list').first().mouseleave(function() { | |
$('#board .js-list .list-cards').first().hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment