Skip to content

Instantly share code, notes, and snippets.

View UnforeseenOcean's full-sized avatar
😠
Contact me directly for copyright issues.

Sean Canned Bean UnforeseenOcean

😠
Contact me directly for copyright issues.
  • Don't Bother LTD.
  • Somewhere Foundry, CA
View GitHub Profile
@UnforeseenOcean
UnforeseenOcean / chrome_39.js
Created May 31, 2019 13:00 — forked from ksol/chrome_39.js
Language detection in javascript
window.navigator.language // -> "fr"
window.navigator.languages // -> ["fr-FR", "fr", "en-US", "en", "es", "de"]
window.navigator.userLanguage // -> undefined
window.navigator.browserLanguage // -> undefined
window.navigator.systemLanguage // -> undefined
@UnforeseenOcean
UnforeseenOcean / browser-fuckup.js
Created July 23, 2019 12:27
Inject CSS into page and apply it to ALL divs
var anim="@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}",head=document.head||document.getElementsByTagName('head')[0],style=document.createElement('style');head.appendChild(style);var e=document.getElementsByTagName('div');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText = anim;}else{style.appendChild(document.createTextNode(anim));}for(var i=0;i<e.length;i++){e[i].setAttribute("style","animation:spin 0.5s infinite linear;")};
@UnforeseenOcean
UnforeseenOcean / expand-DOM.js
Last active July 24, 2019 05:53
A variation on browser-fuckup.js -- make everything inaccessible with style
var anim="@keyframes blow{0%{transform:scale(1,1);}99.9%{transform: scale(4,4);opacity:0;}100%{transform:scale(0,0);}}",head=document.head||document.getElementsByTagName('head')[0],style=document.createElement('style');head.appendChild(style);var e=document.getElementsByTagName('*');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText = anim;}else{style.appendChild(document.createTextNode(anim));}for(var i=0;i<e.length;i++){e[i].setAttribute("style","animation:blow 10s 1 linear forwards;transform-origin:center center;")};
@UnforeseenOcean
UnforeseenOcean / Page-b-gone.js
Last active July 24, 2019 05:54
Another variation of browser-fuckup.js -- shrink everything
var anim="@keyframes shrink{0%{transform:scale(1,1);}100%{transform:scale(0,0);opacity:0;}}",head=document.head||document.getElementsByTagName('head')[0],style=document.createElement('style');head.appendChild(style);var e=document.getElementsByTagName('*');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText = anim;}else{style.appendChild(document.createTextNode(anim));}for(var i=0;i<e.length;i++){e[i].setAttribute("style","animation:shrink 10s 1 linear forwards;transform-origin:center center;")};
@UnforeseenOcean
UnforeseenOcean / Sigma-Phi.js
Created July 24, 2019 05:51
Cause gravitational collapse
var anim="@keyframes sigma{0%{transform:scale(1,1);opacity:0.95;}99.9%{transform:scale(0,0)rotate3d(1,1,1,180deg);}100%{opacity:0;}}",head=document.head||document.getElementsByTagName('head')[0],style=document.createElement('style');head.appendChild(style);var e=document.body.getElementsByTagName('*');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText = anim;}else{style.appendChild(document.createTextNode(anim));}for(var i=0;i<e.length;i++){e[i].setAttribute("style","animation:sigma 10s 1 ease-out forwards;transform-origin:center center;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;")};
@UnforeseenOcean
UnforeseenOcean / konamiCode.js
Created August 20, 2019 05:32 — forked from nestoralvaro/konamiCode.js
Snippet to detect Konami Code (and then do something)
/******************************************************************************
* This script detects the Konami code
* (Full Konami Code obtained from: http://en.wikipedia.org/wiki/Konami_Code)
* If the Konami code is detected the function called "startUpKonami" is invoked.
* You can do whatever you want on "startUpKonami". Right now this method just:
* - Detachs the Konami code detection (so no further detections can happen).
* - Invokes an external function.
*
* Note: In case the user presses keys like "shift", "caps lock", "Ctrl"...
* the code will have to be reentered from scratch
@UnforeseenOcean
UnforeseenOcean / wget.md
Created September 1, 2019 06:39 — forked from protrolium/wget.md
wget commands

Download Only Certain File Types Using wget -r -A

You can use this under following situations:

  • Download all images from a website
  • Download all videos from a website
  • Download all PDF files from a website

$ wget -r -A.pdf http://url-to-webpage-with-pdfs/

@UnforeseenOcean
UnforeseenOcean / name.js
Created September 8, 2019 14:59 — forked from tkon99/name.js
Random Name Generator for Javascript
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {
<!DOCTYPE html>
<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>Swipe Keyboard</title>
<style>
body {
@UnforeseenOcean
UnforeseenOcean / index.html
Created January 24, 2020 17:29
Shitty Loading Bar
<h3 id="title">Click here to begin loading</h3>
<a href="#" onclick="toggleView()">Toggle View</a>
<canvas id="c" width="300" height="300"></canvas>