Преглед изворни кода

remove marked and update voicechat

Dele Olajide пре 3 месеци
родитељ
комит
2aad32dbfc

+ 0 - 93
packages/marked/marked.css

@@ -1,93 +0,0 @@
-.chat-msg__text h1 { 
-    font-size: 2em !important;    
-    font-weight: bold !important;
-    margin-top: 0.67em !important;
-    line-height: 1 !important;    
-}
-.chat-msg__text h2 {
-    font-size: 1.5em !important;   
-    font-weight: bold !important;
-    margin-top: 0.83em !important; 
-    line-height: 1 !important;       
-}
-.chat-msg__text h3 { 
-    font-size: 1.17em !important;
-    font-weight: bold !important;
-    margin-top: 1em !important;  
-    line-height: 1 !important;       
-}
-.chat-msg__text h4 { 
-    font-size: 1.00em !important;
-    font-weight: bold !important;
-    margin-top: 1.33em !important;
-    line-height: 1 !important;       
-}
-.chat-msg__text h5 { 
-    font-size: 0.83em !important;
-    font-weight: bold !important;
-    margin-top: 1.67em !important;  
-    line-height: 1 !important;       
-}
-.chat-msg__text h6 { 
-    font-size: 0.67em !important;
-    font-weight: bold !important;
-    margin-top: 2.33em !important;  
-    line-height: 1 !important;       
-}
-.chat-msg__text pre {
-    background-color: #F5F5F5 !important;
-    padding-left: 40px !important;    
-}
-.chat-msg__text blockquote {
-  background-color: #F5F5F5 !important;  
-  border-left: 3px solid #ccc !important;
-} 
-.chat-msg__text ul {
-    list-style-type: disc !important;
-}
-.chat-msg__text ol {
-    list-style-type: decimal !important;
-}
-.chat-msg__text li {
-    display: list-item !important;
-}
-.chat-msg__text ul, .chat-msg__text ol, .chat-msg__text dl {
-    display: block !important;
-    margin-bottom: 1em !important;
-    margin-left: 0 !important;
-    margin-right: 0 !important;
-    padding-left: 40px !important;
-}
-.chat-msg__text p {
-  margin-top: 0 !important;
-  margin-bottom: 0 !important; 
-  padding: 0px !important;  
-}
-
-.chat-msg__text table {
-    color: #333;
-    font-family: Helvetica, Arial, sans-serif;
-    border-collapse:
-    collapse; border-spacing: 0;
-}
-
-.chat-msg__text td, th {
-    border: 1px solid transparent; /* No more visible border */
-    height: 30px;
-    transition: all 0.3s;  /* Simple transition for hover effect */
-}
-
-.chat-msg__text th {
-    background: #DFDFDF;  /* Darken header a bit */
-    font-weight: bold;
-}
-
-.chat-msg__text td {
-    background: #FAFAFA;
-    text-align: left;
-    vertical-align: top;
-}
-
-.chat-msg__text .modal-body {
-  overflow-x: auto;
-}

+ 0 - 57
packages/marked/marked.js

@@ -1,57 +0,0 @@
-(function (root, factory) {
-    if (typeof define === 'function' && define.amd) {
-        define(["converse"], factory);
-    } else {
-        factory(converse);
-    }
-}(this, function (converse) {
-    var _converse = null;
-
-    converse.plugins.add("marked", {
-        'dependencies': [],
-
-        'initialize': function () {
-            _converse = this._converse;
-
-			var renderer = new marked.Renderer();
-
-			renderer.link = function(href, title, text) {
-				return renderImage(href, title, text);
-			}
-			
-			renderer.image = function(href, title, text) {
-				return renderImage(href, title, text);
-			}
-			
-			marked.setOptions({
-			  renderer: renderer
-			});			
-		
-            _converse.api.listen.on('beforeMessageBodyTransformed', function(text)
-            {
-				//console.debug("beforeMessageBodyTransformed", text);
-				
-				if (text.startsWith("RSS:") || text.startsWith("ADAPTIVE-CARD:")) {	
-					return;
-				}
-								
-				if (text.indexOf('\n') != text.lastIndexOf('\n')) {	// apply only to paragraphs of text
-					const parsed = marked.parse(text.toString());
-					text.render_styling = false;
-					const strings = [parsed];
-					strings.raw = strings;						
-					text.references = [{begin: 0,  end: text.length,  template: html(strings) }];					
-				}
-            });
-			
-           console.debug("marked plugin is ready");
-        }
-    });
-	
-	function renderImage(href, title, text) {
-		if (!title) title = href;
-		const types = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.svg'];
-		const image = !!types.filter(ext => href.endsWith(ext)).length;	
-		return `<a title=${title} href=${href}>` + (image ? `<img src=${href}>` : text) + `</a>`;
-	}
-}));

Разлика између датотеке није приказан због своје велике величине
+ 0 - 5
packages/marked/marked.min.js


+ 17 - 0
packages/voicechat/package.json

@@ -0,0 +1,17 @@
+{
+  "name": "@converse-plugins/voicechat",
+  "author": "Dele Olajide",
+  "license": "Apache 2.0",
+  "version": "0.0.2.0",
+  "keywords": [
+    "converse.js",
+    "plugin"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/conversejs/community-plugins.git"
+  }
+}

+ 12 - 0
packages/voicechat/readme.md

@@ -0,0 +1,12 @@
+# Voice Chat plugin for converse.js
+
+<img src="https://github.com/conversejs/community-plugins/blob/master/packages/voicechat/voicechat.png" />
+
+## Overview
+This plugin enables you to have a voice chat. It uses the morning.fm web client hosted on talk.4ng.net (deleolajide.github.io/morning.fm) which in turn connects to a kraken SFU at rpc.kraken.fm.
+
+## Install
+see https://m.conversejs.org/docs/html/plugin_development.html on how to install this plugin. Please note that the plugin has a dependency on rpc.kraken.fm and github.io.
+
+## How to use
+Click on disk icon on the conversation toolbar to display the modal form

BIN
packages/voicechat/voicechat.png


Неке датотеке нису приказане због велике количине промена