Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3891639
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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\./, "")); | ||
} |