Scaleable Clickable Sublime Text Logo
A Pen by Hugo Darby-Brown on CodePen.
// ==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); |
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' |
Scaleable Clickable Sublime Text Logo
A Pen by Hugo Darby-Brown on CodePen.