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
javascript:!function($){ $(".arrow.up.login-required").each(function(){this.click()}) }(jQuery) |
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 getKeys(obj) { | |
if (Object.prototype.toString.call(obj) !== "[object Object]") return; | |
return recurse(obj, []); | |
function recurse(obj, tmp) { | |
for (var p in obj) { | |
if (tmp.indexOf(p) === -1) tmp.push(p); | |
if (Object.prototype.toString.call(obj[p]) === "[object Object]") recurse(obj[p], tmp); | |
} | |
return tmp; | |
} |
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 extend() { | |
var args = Array.prototype.slice.call(arguments); | |
var base = args.slice(0, 1)[0]; | |
var objs = args.slice(1); | |
for (var i = 0; i < objs.length; i++) { | |
for (var p in objs[i]) { | |
if (!base[p]) base[p] = objs[i][p]; | |
} | |
} | |
return base; |
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
/** creates overlay and iframe module via bookmarklet */ | |
(function() { | |
var args = Array.prototype.slice.call(arguments); | |
var iframeId = args.filter(function(a){return a.el === "IFRAME"})[0].id; | |
var overlayId = args.filter(function(a){return a.el === "div"})[0].id; | |
args.forEach(function(obj) { | |
var el = document.createElement(obj.el); |
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 modal = (function(base) { | |
"use strict"; | |
var className = "itemContainer__item"; | |
var containerClassName = "itemContainer"; | |
var containerId = "bmk-itemContainer"; | |
var classSelector = "." + className; | |
var container = elem({ | |
className: containerClassName, | |
id: containerId |
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
//camelCase("foo", "bar", "fizz", "buzz") -> fooBarFizzBuzz | |
//camelCase("bar", "foo", "bat" true) -> BarFooBat | |
function camelCase() { | |
var i, curr, str = ""; | |
var args = Array.prototype.slice.call(arguments); | |
var toggle = args.slice(args.length - 1, args.length)[0]; | |
var strings = typeof toggle === "boolean" ? args.slice(0, args.length - 1) : args; | |
for (i = 0; i < strings.length; i++) { | |
if ( (i === 0 && typeof toggle === "boolean") || (i > 0) ) |
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 a = { | |
b: { | |
c: { | |
d: false | |
} | |
} | |
}; |
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
module.exports = ["$http", "$q", function($http, $q) { | |
/** | |
* @param opts {object} - hash of options | |
* url | |
* method | |
* params | |
* body | |
* | |
* @returns promise |
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
// https://jsfiddle.net/dlizik/x40fv8rk/ | |
function treewalk(obj, bucket, pathStr, delim) { | |
var i, p, last = pathStr.slice(0, pathStr.length - 1); | |
if (Array.isArray(obj)) { | |
if (obj.length === 0) | |
bucket[last] = obj; | |
else { |
OlderNewer