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.11 to 0.0.12

24

dist/bundle.js

@@ -27,10 +27,12 @@ (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){

this.renderBox();
this.bindForm();
this.ref.off('child_added', this.onMessage);
this.ref.limitToFirst(100).on('child_added', this.onMessage);
if (!this.config.delayRender) {
this.render();
}
}
initFirebase() {
if (!window.firebase) {
return false;
}
if (!this.db) {

@@ -47,2 +49,5 @@ var app = window.firebase.initializeApp(this.config.firebase);

this.ref = this.db.ref(`trollbox/${channel}`);
this.ref.off('child_added', this.onMessage);
this.ref.limitToFirst(100).on('child_added', this.onMessage);
}

@@ -78,2 +83,7 @@

render() {
this.renderBox();
this.bindForm();
}
renderBox() {

@@ -83,2 +93,6 @@ const selector = this.config.container;

if (!this.container) {
return false;
}
// ugly, quick, and dirty

@@ -85,0 +99,0 @@ this.container.innerHTML = `

@@ -15,3 +15,4 @@ var testing = false

channel: 'demo',
user: 'anon'
user: 'anon',
delayRender: false
}

@@ -18,0 +19,0 @@

{
"name": "trollbox",
"version": "0.0.11",
"version": "0.0.12",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/bundle.js",

@@ -26,11 +26,12 @@ class Trollbox {

this.renderBox()
this.bindForm()
this.ref.off('child_added', this.onMessage)
this.ref.limitToFirst(100)
.on('child_added', this.onMessage)
if (!this.config.delayRender) {
this.render()
}
}
initFirebase () {
if (!window.firebase) {
return false
}
if (!this.db) {

@@ -47,2 +48,6 @@ var app = window.firebase.initializeApp(this.config.firebase)

this.ref = this.db.ref(`trollbox/${channel}`)
this.ref.off('child_added', this.onMessage)
this.ref.limitToFirst(100)
.on('child_added', this.onMessage)
}

@@ -78,2 +83,7 @@

render () {
this.renderBox()
this.bindForm()
}
renderBox () {

@@ -83,2 +93,6 @@ const selector = this.config.container

if (!this.container) {
return false
}
// ugly, quick, and dirty

@@ -85,0 +99,0 @@ this.container.innerHTML = `

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