Skip to content

Instantly share code, notes, and snippets.

@plainas
plainas / viewonflickriver.user.js
Created February 6, 2012 01:27
View on flickriver userscript
// ==UserScript==
// @name View on flifkriver
// @namespace http://lamehacks.net
// @description Adds links to flickriver on flickr group, user, tag and search pages
// @include http://*.flickr.com/*
// @match http://*.flickr.com/*
// ==/UserScript==
var groupRegex = new RegExp(".*?flickr.com/groups/([^\/]*)");
var matched = groupRegex.exec(window.location);
@dfkaye
dfkaye / js-get-fn-name.js
Last active October 31, 2022 11:44
get a javascript function name
function getFnName(fn) {
fn = Object(fn)
var F = typeof fn == 'function'
var N = fn.name
var S = F && ((N && ['', N]) || fn.toString().match(/function ([^\(]+)/))
return (!F && 'not a function') || (S && S[1] || 'anonymous');
}
console.log(getFnName(String)); // 'String'
console.log(getFnName(function test(){})); // 'test'
anonymous
anonymous / CSS-Sublime-Text-Logo.markdown
Created November 7, 2013 03:53
A Pen by Hugo Darby-Brown.