Update MBViewer

This commit is contained in:
2024-02-05 11:53:24 +01:00
parent 90b432cf55
commit 3d89c0e60b
3 changed files with 34 additions and 6 deletions

View File

@@ -0,0 +1,26 @@
body {
background-color: white;
color: black;
}
div.tgme_background_wrap,
div.tgme_header_right_column,
div.tgme_header_search,
div.tgme_header_info > a[name="goBack"],
.tgme_widget_message_user_photo
/*header.tgme_header*/ {
display: none;
}
section.tgme_channel_history.js-message_history {
margin: 0;
}
div.tgme_widget_message_author,
div.tgme_widget_message_footer,
div.tgme_widget_message_service_date_wrap,
div.tgme_widget_message_author a,
div.tgme_widget_message_footer a {
background-color: lightgray;
color: black;
}

View File

@@ -34,9 +34,10 @@
<link rel="alternate icon" href="img/favicon.ico" type="image/x-icon"/>
<link href="css/font-roboto.css" rel="stylesheet" type="text/css"/>
-->
<link href="css/widget-frame.css" rel="stylesheet" media="screen"/>
<link href="css/telegram-web.css" rel="stylesheet" media="screen"/>
<link rel="stylesheet" href="css/MBViewer.css"/>
<link rel="stylesheet" media="screen" href="css/widget-frame.css"/>
<link rel="stylesheet" media="screen" href="css/telegram-web.css"/>
<link rel="stylesheet" media="screen" href="css/MBViewer.css"/>
<link rel="stylesheet" media="print" href="css/print.css"/>
</head>
<body class="widget_frame_base tgme_webpreview emoji_image thin_box_shadow tme_mode no_transitions">
<div class="tgme_background_wrap">

View File

@@ -15,8 +15,6 @@
// * I think we might need to handle acronicized names for users when needed?
// * show, and/or sort by, posts tags/categories
// * scroll to post id when loading from dataInject or RSS
// * fix XML feeds parsing on Firefox
// * allow for an HTML transformation script to be loaded (JS is unsafe) (how?)
let MbState = {};
let MbApiTransformer;
@@ -399,7 +397,10 @@ async function MbViewerInit () {
<br/> * Support including user-defined JS scripts from URL (<code>data:</code> supported) via the <code>includeScript</code> argument. A script must expose a <code>MbViewerFunction(data)</code> function to be invoked by the main application to do useful operations, and then return data by calling the <code>MbViewerReturn(data)</code> API function.
<br/>
...I will probably need to write actual documentation about this, but for sure I will post about this on <a href="https://octospacc.altervista.org/?p=1416">https://octospacc.altervista.org/?p=1416</a>.
</p>`, time: '2024-01-27T20:00' }, { content: `<p>
</p>`, time: '2024-02-01T00:00' }, { content: `<p>
Updates:
<br/> * Include special CSS for optimized PDF/paper printing
</p>`, time: '2024-02-05T11:00' }, { content: `<p>
Copyright notice: MBViewer uses code borrowed from <a href="https://t.me">t.me</a>,
specially modified to handle customized data visualizations in an MB-style.
<br/>