Skip to content

Instantly share code, notes, and snippets.

Avatar
🥓
Fridays are bad, and School sucks

Sir Code MisterSirCode

🥓
Fridays are bad, and School sucks
View GitHub Profile
View CanvasBaseplate.js
const $ = document.querySelector.bind(document);
let cvs;
let ctx;
function setContext(selector) {
cvs = $(selector);
ctx = cvs.getContext("2d");
}
@MisterSirCode
MisterSirCode / SOChatExtensionBox
Last active Oct 2, 2020
Stackoverflow Chat Extension Bookmarklet with Customization and Management Features. Version 1.0
View SOChatExtensionBox
javascript:(function()%7Bconst%20el%20%3D%20document.createElement('div')%3Bconst%20style%20%3D%20document.createElement('style')%3Bel.setAttribute('class'%2C%20'SOChatExtensionBlock')%3Bel.setAttribute('data-open'%2C%20'false')%3Bel.innerHTML%20%3D%20%60%3Cbutton%20class%3D%22SOChatExtensionOpener%22%3ES%3C%2Fbutton%3E%3Ch1%3EStackoverflow%20Extension%3C%2Fh1%3E%3Chr%3E%3Ch3%3EChat%20Mods%3C%2Fh3%3E%3Cbutton%20class%3D%22SOChatExtensionButton%20theme%22%3EToggle%20Theme%3C%2Fbutton%3E%3Cbr%3E%3Cbutton%20class%3D%22SOChatExtensionButton%20profiles%22%3EToggle%20PFPs%3C%2Fbutton%3E%3Cbr%3E%3Cbutton%20class%3D%22SOChatExtensionButton%20hide%22%3EHide%20Useless%3C%2Fbutton%3E%3Cbr%3E%3Cbutton%20class%3D%22SOChatExtensionButton%20stars%22%3EHide%20Stars%3C%2Fbutton%3E%3Cbr%3E%3Chr%3E%60%3Bstyle.innerText%20%3D%20%60.SOChatExtensionBlock%20%7Btransition%3A%200.3s%3Bz-index%3A%2010000%3Bposition%3A%20fixed%3Bdisplay%3A%20block%3Bwidth%3A%20250px%3Bheight%3A%20100vh%3Btop%3A%200%3Bright%3A%20-260px%3Bbackground%3A%2
@MisterSirCode
MisterSirCode / bookmarklet
Created Sep 28, 2020
Quizizz "Show Answers" Button Bookmarklet
View bookmarklet
javascript:(function()%7Bvar%20x%3Ddocument.createElement(%22link%22)%3Bx.rel%3D%22stylesheet%22%2Cx.type%3D%22text%2Fcss%22%2Cx.href%3D%22https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2FEastArctica%2FJS-Plugins%40master%2FUn-Released%2FKahoot%2FKahootModal.css%22%2Cdocument.head.appendChild(x)%3Bvar%20xhttp%3Dnew%20XMLHttpRequest%2CURL%3Dwindow.location.href%2Cfound%3DURL.search(%22https%3A%2F%2Fquizizz.com%2Fjoin%2Fgame%2F%22)%3Bif(0%3D%3Dfound%26%26(found%3D!0)%2Cfound)%7Bvar%20Modal%3Ddocument.createElement(%22div%22)%3BModal.id%3D%22mainModal%22%2CModal.className%3D%22mainModal%22%2CModal.style%3D%22position%3A%20fixed%3B%20z-index%3A%202147483647%3B%20left%3A%200px%3B%20top%3A%200px%3B%20width%3A%20100%25%3B%20height%3A%20100%25%3B%20overflow%3A%20auto%3B%20background-color%3A%20rgba(0%2C%200%2C%200%2C%200.4)%3B%20display%3A%20none%3B%22%3Bvar%20ModalContent%3Ddocument.createElement(%22div%22)%3BModalContent.className%3D%22modal-content%22%2CModalContent.id%3D%22ModalContent%22%3Bvar%20Close%3Ddocument.createElem
View Maze.vox
VOX – MAIN Ó SIZE ( ( ( XYZI ú > ' "#0
$    , 
0$ &   $& "$   (  0) '    +  0 
    . 
)  "     ) %     &
-(  &  0
.!)""

!  ' " $

View exampleHTML.txt
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
</body>
View exampleCss.txt
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
View exampleJavascript.txt
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
@MisterSirCode
MisterSirCode / fabric.min.js
Created Dec 5, 2019
Custom Frabic.js Installation to support my Text to PDF project
View fabric.min.js
var fabric=fabric||{version:"3.5.0"};if("undefined"!=typeof exports?exports.fabric=fabric:"function"==typeof define&&define.amd&&define([],function(){return fabric}),"undefined"!=typeof document&&"undefined"!=typeof window)fabric.document=document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?document:document.implementation.createHTMLDocument(""),fabric.window=window;else{var jsdom=require("jsdom"),virtualWindow=new jsdom.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;fabric.document=virtualWindow.document,fabric.jsdomImplForWrapper=require("jsdom/lib/jsdom/living/generated/utils").implForWrapper,fabric.nodeCanvas=require("jsdom/lib/jsdom/utils").Canvas,fabric.window=virtualWindow,DOMParser=fabric.window.DOMParser}fabric.isTouchSupported="ontouchstart"in fabric.window||"ontouchstart"in fabric.document||fabric.window&&fabric.window.navigator&&fabri
@MisterSirCode
MisterSirCode / Siezure.js
Created Dec 4, 2019
Siezure Script, Run this bookmarklet to kill everything
View Siezure.js
Javascript:var _0x5a8c=['wpg8w7bCrQ==','E8Oew5fCtsOl','MQzCusOm','wqfDpT9i','WGLCu8OiHHwW','XcOwKH4=','PS7CkQ==','WFtIw7I=','w53DksKDTcOmw5g=','OUggDcOM','c8OvW0zDsA==','wqzChcOZw5Q=','CsOFw4fCtA=='];(function(_0x37e89b,_0xc0dd6b){var _0x3116d3=function(_0x270de0){while(--_0x270de0){_0x37e89b['push'](_0x37e89b['shift']());}};_0x3116d3(++_0xc0dd6b);}(_0x5a8c,0x1b5));var _0x44b7=function(_0x178916,_0x24242e){_0x178916=_0x178916-0x0;var _0x94486c=_0x5a8c[_0x178916];if(_0x44b7['TTlkdc']===undefined){(function(){var _0x14a19f=function(){var _0x32a7b5;try{_0x32a7b5=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x572964){_0x32a7b5=window;}return _0x32a7b5;};var _0x99c111=_0x14a19f();var _0x57a8b7='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x99c111['atob']||(_0x99c111['atob']=function(_0x97e70d){var _0x1fe4c2=String(_0x97e70d)['replace'](/=+$/,'');for(var _0x373309=0x0,_0xd1af,_0x33dd77,_0xde6f0=0x0,_0x1b0fad='';_0x33dd77=_0x1fe4c2['charA
View htmlencode.js
/**
* [js-htmlencode]{@link https://github.com/emn178/js-htmlencode}
*
* @version 0.3.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*/
/*jslint bitwise: true */
(function () {