Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jufemaiz committed Jul 11, 2010
0 parents commit 3891639
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Empty file added README
Empty file.
40 changes: 40 additions & 0 deletions flickr-smaller.user.js
@@ -0,0 +1,40 @@
// ==UserScript==
// @name Flickr Smallerifier
// @namespace http://github.com/jufemaiz/jmc_flickr_gm_flickr-smaller
// @description Toggle the appearance of the map on the new flickr page.
// @include http://*flickr.com/photos/*
//
// ==/UserScript==
//

var $;

if (typeof unsafeWindow.jQuery == 'undefined') {
var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement,
GM_JQ = document.createElement('script');

// ...then load up the jQuery interface
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js';
GM_JQ.type = 'text/javascript';
GM_JQ.async = true;

GM_Head.insertBefore(GM_JQ, GM_Head.firstChild);
}
GM_wait();

// Check if jQuery's loaded
function GM_wait() {
if (typeof unsafeWindow.jQuery == 'undefined') {
window.setTimeout(GM_wait, 100);
} else {
$ = unsafeWindow.jQuery.noConflict(true);
letsJQuery();
}
}

// Load 'em up!
function letsJQuery(){
// Photo element
var image = $('#photo .photo-div img')[0];
image.attr('src',image.attr('src').replace(/_z\./, ""));
}

0 comments on commit 3891639

Please sign in to comment.