This allows you to send message from your server via headers to the dhtmlconsole developer panel
DHTMLConsole Extension
This plugin allows you to send a message from your web server (directly by running a server script or making an ajax call) to your browser by using an HTTP Header.
The only rule is that you need to send custom HTTP headers from your server with the name of the header starting with X-DHTML-CONSOLE.
To send a message from a PHP script to the browser, this implementation will suffice:
header('X-DHTML-CONSOLE-MSG: Hello World');
?>
As of version 0.3, you can now do javaScript alerts
header('X-DHTML-CONSOLE-MSG: alert:Hello World');
?>
As of version 0.3, you can clear the console from server by:
header('X-DHTML-CONSOLE-MSG: -clear-');
?>
To send multiple messages in PHP:
function dhtmlconsole($msg='') {
static $pos=0;
$pos++;
header('X-DHTML-CONSOLE-MSG'.$pos.': '.$msg);
}
//implementation
dhtmlconsole(\"Hello\");
dhtmlconsole(\"World\");
?>
Read more
The only rule is that you need to send custom HTTP headers from your server with the name of the header starting with X-DHTML-CONSOLE.
To send a message from a PHP script to the browser, this implementation will suffice:
header('X-DHTML-CONSOLE-MSG: Hello World');
?>
As of version 0.3, you can now do javaScript alerts
header('X-DHTML-CONSOLE-MSG: alert:Hello World');
?>
As of version 0.3, you can clear the console from server by:
header('X-DHTML-CONSOLE-MSG: -clear-');
?>
To send multiple messages in PHP:
function dhtmlconsole($msg='') {
static $pos=0;
$pos++;
header('X-DHTML-CONSOLE-MSG'.$pos.': '.$msg);
}
//implementation
dhtmlconsole(\"Hello\");
dhtmlconsole(\"World\");
?>
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "name": "DHTMLConsole", "version": "0.4", "description": "This allows you to send message from your server via headers to the dhtmlconsole developer panel", "devtools_page": "devtools.html", "manifest_version": 2, "icons": { "16": "icon16.png", "48": "icon48.png", "128": "icon128.png" },\t\t "background": { "scripts": ["background.js"] }, "browser_action": { "default_icon": "icon16.png", "default_title": "DHTMLConsole" }, "permissions": [\t"tabs", "http://*/*", "https://*/*" ], "content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'"}
Read more