New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.2 to 0.0.3

2

package.json
{
"name": "trollbox",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

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

(function (root) {
'use strict'
/**
* WARNING: ugly code ahead.
* this is a quick and dirty MVP.
*/
function Trollbox (config) {

@@ -13,3 +18,5 @@ const scriptId = 'FirebaseScript'

document.body.appendChild(script)
script.onload = () => onLoad(config)
script.onload = function () {
onLoad(config)
}
}

@@ -31,3 +38,3 @@

const post = (message) => {
const post = function (message) {
ref.push().set({

@@ -42,3 +49,3 @@ user,

const onMessage = (snapshot) => {
const onMessage = function (snapshot) {
const value = snapshot.val()

@@ -59,3 +66,10 @@

const app = window.firebase.initializeApp(config.firebase)
var app = null
if (window.firebaseApp) {
app = window.firebaseApp
} else {
app = window.firebase.initializeApp(config.firebase)
window.firebaseApp = app
}
const db = app.database()

@@ -92,3 +106,3 @@ const ref = db.ref(`trollbox/${channel}`)

form.addEventListener('submit', event => {
form.addEventListener('submit', function (event) {
event.preventDefault()

@@ -95,0 +109,0 @@ const input = event.target.message

Sorry, the diff of this file is not supported yet

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