Giter Site home page Giter Site logo

dpeta / pesterchumonlinebutsilly Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 3.0 12.13 MB

A static pure-JavaScript Pesterchum client (it's a bit too goofy and silly)

Home Page: https://pesterchum.online

License: GNU Affero General Public License v3.0

Shell 0.82% HTML 16.55% Python 1.68% JavaScript 70.10% CSS 10.85%
homestuck irc pesterchum

pesterchumonlinebutsilly's Introduction

PesterchumOnlineButSilly

A static pure-JavaScript Pesterchum client; not to be confused with the 2014 NodeIRC/Heroku 'Pesterchum Online'!!

Pretty much the only thing I've ever made using JavaScript, so it's really not very good. Hopefully at least passably secure though; all content from the server is escaped and the live server has a fairly strict content security policy. (CSP Evaluator)

An important difference between this and previous PCO clients is that this client is fully client side and connects over a WebSocket connection, this means that:

  • The hosting server only needs to serve static content.
  • The hosting server won't act as a proxy, so banning a PCO user will actually ban the user instead of the PCO server like with the previous clients.

Even if this client is kinda bad; it's probably best if future online clients also use a WebSocket connection now that IRC is gaining support for it, it's better than the PCO server having to proxy all messages.

To connect to a server other than irc.pesterchum.xyz just swap out the address in src/pesterchum.js.

Local setup

Just download and open index-src.html, the site is fully static so there's no further setup :3

Setup for web server (without babel)

mkdir dist
cp src/pesterchum.js dist/pesterchum.js
cat dist/pesterchum.js | openssl dgst -sha256 -binary | openssl base64 -A

Afterwards you have to put the resulting hash of the script into the integrity fields in index.html's script/preload tags, and ideally also add it to the server's content security header.

Setup for web server (with babel)

Lets the client run on evil old browsers </3

Install dependenies.

npm install @babel/core @babel/cli @babel/preset-env browserify core-js babelify

Run source through browserify + babel, equivalent to running bundle.sh:

./node_modules/.bin/browserify src/pesterchum.js -o dist/pesterchum.js -t babelify
cat dist/pesterchum.js | openssl dgst -sha256 -binary | openssl base64 -A && echo

Then input the resulting hashes, same as the previous setup.

Contributing

Note

This section still WIP

Before sending a pull request, if you modified the /src/pesterchum.js file, please run npm run lint This will run ESLint (eslint --fix) and automatically fix problems and enforce style guidelines.

Thanks to:

All the artist collaborating with backgrounds:

  • paleWreath
  • AU Dave
  • Caliborn (Pure art skills!)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.