This file contains hidden or 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
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // | |
| // the regular expression composed & commented | |
| // could be easily tweaked for RFC compliance, | |
| // it was expressly modified to fit & satisfy | |
| // these test for an URL shortener: |
This file contains hidden or 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
| // ==UserScript== | |
| // @name u.js | |
| // @namespace http://zarjay.net/ | |
| // @description Utility functions for browser console ninjas | |
| // @include * | |
| // @version 0.28 | |
| // ==/UserScript== | |
| exec(function() { | |
| // Current version of u.js |
This file contains hidden or 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
| javascript:(function() { | |
| if(!window.your_bookmarklet) { | |
| var doc = document, | |
| js = doc.createElement('script'); | |
| js.type = 'text/javascript'; | |
| js.src = 'loader.js'; | |
| js.async = true; |
This file contains hidden or 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 myAddStyler (cssArray) { | |
| /* | |
| myAddStyler([ | |
| "element { rule : 1 }", | |
| "element { rule : 2 }" | |
| ]); | |
| */ | |
| if ( !cssArray || !cssArray.length ) return; | |
| var css = cssArray.join("\n"), | |
| heads, |
This file contains hidden or 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
| // https://arkofmind.wordpress.com/2011/04/27/escape-all-characters-in-javascript/ | |
| // extended from: http://sharkysoft.com/tutorials/jsa/content/018.html | |
| /* global unescape */ | |
| (function () { | |
| "use strict"; | |
| function escapeAll (str) { | |
| var hexString = ""; | |
| for (var c in str) { |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>Tabbed Widget<style id="jsbin-css"> | |
| body { | |
| background: #eee | |
| } | |
| .widget { |
This file contains hidden or 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 collection of helper prototype for everyday DOM traversal, manipulation, | |
| * and event binding. Sort of a minimalist jQuery, mainly for demonstration | |
| * purposes. MIT @ m3g4p0p | |
| */ | |
| window.$ = (function (undefined) { | |
| /** | |
| * Duration constants | |
| * @type {Object} |
This file contains hidden or 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
| javascript:(function(){window.open("","UDO Inspector","width=600,height=514,scrollbars=1"/*,resizable=1"*/).document.write('<script language="JavaScript" id="udoaudit" src="//tags.tiqcdn.com/utag/adrian-test/tools/dev/utag.4.js?'+Math.random()+'"><\/script>');}()); |
This file contains hidden or 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 () { | |
| /** | |
| * Adapted from http://ted.mielczarek.org/code/mozilla/bookmarklet.html | |
| */ | |
| //***************************************************************************** | |
| // Do not remove this notice. | |
| // | |
| // Copyright 2001 by Mike Hall. |
This file contains hidden or 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
| import jQuery from 'jquery' | |
| import Turbolinks from 'turbolinks' | |
| export default function () { | |
| const { defer, dispatch } = Turbolinks | |
| const handleEvent = function handleEvent(eventName, handler) { | |
| document.addEventListener(eventName, handler, false) | |
| } |