Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trollbox

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trollbox - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

24

dist/trollbox.js

@@ -59,2 +59,6 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

setChannel(channel) {
if (channel === this.config.channel) {
return false;
}
this.config.channel = channel;

@@ -65,2 +69,6 @@ this.onLoad();

setUser(user) {
if (user === this.config.user) {
return false;
}
this.config.user = user;

@@ -106,3 +114,3 @@ this.onLoad();

// ugly, quick, and dirty
this.container.innerHTML = `
const html = `
<div class="TrollboxContainer">

@@ -123,2 +131,8 @@ <div class="TrollboxHeader">

`;
const doc = document.createDocumentFragment();
const div = document.createElement('div');
div.innerHTML = html;
while (div.firstChild) doc.appendChild(div.firstChild);
this.container.appendChild(doc);
}

@@ -162,4 +176,10 @@

list.innerHTML += `<li><strong>${this.escapeHtml(user)}:</strong> ${this.escapeHtml(message)}</li>`;
const html = `<strong>${this.escapeHtml(user)}:</strong> ${this.escapeHtml(message)}`;
const doc = document.createDocumentFragment();
const listItem = document.createElement('li');
listItem.innerHTML = html;
doc.appendChild(listItem);
list.appendChild(doc);
box.scrollTop = box.scrollHeight;

@@ -166,0 +186,0 @@ }

@@ -112,3 +112,3 @@ class Trollbox {

// ugly, quick, and dirty
this.container.innerHTML = `
const html = `
<div class="TrollboxContainer">

@@ -129,2 +129,8 @@ <div class="TrollboxHeader">

`
const doc = document.createDocumentFragment()
const div = document.createElement('div')
div.innerHTML = html
while (div.firstChild) doc.appendChild(div.firstChild)
this.container.appendChild(doc)
}

@@ -168,4 +174,10 @@

list.innerHTML += `<li><strong>${this.escapeHtml(user)}:</strong> ${this.escapeHtml(message)}</li>`
const html = `<strong>${this.escapeHtml(user)}:</strong> ${this.escapeHtml(message)}`
const doc = document.createDocumentFragment()
const listItem = document.createElement('li')
listItem.innerHTML = html
doc.appendChild(listItem)
list.appendChild(doc)
box.scrollTop = box.scrollHeight

@@ -172,0 +184,0 @@ }

2

package.json
{
"name": "trollbox",
"version": "0.0.18",
"version": "0.0.19",
"description": "Instant trollbox using Firebase.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc