Skip to content

Commit

Permalink
20190322.4
Browse files Browse the repository at this point in the history
  • Loading branch information
phhpro committed Mar 22, 2019
1 parent bc2a15c commit 49e93db
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ function go($tag)
" if (typeof(EventSource) " .
"!== 'undefined') {\n" .
" var src " .
"= new EventSource('sse.php?src=$log');\n" .
"= new EventSource('push.php?src=$log');\n" .
" var sel " .
"= document.querySelector('article');\n" .
" console." .
Expand Down
17 changes: 17 additions & 0 deletions push.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* PHP Version 5 and above
*
* Push helper
*
* @category PHP_Chat
* @package PHP_Atomchat
* @author P H Claus <[email protected]>
* @copyright 2015 - 2019 P H Claus
* @license https://www.gnu.org/licenses/gpl-3.0.en.html GPLv3
* @version GIT: Latest
* @link https://github.com/phhpro/atomchat
*/
header("Content-Type: text/event-stream");
$src = str_replace("\n", "", file_get_contents($_GET['src']));
echo "data: $src\n\n";
2 changes: 1 addition & 1 deletion theme/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ select {

.item:hover .item_head {
background-color: #666;
color: #000;
color: #ccc;
}

.item_log {
Expand Down

0 comments on commit 49e93db

Please sign in to comment.