Skip to content

Instantly share code, notes, and snippets.

View DevShaded's full-sized avatar
💭
I may be slow to respond.

Fredrik DevShaded

💭
I may be slow to respond.
View GitHub Profile
@DevShaded
DevShaded / console-enhancer.js
Created August 16, 2023 10:44
VG Error and Warning Handeling
const originalConsoleError = console.error;
const originalConsoleWarn = console.warn;
let devMode = false;
const oldErrors = [];
const oldWarns = [];
function consoleResponse() {
const bigTitleStyle = "font-size: 35px; color: #ff0000; font-weight: bold;";
const titleStyle = "font-size: 30px; color: #ff0000; font-weight: bold;";
const descriptionStyle = "font-size: 18px";
@DevShaded
DevShaded / ttt.js
Last active August 16, 2023 11:09
Tic Tac Toe Game made in js
var Game = function(eventhub) {
let playerId = Math.random().toString(16).substr(2);
let gameId = null;
let gameLock = true;
let players = ['❌', '⭕️'];
let currentPlayer = players[1];
let state = [['❔','❔','❔'], ['❔','❔','❔'], ['❔','❔','❔']];
setTimeout(() => {
const bigTitleStyle = "font-size: 35px; color: #ff0000; font-weight: bold;";
const titleStyle = "font-size: 30px; color: #ff0000; font-weight: bold;";
const descriptionStyle = "font-size: 18px";
console.log("%c👋 Velkommen til Konsollens Gang!", bigTitleStyle);
console.log("%cLiker du å være i konsollen? Det gjør vi også. Kom og snakk med oss da vel?\nJoin https://discord.gg/vgno.", descriptionStyle);
console.log("%c🤔 Lyst til å bli lærling hos oss?", titleStyle);
console.log("%cSøk her: https://emp.jobylon.com/jobs/180192-vg-soknad-til-laerlingplass-i-vge24/", descriptionStyle);
console.log("%c🤗 Eller kanskje bare en vanlig jobb?", titleStyle);