Skip to content

Instantly share code, notes, and snippets.

@eastcoastcoder
eastcoastcoder / index.html
Last active February 26, 2019 19:23 — forked from sbrin/index.html
Paste MS Word Text Jquery plugin
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="./script.js"></script>
</head>
<body>
<div id="editor" contenteditable="true">
<p>Place MS-Word text here...</p>
</div>
@eastcoastcoder
eastcoastcoder / es7-async-await.js
Created December 10, 2017 20:07
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@eastcoastcoder
eastcoastcoder / VLCPlugin.user.js
Last active August 23, 2016 05:33 — forked from surkin/VLCPlugin.user.js
user script to replace HTML5 video player with VLC plugin
// ==UserScript==
// @name Safari 4Chan Inline Webm Player [WIP]
// @grant none
// @include *
// ==/UserScript==
function html5vlc(){
var videos = document.getElementsByTagName("video");
var embeds = new Array(videos.length);
//Generate <embed>
for (var i = 0; i < videos.length; i++) {