A Pen by Daniel W. Crompton on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* load-external-script-snippet.js | |
* Kosei Moriyama <cou929@gmail.com> | |
* | |
* Simple code snippet for loading external script from a bookmarklet. | |
* Replace example url of script to your target script url before use. | |
*/ | |
(function() { | |
var u = 'http://example.com/bookmarklet.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
window.firebase = require('firebase') | |
},{"firebase":2}],2:[function(require,module,exports){ | |
/** | |
* Firebase libraries for browser - npm package. | |
* | |
* Usage: | |
* | |
* firebase = require('firebase'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var debugMode=false; | |
//..... | |
function logMessage() { | |
if(!debugMode) return; | |
console.log(Array.prototype.slice.call(arguments) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use this code as your href attribute on your 'Install this bookmarklet' anchor tag. | |
// borrowed from http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/ | |
javascript:(function(){var jsCode = document.createElement('script');jsCode.setAttribute('src', 'http://example.com/path/to/file.js');document.body.appendChild(jsCode);}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
j=document.createElement("SCRIPT"); | |
j.src="http://code.jquery.com/jquery-latest.pack.js"; | |
document.getElementsByTagName("HEAD")[0].appendChild(j); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='javascript:(function(){var a=alert,b=Date,c=Number,d="";if("undefined"!=typeof window.getSelection){var e=window.getSelection();if(e.rangeCount){for(var f=document.createElement("div"),g=0,h=e.rangeCount;g<h;++g)f.appendChild(e.getRangeAt(g).cloneContents());d=f.innerHTML}}else"undefined"!=typeof document.selection&&"Text"==document.selection.type&&(d=document.selection.createRange().htmlText);a(new b(c(d)));})();'>Parse Epoch</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------------------------- *\ | |
VARIABLES | |
\* ---------------------------------------- */ | |
$red: #a32c28; | |
$white: #fff; | |
$lightest-grey: #eee; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Live.js - One script closer to Designing in the Browser | |
Written for Handcraft.com by Martin Kool (@mrtnkl). | |
Version 4. | |
Recent change: Made stylesheet and mimetype checks case insensitive. | |
http://livejs.com | |
http://livejs.com/license (MIT) | |
@livejs |
NewerOlder