On-screen logger

About

On-screen logger lets you see your console logs right on the screen. It can be helpful for the platforms that hard to debug like WebViews inside other apps.

On-screen logger on Telegram WebView

Guide

Just add the script from https://800147.github.io/on-screen-logger/logger.js before any other scripts in your html file (no additional attributes — no type module, no defer, no async).

<script src="https://800147.github.io/on-screen-logger/logger.js"></script>
<script>
  console.log('Here I am at the screen!');
</script>

Supported methods

* — the result may differ from the result in the console.

String substitutions are not supported.

Styling

You can override default styles using given classnames.

.OSLogger {
  bottom: 50%;
  font-size: 20px;
  opacity: 0.9;
}

.OSLogger-Message_level_info,
.OSLogger-Message_level_debug {
  display: none;
}

Example

Here is the example page that uses On-screen logger:

example page

Sources

The sources can be found on Github:

sources on Github