Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

First commit, very alpha version

  • Loading branch information...
commit e07bf069153c54d14a8c56f486b866427c1779b7 0 parents
Gina Trapani authored
Showing with 15,441 additions and 0 deletions.
  1. 0  .gitignore
  2. +80 −0 README
  3. +26 −0 _input/betteramazon/config.inc.php
  4. BIN  _input/betteramazon/icon.png
  5. +12 −0 _input/betteramazon/todo.txt
  6. +27 −0 _input/betteramazon/user_scripts/cleaneramazonbookpages.user.js
  7. +114 −0 _input/betteramazon/user_scripts/collapsibleamazon.user.js
  8. +144 −0 _input/betteramazon/user_scripts/enlargeproductimages.user.js
  9. +59 −0 _input/betteramazon/user_scripts/shortenproductlinks.user.js
  10. +122 −0 _input/betteramazon/user_scripts/supersaversnooper.user.js
  11. +4,120 −0 _input/betterflickr/allsizesplus.user.js
  12. +21 −0 _input/betterflickr/changelog.txt
  13. +24 −0 _input/betterflickr/config.inc.php
  14. BIN  _input/betterflickr/icon.png
  15. +189 −0 _input/betterflickr/user_scripts/flickrbuddyiconreply.user.js
  16. +212 −0 _input/betterflickr/user_scripts/moreuserlinks.user.js
  17. +737 −0 _input/betterflickr/user_scripts/photomagnifier.user.js
  18. +151 −0 _input/betterflickr/user_scripts/photopageenhancer.user.js
  19. +354 −0 _input/betterflickr/user_scripts/richedit.user.js
  20. +169 −0 _input/betterflickr/user_scripts/thumbnailsenhancer.user.js
  21. +10 −0 _input/bettergcal/changelog.txt
  22. +26 −0 _input/bettergcal/config.inc.php
  23. BIN  _input/bettergcal/icon.png
  24. +58 −0 _input/bettergcal/user_scripts/alwaysusesecureconnection.user.js
  25. +466 −0 _input/bettergcal/user_scripts/collapseheader.user.js
  26. +24 −0 _input/bettergcal/user_scripts/colorizeweekendmon.user.js
  27. +24 −0 _input/bettergcal/user_scripts/colorizeweekendsun.user.js
  28. +26 −0 _input/bettergcal/user_scripts/redesigned.user.js
  29. +708 −0 _input/bettergcal/user_scripts/showcurrenttimeontoday.user.js
  30. +87 −0 _input/bettergcal/user_scripts/showweek.user.js
  31. +110 −0 _input/bettergcal/user_scripts/textwrap.user.js
  32. +45 −0 _input/bettergmail2/TODO.txt
  33. +25 −0 _input/bettergmail2/config.inc.php
  34. BIN  _input/bettergmail2/icon.png
  35. +26 −0 _input/bettergmail2/user_scripts/addrowhighlights.user.js
  36. +26 −0 _input/bettergmail2/user_scripts/attachmenticons.user.js
  37. +51 −0 _input/bettergmail2/user_scripts/bottompostinreply.user.js
  38. +1,269 −0 _input/bettergmail2/user_scripts/filterassistant.user.js
  39. +580 −0 _input/bettergmail2/user_scripts/folders4gmail.user.js
  40. +27 −0 _input/bettergmail2/user_scripts/hidechat.user.js
  41. +26 −0 _input/bettergmail2/user_scripts/hideinvitesbox.user.js
  42. +18 −0 _input/bettergmail2/user_scripts/hidespamcount.user.js
  43. +48 −0 _input/bettergmail2/user_scripts/inboxcountfirst.user.js
  44. +1,440 −0 _input/bettergmail2/user_scripts/macrosmodified.user.js
  45. +88 −0 _input/bettergmail2/user_scripts/showmessagedetails.user.js
  46. +149 −0 _input/bettergmail2/user_scripts/showunreadmessagecountinfavicon.user.js
  47. +26 −0 _input/bettergreader/config.inc.php
  48. BIN  _input/bettergreader/icon.png
  49. +4 −0 _input/bettergreader/todo.txt
  50. +26 −0 _input/bettergreader/user_scripts/absolutelycompact.user.js
  51. +25 −0 _input/bettergreader/user_scripts/airskin.user.js
  52. +18 −0 _input/bettergreader/user_scripts/autoadd.user.js
  53. +206 −0 _input/bettergreader/user_scripts/colorfullistview.user.js
  54. +24 −0 _input/bettergreader/user_scripts/hideunreadcount.user.js
  55. +93 −0 _input/bettergreader/user_scripts/markuntilcurrentasread.user.js
  56. +83 −0 _input/bettergreader/user_scripts/minimalistic.user.js
  57. +40 −0 _input/bettergreader/user_scripts/optimized.user.js
  58. +64 −0 _input/bettergreader/user_scripts/previewautomatically.user.js
  59. +293 −0 _input/bettergreader/user_scripts/previewclickbutton.user.js
  60. +77 −0 _input/bettergreader/user_scripts/showfeedfavicons.user.js
  61. +62 −0 _input/bettergreader/user_scripts/smartsubscribe.user.js
  62. +24 −0 _input/betterlifehacker/config.inc.php
  63. BIN  _input/betterlifehacker/icon.png
  64. +25 −0 _input/betterlifehacker/user_scripts/automaticallycheckcommentpreviewbox.user.js
  65. +35 −0 _input/betterlifehacker/user_scripts/indentreplies.user.js
  66. +109 −0 _input/betterlifehacker/user_scripts/settimezonetoeastern.user.js
  67. +124 −0 _input/betterlifehacker/user_scripts/settimezonetopacific.user.js
  68. +360 −0 _input/betterlifehacker/user_scripts/showcommentshtmlhelper.user.js
  69. +24 −0 _input/betteryoutube/config.inc.php
  70. BIN  _input/betteryoutube/icon.png
  71. +4 −0 _input/betteryoutube/todo.txt
  72. +138 −0 _input/betteryoutube/user_scripts/youtubealternatevideoplayer.user.js
  73. +48 −0 _input/betteryoutube/user_scripts/youtubedownload.user.js
  74. +63 −0 _input/betteryoutube/user_scripts/youtubetheater.user.js
  75. BIN  _input/myuserscripts/icon.png
  76. +12 −0 _input/myuserscripts/user_scripts/greetingsplanet1.user.js
  77. +11 −0 _input/myuserscripts/user_scripts/helloworld1.user.js
  78. +1 −0  _output/.gitignore
  79. +1 −0  _templates_c/.gitignore
  80. +226 −0 compile.php
  81. +98 −0 compile.sh
  82. +53 −0 inc/functions.inc.php
  83. +44 −0 inc/setup-dist.inc.php
  84. +35 −0 inc/setup-test.inc.php
  85. +4 −0 templates/chrome.manifest-jar.tpl
  86. +4 −0 templates/chrome.manifest-nojar.tpl
  87. +4 −0 templates/chrome.manifest.tpl
  88. +151 −0 templates/content--common--defaults.js.tpl
  89. +172 −0 templates/content--common--preferences.js.tpl
  90. +128 −0 templates/content--options.js.tpl
  91. +46 −0 templates/content--options.xul.tpl
  92. +94 −0 templates/content--prefman.js.tpl
  93. +15 −0 templates/content--script-compiler-overlay.xul.tpl
  94. +227 −0 templates/content--script-compiler.js.tpl
  95. +89 −0 templates/content--xmlhttprequester.js.tpl
  96. +36 −0 templates/install.rdf.tpl
  97. +15 −0 templates/locale--en-US--options.dtd.tpl
  98. +9 −0 templates/locale--en-US--userscript.properties.tpl
  99. +53 −0 templates/skin--classic--options.css.tpl
0  .gitignore
No changes.
80 README
@@ -0,0 +1,80 @@
+h1. Greasemonkey Multi-Script Compiler
+by Gina Trapani (http://ginatrapani.org)
+Based heavily on code from Anthony Lieuallen located at:
+http://arantius.com/misc/greasemonkey/script-compiler
+
+h2. Warning
+This alpha code is a delicate flower that hasn't been tested nearly as thoroughly as it needs to be. There isn't much documentation, either. Use at your own risk.
+
+h2. System Requirements
+
+* Bash
+* PHP
+* Smarty:http://smarty.net
+
+
+h2. Quick User Guide
+
+Things have to be set up exactly right for the compiler to succeed. Good luck. (More detailed documentation is to come.)
+
+h3. Configure Your User Scripts
+
+* In the project's _input directory, create a folder named after your extension without spaces, all lowercase, ie:
+<pre>$ mkdir mygreatextension</pre>
+
+* Copy the <pre>config.inc.php</pre> file into your new directory. In it, fill in your extension's name, description, GUID, and all other required bits of information. For example:
+
+<pre>'name'=>"Better Gmail 2",
+
+'description'=>"Enhances Gmail with a compilation of useful features written by Greasemonkey user script developers. All scripts copyright their original authors. Click on the script homepage in the Help tab for more information.",
+
+'creator'=>"Gina Trapani (All user scripts copyright their original authors)",
+
+'guid'=>'123456789',
+
+'homepage'=>"http://ginatrapani.org/workshop/firefox/bettergmail2/",
+
+'minVersion'=>'1.5',
+
+'maxVersion'=>'3.1b3',
+
+'updateURL'=>'https://secure.ginatrapani.org/workshop/firefox/update.rdf',
+
+'helpMsg'=>'Refresh Gmail to apply your changes.',
+</pre>
+
+* Make a <pre>user_scripts</pre> subdirectory, and copy all the user scripts you want to include in your extension into it.
+
+* For each user script, add an @author, @homepage, @enabledbydefault, @tab parameters, all of which will show up in your extension's options dialog.
+
+
+h3. Run the Compiler
+
+To run the compiler, make the <pre>compile.sh</pre> file executable, and call it, ie:
+
+<pre>$ chmod +x compile.sh
+$ ./compile.sh bettergmail2 0.8 dist</pre>
+
+Here's more on the command usage:
+
+<pre>Usage: compile.sh extension_short_name version_number [package_mode]
+Example:
+ compile.sh bettergmail2 1.8 dist
+Short name:
+ Extension "short name" is also the name of the folder where its files live,
+ all lower case, without spaces (ie, bettergmail2)
+Version number:
+ Version number (ie, 1.0 or 2.3)
+Package mode: dist | test | amo
+ dist for installable xpi (most common)
+ test for deflated version for testing
+ amo for installable xpi without an updateURL (for uploading to Mozilla Add-ons)
+</pre>
+
+
+
+
+
+
+
+
26 _input/betteramazon/config.inc.php
@@ -0,0 +1,26 @@
+<?php
+
+$GMSC = array(
+
+'name'=>"Better Amazon",
+
+'description'=>"Enhances Amazon.com with a compilation of user scripts and styles. All scripts copyright their original authors. Click on the script homepage in the Help tab for more information.",
+
+'creator'=>"Gina Trapani (All user scripts copyright their original authors)",
+
+'guid'=>'betteramazon@ginatrapani.org',
+
+'homepage'=>"http://ginatrapani.org/workshop/firefox/betteramazon/",
+
+'minVersion'=>'1.5',
+
+'maxVersion'=>'3.0.*',
+
+'updateURL'=>'https://secure.ginatrapani.org/workshop/firefox/update.rdf',
+
+'helpMsg'=>'Refresh the current web page to apply your changes.',
+
+);
+
+
+?>
BIN  _input/betteramazon/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 _input/betteramazon/todo.txt
@@ -0,0 +1,12 @@
+TODO
+
+
+*Make Shorten Product Links work with co.uk site
+
+*Make Shorten Product Links use shorter associate URL format:
+http://lifehacker.com/397946/better-amazon-firefox-extension-upgrades-amazoncom#c6542238
+
+*Add always use https connection?
+
+* Add comment box expander?
+http://userscripts.org/scripts/show/4110
27 _input/betteramazon/user_scripts/cleaneramazonbookpages.user.js
@@ -0,0 +1,27 @@
+// ==UserScript==
+// @name Cleaner Amazon Book Pages
+// @namespace http://userstyles.org
+// @description Hides all the unnecessary bells and whistles on a book page on Amazon.
+// @author timepiece
+// @homepage http://userstyles.org/styles/4328
+// @include htt*amazon.*/*
+
+
+
+// ==/UserScript==
+(function() {
+var css = "@namespace url(http://www.w3.org/1999/xhtml); .h1, .otherEditions, .fionaPublishTable, .tiny, .simsWrapper, .EBBdivider, .bucketDivider, .moreBuyingChoices, .flashPlayer, .qpTableTop, .qpTableLeft, .qpTableCenter, .qpImage, .qpTableRight, .qpTableBottom, #nonmemberStripe, #goKindleStaticPopDiv, #ftMessage, #specialOffersDiv, #primaryUsedAndNew, #secondaryUsedAndNew, #view-dpv-rich-media, #quickPromoBucketContent, #AutoBuyXGetY, #ManualBuyXGetY, #productDescription { display: none ! important; }";
+if (typeof GM_addStyle != "undefined") {
+ GM_addStyle(css);
+} else if (typeof addStyle != "undefined") {
+ addStyle(css);
+} else {
+ var heads = document.getElementsByTagName("head");
+ if (heads.length > 0) {
+ var node = document.createElement("style");
+ node.type = "text/css";
+ node.appendChild(document.createTextNode(css));
+ heads[0].appendChild(node);
+ }
+}
+})();
114 _input/betteramazon/user_scripts/collapsibleamazon.user.js
@@ -0,0 +1,114 @@
+// ==UserScript==
+// @name Collapsible Amazon
+// @author Ben Hollis
+// @namespace http://brh.numbera.com/software/greasemonkeyscripts
+// @description Collapse any section of the Amazon.com web site by clicking on the orange section header.
+// @include http://*.amazon.*
+// @version 3.0
+
+// @homepage http://brh.numbera.com/software/greasemonkeyscripts/
+// @enabledbydefault true
+// ==/UserScript==
+
+String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };
+
+function findContent(bucket, header) {
+ if(header == null)
+ return null;
+
+ var current = header;
+ var contents = [];
+
+ while(current != bucket) {
+ while(current.nextSibling) {
+ current = current.nextSibling;
+
+ if(current.style)
+ contents.push(current);
+ }
+
+ current = current.parentNode;
+
+ if(current.className == "amabot_endcap")
+ return null;
+ }
+
+ return contents;
+}
+
+function findHeader(bucket) {
+ var header = document.evaluate('.//b[contains(@class, "h1")] | .//h2 | .//strong[contains(@class, "h1")] | .//h1[contains(@class, "h1")]', bucket, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ if(header.snapshotLength > 0) {
+ return header.snapshotItem(0);
+ }
+ else {
+ return null;
+ }
+}
+
+function headerClickHandler(header, contents, key) {
+ return function () {
+ var opened = GM_getValue(key, true);
+
+ if(opened == true) {
+ opened = false;
+ closeSection(contents);
+ header.className = header.className.replace("brhgmopened", "brhgmclosed");
+ }
+ else {
+ opened = true;
+ openSection(contents);
+ header.className = header.className.replace("brhgmclosed", "brhgmopened");
+ }
+
+ GM_setValue(key, opened);
+ };
+}
+
+function setupHandlers() {
+ GM_addStyle(".brhgmopened { cursor:pointer; }\n" +
+ ".brhgmclosed { cursor:pointer; }\n" +
+ ".brhgmopened:before { content:\"-\"; color: black; font-weight: bold; border: 1px solid black; padding:0 3px; font-size:10px; margin-right: 4px;}\n" +
+ ".brhgmclosed:before { content:\"+\"; color: black; font-weight: bold; border: 1px solid black; padding:0 3px; font-size:10px; margin-right: 4px;}");
+
+ var allBuckets = document.evaluate('//div[contains(@class, "bucket")] | //td[contains(@class, "bucket")] | //div[contains(@class, "acc")] | //div[contains(@class, "graybox")] | //div[contains(@class, "cmPage")]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ for(var i = 0; i < allBuckets.snapshotLength; i++) {
+ var bucket = allBuckets.snapshotItem(i);
+
+ var header = findHeader(bucket);
+ var contents = findContent(bucket, header);
+
+ if(header && contents) {
+ var key = header.innerHTML.trim();
+
+ var opened = GM_getValue(key, true);
+
+ header.addEventListener("click", headerClickHandler(header, contents, key), false);
+
+ if(opened == false) {
+ closeSection(contents);
+ header.className += " brhgmclosed";
+ }
+ else {
+ header.className += " brhgmopened";
+ }
+ }
+ }
+
+}
+
+function closeSection(contents) {
+ for each(var content in contents) {
+ content.style.display = "none";
+ }
+}
+
+function openSection(contents) {
+ for each(var content in contents) {
+ content.style.display = "";
+ }
+}
+
+setupHandlers();
144 _input/betteramazon/user_scripts/enlargeproductimages.user.js
@@ -0,0 +1,144 @@
+// This user script makes product images on Amazon.com as large as possible.
+// This is primarily useful for gathering album art for your music collection,
+// but is also effective eye candy. As a side effect all those tacky "search
+// inside this book" tags are eliminated. If you like, you can apply a custom
+// formatting string, as described at http://aaugh.com/imageabuse.html. Just
+// set the "format" pref for this script in about:config to your format string.
+// This might be useful if you have a small monitor and want to limit the size
+// of the images (now that would be a bit ironic, wouldn't it ;-p).
+//
+// This script has been tested on amazon.com, amazon.co.uk, and amazon.co.jp.
+
+// ==UserScript==
+// @name Enlarge Product Images
+// @version 2
+// @namespace http://freecog.net/2006/
+// @description Makes product images on Amazon.com as large as possible.
+// @include htt*amazon.*/*
+
+// @author Tom W.M.
+// @homepage http://userscripts.org/scripts/show/7613
+// ==/UserScript==
+
+
+/* Changelog:
+
+Version 3, 17 April 2007:
+* Updated the @includes--Amazon doesn't seem to require the www prefix anymore.
+
+Version 2, 27 Feb 2007:
+* Fixed a bug that caused certain customer images to not be resized.
+* Fixes the issue with the text overlapping a large image.
+
+Version 1: Initial public release
+
+*/
+
+const ali_DEBUG = GM_getValue("debug", false);
+
+// If you want to set a custom format, set this with about:config. The default
+// simply shows the largest image available. For more on these codes go to
+// http://aaugh.com/imageabuse.html
+var ali_format = GM_getValue("format", "_SCLZZZZZZZ_");
+
+// Function to replace an image URL's format specifier with `ali_format`.
+function src_to_large(src) {
+ var replacement = "." + ali_format + "$1.$2$3";
+ return src.replace(/\._[^\.]+?_(\.L)?\.(jpe?g|gif|png)("|'|$)/, replacement);
+}
+
+// Find the product image and change it's size.
+var img = document.getElementById('prodImage');
+if (img) {
+ img.removeAttribute('width');
+ img.removeAttribute('height');
+ img.src = src_to_large(img.src);
+ if (ali_DEBUG) GM_log("Image fixed.");
+} else if (ali_DEBUG) {
+ GM_log("Product image not found.");
+}
+
+
+// A function to eval JS in the document's untrusted scope.
+function window_eval(js) {
+ window.location = "javascript:" + encodeURIComponent(js + "; void null;");
+}
+
+// If there are alternate images, large amounts of shifting can occur
+// when they are switched between. So we traverse the registeredImages
+// object, which contains all of the alternate images and changing it to suit
+// our fancy and doing some preloading. As the images load, we change the
+// size of the container to accomidate the largest among them.
+
+// Export ali_DEBUG and ali_format
+window_eval("ali_DEBUG = " + ali_DEBUG);
+window_eval("ali_format = " + uneval(ali_format));
+
+// Export src_to_large
+window_eval("src_to_large = " + uneval(src_to_large));
+
+// Do it.
+window_eval(uneval(function() {
+ var container = document.getElementById("prodImageCell");
+ var image_grid = null;
+
+ // Find the image_grid, removing size restrictions
+ var node = container;
+ while ((node = node.parentNode)) {
+ [node.width, node.height] = ['', ''];
+ [node.style.width, node.style.height] = ['auto', 'auto'];
+ if (node.className == 'productImageGrid') {
+ image_grid = node;
+ break;
+ }
+ }
+
+ if (image_grid) {
+ image_grid.style.width = '350px'; // Temporary, until images load.
+ image_grid.style.minWidth = '350px';
+ }
+
+ var current_width = 0;
+ var current_height = 0;
+ var preload_count = 0; // When reaches zero, all images have been preloaded.
+ if (!registeredImages) return;
+ for (id in registeredImages) {
+ preload_count++;
+ (function(){
+ var debug_id = id;
+ var img = registeredImages[id];
+ // Remove the width and height attributes from the images so that they assume their
+ // true dimensions upon load.
+ img.html = src_to_large(img.html).replace(/width="\d*?"/, '').replace(/height="\d*?"/, '');
+ img.image = src_to_large(img.image);
+ var preload = img.preload = new Image;
+ preload.addEventListener('load', function(evt) {
+ if (ali_DEBUG) console.log("Image " + debug_id + " preloaded.");
+ preload_count--;
+ if (!preload_count) allPreloaded = 1;
+ function check_sizes() {
+ if (ali_DEBUG) console.log("Checking sizes for " + debug_id);
+ if (current_width < preload.width) {
+ container.width = current_width = preload.width;
+ if (image_grid) {
+ image_grid.style.width = current_width + 'px';
+ }
+ if (ali_DEBUG) console.log(" Width: " + current_width);
+ }
+ if (current_height < preload.height) {
+ container.height = current_height = preload.height;
+ if (ali_DEBUG) console.log(" Height: " + current_height);
+ }
+ }
+ check_sizes();
+ window.setTimeout(check_sizes, 100);
+ }, false);
+ preload.src = img.image; // Load it.
+ })();
+ }
+ if (ali_DEBUG) console.log("Done traversing registeredImages. Container: %o", container);
+
+ //if (image_grid) {
+ //image_grid.style.cssFloat = 'left';
+ //}
+}) + "();");
59 _input/betteramazon/user_scripts/shortenproductlinks.user.js
@@ -0,0 +1,59 @@
+// ==UserScript==
+// @name Shorten Product Links
+// @description Shortens links to Amazon products for easy emailing. Strips Amazon associate referral tags and replaces with options user-set ID.
+
+// based on code here http://userscripts.org/scripts/show/3284 and here http://userscripts.org/scripts/show/558
+
+// @include *
+
+// @author Gina Trapani
+// @homepage http://userscripts.org/scripts/show/29728
+// ==/UserScript==
+
+
+var associateID = '';
+
+if (!GM_getValue("associateID")) {
+ GM_setValue("associateID", associateID);
+ associateID='';
+} else
+ associateID=GM_getValue("associateID");
+
+
+GM_registerMenuCommand('Set your Amazon Associate ID, ie, gizmodo-20', setAssociateID);
+
+function setAssociateID(){
+ associateID = prompt('Set your Amazon Associate ID, ie, gizmodo-20', associateID);
+ GM_setValue('associateID', associateID );
+ window.location.href = window.location.href; //refresh page
+}
+
+function getASIN(href) {
+ var asinMatch;
+ asinMatch = href.match(/\/exec\/obidos\/ASIN\/(\w{10})/i);
+ if (!asinMatch) { asinMatch = href.match(/\/gp\/product\/(\w{10})/i); }
+ if (!asinMatch) { asinMatch = href.match(/\/exec\/obidos\/tg\/detail\/\-\/(\w{10})/i); }
+ if (!asinMatch) { asinMatch = href.match(/\/dp\/(\w{10})/i); }
+ if (!asinMatch) { return null; }
+ return asinMatch[1];
+}
+
+
+(function() {
+var allLinks = window.content.document.getElementsByTagName("a");
+var asin = '';
+for (i = 0; i < allLinks.length; i++) {
+ var href = allLinks[i].href;
+ if (href.match(/amazon\./i) && !href.match(/palitoy/i)) {
+ asin = getASIN(href);
+ if (asin != null) {
+ if (GM_getValue("associateID")=='')
+ allLinks[i].setAttribute("href", "http://amazon.com/o/ASIN/" + asin );
+ else
+ allLinks[i].setAttribute("href", "http://amazon.com/o/ASIN/" + asin + "/ref=nosim/"+associateID);
+ }
+ }
+}
+
+
+})();
122 _input/betteramazon/user_scripts/supersaversnooper.user.js
@@ -0,0 +1,122 @@
+// ==UserScript==
+// @name Super Saver Snooper
+// @author Ben Hollis
+// @namespace http://brh.numbera.com/software/greasemonkey/
+// @description Highlights items in Amazon search results eligible for Super Saver Shipping / Amazon Prime.
+// @include http://*amazon.*/s*
+
+// @homepage http://brh.numbera.com/software/greasemonkeyscripts/
+// @enabledbydefault true
+// ==/UserScript==
+
+function snoopSearchResults() {
+ var highlightColor = '#FFFFDA';
+
+ var sites = {
+ "\.ca$": "ecs.amazonaws.ca",
+ "\.de$": "ecs.amazonaws.de",
+ "\.fr$": "ecs.amazonaws.fr",
+ "\.(co)?\.jp$": "ecs.amazonaws.jp",
+ "\.co\.uk$": "ecs.amazonaws.co.uk",
+ "\.com$": "ecs.amazonaws.com"
+ }
+
+ var site = "ecs.amazonaws.com";
+
+ for(var siteRegex in sites) {
+ if(window.location.hostname.match(siteRegex)) {
+ site = sites[siteRegex];
+ break;
+ }
+ }
+
+ var requestString = "http://" + site + "/onca/xml?Service=AWSECommerceService&Version=2007-01-15&Operation=ItemLookup&ContentType=text%2Fxml&AWSAccessKeyId=08SZDNA2M9QX04X0Z202&IdType=ASIN&MerchantId=Featured&ResponseGroup=Offers&ItemId=";
+
+ var asinRegex = /\/([0-9A-Z]{10})\//;
+
+ //Find the ASINs of the search results and save their HTML blocks
+ var savedItems = new Object();
+ var searchResults = document.evaluate('//td[@class="searchitem"]|//div[@class="result"]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ for(var i = 0; i < searchResults.snapshotLength; i++) {
+ var searchItem = searchResults.snapshotItem(i);
+
+ var productLink = document.evaluate('.//span[@class="srTitle"]/../@href|.//span[@class="small"]/a/@href|.//div[@class="productTitle"]/a/@href', searchItem, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ if(productLink.snapshotLength > 0) {
+ var possibleAsin = asinRegex.exec(productLink.snapshotItem(0).value);
+
+ if(possibleAsin) {
+ var asin = possibleAsin[1];
+ savedItems[asin] = searchItem;
+ }
+ }
+ }
+
+ //create the argument lists, but break them into groups of 10 to trick AWS
+ var asinlist = new Array();
+ var listNum = 0;
+ var index = 0;
+ for (var x in savedItems) {
+ if(index % 10 == 0) {
+ asinlist[Math.floor(index / 10)] = "";
+ }
+ asinlist[Math.floor(index / 10)] += x + ",";
+ index++;
+ }
+
+ //make a series of 10-ASIN AWS calls
+ for(var i=0;i<asinlist.length;i++) {
+ GM_xmlhttpRequest({
+ method: 'GET',
+ url: requestString + asinlist[i],
+ onload: function(response) {
+ //Parse an XML DOM from the response
+ var parser = new DOMParser();
+ var doc = parser.parseFromString( response.responseText, 'text/xml' );
+
+ //For each item...
+ var items = doc.getElementsByTagName('Item');
+
+ for(var j=0; j < items.length; j++) {
+ var product = items[j];
+
+ var offers = product.getElementsByTagName('Offer');
+ var asin = product.getElementsByTagName('ASIN')[0].firstChild.nodeValue;
+
+ //For each offer...
+ for (var k=0; k < offers.length; k++) {
+ var offer = offers[k];
+ var iseligible = offer.getElementsByTagName('IsEligibleForSuperSaverShipping');
+ if(iseligible && iseligible.length > 0 && (!iseligible[0].firstChild || iseligible[0].firstChild.nodeValue == "1")) {
+ var panel = savedItems[asin];
+
+ //Highlight the background if it's super-saverable
+ panel.style.backgroundColor = highlightColor;
+
+ //Correct the price to the price of the first prime-able offer
+ var price = offer.getElementsByTagName('FormattedPrice');
+ if(price && price.length > 0) {
+ price = price[0].firstChild.nodeValue;
+
+ var priceHtml = document.evaluate('.//span[@class="sr_price"]|.//span[@class="saleprice"]|.//div[class="newPrice"]/span', panel, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+ if(priceHtml.snapshotLength > 0) {
+ var thePrice = priceHtml.snapshotItem(0);
+
+ thePrice.innerHTML = price;
+ }
+ }
+
+ //We've already found a good offer, skip to the next item
+ break;
+ }
+ }
+
+ }
+
+ }
+ });
+ }
+}
+
+snoopSearchResults();
4,120 _input/betterflickr/allsizesplus.user.js
4,120 additions, 0 deletions not shown
21 _input/betterflickr/changelog.txt
@@ -0,0 +1,21 @@
+TODO:
+
+Add http://6v8.gamboni.org/Flickr-More-Exif-Info.html
+Have permission from Pierre Andrews, author
+
+Better Flickr 0.3 Changelog:
+
+
+--removed Flickr camera images (built in)
+--removed AllSizes menu
+
+-- added http://userscripts.org/scripts/show/1030 (photo page enhancer)
+-- add http://www.flickr.com/photos/jrhyley/24718496/ (thumbnails enhancer)
+-- added Rich Edit
+
+-- replaced
+http://userscripts.org/scripts/show/1485
+with
+http://userscripts.org/scripts/show/6178
+homepage: http://www.flickr.com/groups/flickrhacks/discuss/72157594303798688/
+-- whoops, no, AllSizes+ doesn't work (try with original Greasemonkey compiler?)
24 _input/betterflickr/config.inc.php
@@ -0,0 +1,24 @@
+<?php
+
+$GMSC = array(
+
+'name'=>"Better Flickr",
+
+'description'=>" A compilation of the best Greasemonkey user scripts for Flickr. All scripts copyright their original authors. Click on the script homepage in the Help tab for more information.",
+
+'creator'=>"Gina Trapani (All user scripts copyright their original authors)",
+
+'guid'=>'betterflickr@ginatrapani.org',
+
+'homepage'=>"http://ginatrapani.org/workshop/firefox/betterflickr/",
+
+'minVersion'=>'1.5',
+
+'maxVersion'=>'3.0.*',
+
+'updateURL'=>'https://secure.ginatrapani.org/workshop/firefox/update.rdf',
+
+);
+
+
+?>
BIN  _input/betterflickr/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
189 _input/betterflickr/user_scripts/flickrbuddyiconreply.user.js
@@ -0,0 +1,189 @@
+// ==UserScript==
+// @name Flickr Buddy Icon Reply
+// @description Add a reply link to each comment which will generate the buddy icon code or bold username code in the add comment textarea on flickr.
+// @namespace http://www.flickr.com/photos/doc18/
+// @include http://*flickr.com/*
+// @exclude http://*flickr.com/messages_write.gne*
+
+// @author doc18
+// @enabledbydefault true
+// @homepage http://www.flickr.com/groups/flickrhacks/discuss/72157594482547285/
+// ==/UserScript==
+
+(function() {
+
+ textareas = document.evaluate("//textarea",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
+ textArray = new Array();
+ messageIndex = 0;
+
+ function tagIt (tagOpen,tagClose,i) {
+ var v = textArray[i].value;
+ var selLength = textArray[i].textLength;
+ var selStart = textArray[i].selectionStart;
+ var selEnd = textArray[i].selectionEnd;
+ if (selEnd==1 || selEnd==2) selEnd=selLength;
+ var start = (v).substring(0,selStart);
+ var middle = (v).substring(selStart, selEnd)
+ var end = (v).substring(selEnd, selLength);
+ textArray[i].value = start + tagOpen + middle + tagClose + end;
+
+ textArray[i].selectionStart = textArray[i].value.length;
+ textArray[i].selectionEnd = textArray[i].value.length;
+ textArray[i].focus();
+ }
+
+
+ function imgItAuto (imgSRC, i) {
+ if (imgSRC != null) {
+ tagIt('<img src="' + imgSRC + '" height="24" width="24"> ','', i);
+ }
+ }
+
+ function usernameItAuto (username, i) {
+ if (username != null) {
+ tagIt('<b>'+ username +'</b> ','', i);
+ }
+ }
+
+ //FlickrLocalisation, script to help localise user script for Flickr
+ //version 0.2
+ //release 26 Jun 2007
+ //author: Pierre Andrews
+
+ // --------------------------------------------------------------------
+ // Copyright (C) 2007 Pierre Andrews
+ // This script can be redistributed under the terms of the GNU LGPL, without
+ // modification of this licence and copyright notice. Attribution to the author should be
+ // kept at least in the source of the scripts.
+ // For reference: http://6v8.gamboni.org/Localising-Flickr-Greasemonkey.html
+ //
+ // This program is free software; you can redistribute it and/or
+ // modify it under the terms of the GNU Lesser General Public License
+ // as published by the Free Software Foundation;
+ //
+ // This program is distributed in the hope that it will be useful,
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ // GNU General Public License for more details.
+ //
+ // The GNU Lesser General Public License is available by visiting
+ // http://www.gnu.org/copyleft/lgpl.html
+ // or by writing to
+ // Free Software Foundation, Inc.
+ // 51 Franklin Street, Fifth Floor
+ // Boston, MA 02110-1301
+ // USA
+
+
+ var FlickrLocaliser = function(locals) {
+ this.init(locals);
+ }
+ FlickrLocaliser.prototype = {
+ selectedLang: undefined,
+ localisations: undefined,
+ getLanguage: function() {
+ if(!this.selectedLang) {
+ var langA = document.evaluate(
+ "//p[@class='LanguageSelector']//a[contains(@class,'selected')]",
+ document,
+ null,
+ XPathResult.FIRST_ORDERED_NODE_TYPE, null
+ ).singleNodeValue;
+ if(langA) {
+ var matches = /\/change_language.gne\?lang=([^&]+)&.*/.exec(langA.href);
+ if(matches && matches[1]) {
+ this.selectedLang = matches[1];
+ return this.selectedLang;
+ }
+ }
+ return false;
+ } else return this.selectedLang;
+ },
+
+ init: function(locals) {
+ this.localisations = locals;
+ },
+
+ localise: function(string, params) {
+ if(this.localisations && this.getLanguage()) {
+ var currentLang = this.localisations[this.selectedLang];
+ if(!currentLang) currentLang = this.localisations[this.localisations.defaultLang];
+ var local = currentLang[string];
+ if(!local) {
+ local = this.localisations[this.localisations.defaultLang][string];
+ }
+ if(!local) return string;
+ for(arg in params) {
+ var rep = new RegExp('@'+arg+'@','g');
+ local = local.replace(rep,params[arg]);
+ }
+ local =local.replace(/@[^@]+@/g,'');
+ return local;
+ } else return undefined;
+ }
+
+ }
+
+ /*****************************Flickr Localisation**********************/
+
+
+ var localiser = new FlickrLocaliser({
+ 'en-us' : {
+ 'name_reply' : 'name reply',
+ 'icon_reply' : 'icon reply'
+ },
+ 'fr-fr' : {
+ 'name_reply' : 'r&eacute;pondre avec le nom',
+ 'icon_reply' : 'r&eacute;pondre avec l\'icone'
+ },
+ 'pt-br' : {
+ 'name_reply' : 'responder com o nome',
+ 'icon_reply' : 'responder com o &iacute;cone'
+ },
+ 'it-it' : {
+ 'name_reply' : 'rispondere con il nome',
+ 'icon_reply' : 'rispondere con l\'icone'
+ },
+ defaultLang: 'en-us'
+ });
+
+ for (i=0; i<textareas.snapshotLength; i++) {
+ textArray[i] = textareas.snapshotItem(i);
+ //GM_log('doc18' + textArray[i].parentNode.innerHTML);
+ if (textArray[i].name == 'message') {
+ messageIndex = i;
+ //GM_log('doc18 > textarea index' + messageIndex);
+ }
+ }
+
+ comments = document.evaluate("//td[@class='Who']",document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);
+ for (i=0; i< comments.snapshotLength; i++) {
+ var who = comments.snapshotItem(i);
+ var imgSrc = who.getElementsByTagName('img')[0].src;
+
+ var said = who.parentNode.getElementsByTagName('td')[1];
+
+ var h4 = said.getElementsByTagName('h4')[0];
+ if (h4 && h4.getElementsByTagName('a').length > 0) {
+ var username = h4.getElementsByTagName('a')[0].textContent;
+ if (username == '') {
+ //admin username
+ username = h4.getElementsByTagName('a')[1].textContent;
+ }
+
+ var nameA = h4.appendChild(document.createElement('a'));
+ nameA.href='javascript:;';
+ nameA.innerHTML = localiser.localise('name_reply');
+ nameA.addEventListener('click',
+ (function(a,b) { return function(){usernameItAuto(a,b)};})(username,messageIndex),false);
+
+ if (imgSrc.indexOf('http://www.flickr.com/images/buddyicon.jpg') == -1) {
+ h4.appendChild(document.createTextNode(', '));
+ var iconA = h4.appendChild(document.createElement('a'));
+ iconA.href='javascript:;';
+ iconA.innerHTML = localiser.localise('icon_reply');
+ iconA.addEventListener('click',(function(a,b) {return function() {imgItAuto(a,b)};})(imgSrc,messageIndex),false);
+ }
+ }
+ }
+})()
212 _input/betterflickr/user_scripts/moreuserlinks.user.js
@@ -0,0 +1,212 @@
+// ==UserScript==
+// @name Flickr More User Links
+// @description Adds useful links to external services to the user sub-menu. Based on Browse by Interesting script by steeev and Scout Link by netomer.
+// @version 0.5
+// @author scragz
+// @namespace http://scragz.com/tech/mozilla/greasemonkey/
+// @include http://www.flickr.com/photos/*
+// @include http://flickr.com/photos/*
+
+// @homepage http://userscripts.org/scripts/show/21605
+// @enabledbydefault true
+// ==/UserScript==
+
+/* begin configuration */
+var doShowPopularLink = true;
+var doShowScoutLink = true;
+var doShowLeechLink = true;
+var doShowYourFavsOfTheirs = true;
+var doShowTheirFavsOfYours = true;
+/* end configuration */
+
+(function() {
+
+/* begin scragz' GM utility functions */
+var _gt = function(e) { return document.getElementsByTagName(e); }
+var _gi = function(e) { return document.getElementById(e); }
+var _ce = function(e) { return document.createElement(e); }
+var _ct = function(e) { return document.createTextNode(e); }
+var _gc = function(clsName)
+{
+ var elems = document.getElementsByTagName('*');
+ var j = 0;
+ var arr = new Array();
+ for (var i=0; (elem = elems[i]); i++) {
+ if (elem.className == clsName) {
+ arr[j] = elem;
+ j++;
+ }
+ }
+ return (arr.length > 0) ? arr : false;
+}
+var xpath = function(query, startingPoint)
+{
+ if (startingPoint == null) {
+ startingPoint = document;
+ }
+ var retVal = document.evaluate(query, startingPoint, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+ return retVal;
+}
+var xpathFirst = function(query, startingPoint)
+{
+ var res = xpath(query, startingPoint);
+
+ if (res.snapshotLength == 0) return false;
+ else return res.snapshotItem(0);
+}
+var swapNode = function(node, swap)
+{
+ var nextSibling = node.nextSibling;
+ var parentNode = node.parentNode;
+ swap.parentNode.replaceChild(node, swap);
+ parentNode.insertBefore(swap, nextSibling);
+}
+var addGlobalStyle = function(css)
+{
+ var head, style;
+ head = _gt('head')[0];
+ if (!head) { return; }
+ style = _ce('style');
+ style.type = 'text/css';
+ style.innerHTML = css;
+ head.appendChild(style);
+}
+/* end scragz' GM utility functions */
+
+var userId; // fake static
+var getUserId = function()
+{
+ if (userId) return userId;
+ var subNav, widget, buddyImage, userIdMatch;
+ if (subNav = _gi('SubNav')) {
+ buddyImage = subNav.rows[0].cells[0].getElementsByTagName('img')[0];
+ } else if (widget = xpathFirst("//div[@class='Widget']")) {
+ buddyImage = widget.getElementsByTagName('img')[0];
+ }
+
+ userIdMatch = /buddyicons\/(.*)\.jpg/gi.exec(buddyImage.src);
+
+ if (userIdMatch) {
+ userId = userIdMatch[1];
+ return userId;
+ }
+
+ userIdMatch = /images\/buddyicon\.jpg\?(.*)/gi.exec(buddyImage.src);
+
+ if (userIdMatch) {
+ userId = userIdMatch[1];
+ return userId;
+ }
+
+ userId = false;
+ return userId;
+}
+
+var username; // fake static
+var getUsername = function()
+{
+ if (username) return username;
+ if (getIsItMe()) return getMyUsername();
+ var header, headerMatch;
+ if (header = _gt('h1')) {
+ headerMatch = /\s*(.*)'s photos.*/gi.exec(header[0].innerHTML);
+
+ if (headerMatch) {
+ username = headerMatch[1];
+ return username;
+ } else {
+ username = false;
+ }
+ } else {
+ username = false;
+ }
+ return username;
+}
+
+var myUsername; // fake static
+var getMyUsername = function()
+{
+ if (myUsername) return myUsername;
+ var whoIs;
+ if (whoIs = _gc('Pale')) {
+ myUsername = whoIs[0].innerHTML;
+ return myUsername;
+ } else {
+ myUsername = false;
+ }
+ return myUsername;
+}
+
+var isItMe; // fake static
+var getIsItMe = function()
+{
+ if (isItMe) return isItMe;
+ var header;
+ if ((header = _gt('h1')) && header[0].innerHTML.match(/\s*Your photos\s*/)) isItMe = true;
+ else isItMe = false;
+
+ return isItMe;
+}
+
+var subMenu = false; // fake static
+var appendSubMenuLink = function(label, href, nosep)
+{
+ if (!subMenu) subMenu = xpathFirst("//table[@id='SubNav']//p[@class='Links']");
+ if (!subMenu) return false;
+
+ if (typeof href == 'function') {
+ link = _ce('a');
+ link.href = '';
+ link.addEventListener('click', href, true);
+ link.innerHTML = label;
+ } else {
+ link = _ce('a');
+ link.href = href;
+ link.innerHTML = label;
+ }
+
+ if (!nosep) {
+ img = _ce('img');
+ img.src = '/images/subnavi_dots.gif';
+ img.alt = '';
+ img.width = '1';
+ img.height = '11';
+
+ subMenu.appendChild(img);
+ }
+
+ subMenu.appendChild(link);
+}
+
+var appendSubMenuNewline = function()
+{
+ if (!subMenu) subMenu = xpathFirst("//table[@id='SubNav']//p[@class='Links']");
+ if (!subMenu) return false;
+
+ subMenu.appendChild(_ce('br'));
+}
+
+var go = function()
+{
+ // the include wildcards match too many pages. we don't want individual photo pages or some other sub pages.
+ //var noPhotosRE = /.*\/photos\/([^\/]+)(\/|\/sets\/|\/tags\/|\/archives\/.*|\/favorites\/)/gi;
+ //if (!document.location.href.match(noPhotosRE)) return;
+
+ // nevermind the above; any page with the subnav should be fine
+ if (!_gi('SubNav')) return;
+
+ if (getUserId()) {
+ if (doShowPopularLink && !getIsItMe()) appendSubMenuLink('Popular', 'http://interestingby.isaias.com.mx/pm.php?id=' + getUserId() + '&theme=white');
+ if (doShowScoutLink) appendSubMenuLink('Scout', 'http://flagrantdisregard.com/flickr/scout.php?username=' + getUserId() + '&sort=date&year=0');
+ if (doShowLeechLink) appendSubMenuLink('Leech', 'http://www.flickrleech.net/nsid/' + getUserId());
+ if (!getIsItMe() && (doShowYourFavsOfTheirs || doShowTheirFavsOfYours)) appendSubMenuNewline();
+ if (doShowYourFavsOfTheirs && !getIsItMe() && getMyUsername() && getUsername()) appendSubMenuLink(getUsername() + '\'s&nbsp;Fav\'d&nbsp;by&nbsp;You', 'http://flagrantdisregard.com/flickr/favorites.php?user1=' + getUserId() + '&user2=' + getMyUsername() + '&button=Go', true);
+ if (doShowTheirFavsOfYours && !getIsItMe() && getMyUsername() && getUsername()) appendSubMenuLink('Yours&nbsp;Fav\'d&nbsp;by&nbsp;' + getUsername(), 'http://flagrantdisregard.com/flickr/favorites.php?user1=' + getMyUsername() + '&user2=' + getUserId() + '&button=Go', !doShowYourFavsOfTheirs);
+ } else {
+ GM_log("Could not determine user's ID.");
+ }
+}
+
+go();
+
+})();
737 _input/betterflickr/user_scripts/photomagnifier.user.js
@@ -0,0 +1,737 @@
+// Flickr Photo Magnifier
+// Copyright (c) 2007, Pierre Andrews.
+// Released under the GPL license
+// http://www.gnu.org/copyleft/gpl.html
+//
+// ==UserScript==
+// @name Flickr Photo Magnifier
+// @namespace http://6v8.gamboni.org/Flickr-Photo-Magnifier.html
+// @description Add a magnifier to the photo pages. Click+mouse drag will zoom in and out. You can configure the quality of the image through the greasemonkey user script menu. (magnifier code by Janos Pal Toth).
+// @version 1.4
+// @date 2008-03-30
+// @creator Pierre Andrews (mortimer.pa@free.fr)
+// @include http://*flickr.com/photos/*/*
+// @exclude http://*flickr.com/photos/*/organize*
+// @exclude http://*flickr.com/photos/*/tags*
+
+// @author Pierre Andrews (mortimer.pa@free.fr)
+// @homepage http://6v8.gamboni.org/Flickr-Photo-Magnifier.html
+// @enabledbydefault true
+// ==/UserScript==
+
+
+
+(function () {
+
+
+ function M8_log() {
+ if(unsafeWindow.console)
+ unsafeWindow.console.log(arguments);
+ else
+ GM_log(arguments);
+ }
+
+ function $x1(xpath) {
+ return document.evaluate(
+ xpath,
+ document,
+ null,
+ XPathResult.FIRST_ORDERED_NODE_TYPE, null
+ ).singleNodeValue;
+ }
+
+
+ /***********************************************************************
+ * Flickr Localisation
+ **********************************************************************/
+
+ var FlickrLocaliser = function(locals) {
+ this.init(locals);
+ }
+ FlickrLocaliser.prototype = {
+ selectedLang: undefined,
+ localisations: undefined,
+ getLanguage: function() {
+ if(!this.selectedLang) {
+ var langA = $x1("//p[@class='LanguageSelector']//a[contains(@class,'selected')]");
+ if(langA) {
+ var matches = /\/change_language.gne\?lang=([^&]+)&.*/.exec(langA.href);
+ if(matches && matches[1]) {
+ this.selectedLang = matches[1];
+ return this.selectedLang;
+ }
+ }
+ return false;
+ } else return this.selectedLang;
+ },
+
+ init: function(locals) {
+ this.localisations = locals;
+ },
+
+ localise: function(string, params) {
+ if(this.localisations && this.getLanguage()) {
+ var currentLang = this.localisations[this.selectedLang];
+ if(!currentLang) currentLang = this.localisations[this.localisations.defaultLang];
+ var local = currentLang[string];
+ if(!local) {
+ local = this.localisations[this.localisations.defaultLang][string];
+ }
+ if(!local) return string;
+ for(arg in params) {
+ var rep = new RegExp('@'+arg+'@','g');
+ local = local.replace(rep,params[arg]);
+ }
+ local =local.replace(/@[^@]+@/g,'');
+ return local;
+ } else return undefined;
+ }
+
+ }
+
+ /*****************************Flickr Localisation**********************/
+
+
+ var localiser = new FlickrLocaliser({
+ 'en-us' : {
+ 'loading' : 'loading ...',
+ 'switch' : 'switch on/off magnifier',
+ 'about' : 'The Flickr Magnifier is a little tool to add in place magnifier on flickr images. The original magnifier code has been provided by @jpl@, you can make him a donation at:@paypal@ The adaptation to Flickr photos has been made by @pa@.',
+ 'lower_quality' : 'Use lower quality zoom',
+ 'magnifier_width' : 'Magnifier width',
+ 'magnifier_height' : 'Magnifier height',
+ 'quality_note' : 'If you choose to use a lower quality zoom, the loading time for the magnifier will be faster, but the definition of the magnified area will be less',
+ 'menu_item' : 'Configure Flickr Photo Magnifier',
+ 'save' : 'Save',
+ 'cancel' : 'Cancel',
+ },
+ 'fr-fr': {
+ // A
+ 'about' : 'La Loupe Flickr (Flickr Magnifier) est un petit outil qui offre une loupe pour les images Flickr. Le code original de la loupe &agrave; &eacute;t&eacute; &eacute;crit par @jp@, vous pouvez lui faire un don &agrave;: @paypal@.L\'adaptation aux photos Flickr &agrave; &eacute;t&eacute; cod&eacute;e par @pa@.',
+ // C
+ 'cancel' : 'Annuler',
+ // L
+ 'loading' : 'Chargement ...',
+ 'lower_quality' : 'Utiliser une image de petite qualit&eacute;',
+ // M
+ 'magnifier_height' : 'Hauteur de la loupe',
+ 'magnifier_width' : 'Largeur de la loupe',
+ 'menu_item' : 'Configurer la Loupe Flickr',
+ // Q
+ 'quality_note' : 'Si vous utilisez une qualit&eacute; d\'image plus petite, le temps de chargement sera plus rapide, mais la qualit&eacute; de la loupe sera moindre',
+ // S
+ 'save' : 'Sauver',
+ 'switch' : 'Activer/D&eacute;sactiver la loupe'
+ },
+ defaultLang: 'en-us'
+ });
+
+ //**********************************************************************
+
+// TJPzoom 3 * János Pál Tóth
+// 2007.05.18
+// Docs @ http://valid.tjp.hu/tjpzoom/
+// News @ http://tjpzoom.blogspot.com/
+
+function TJPzoomswitch(obj) {
+ TJPon[obj]=((TJPon[obj])?(0):(1));
+ return TJPon[obj];
+}
+
+function TJPzoomif(obj,highres) {
+ if(TJPon[obj]) {TJPzoom(obj,highres);}
+}
+function TJPzoom(obj,highres) {
+ TJPzoomratio=TJPzoomheight/TJPzoomwidth;
+ if(TJPzoomoffsetx > 1) {
+ TJPzoomoffset='dumb';
+ TJPzoomoffsetx=TJPzoomoffsetx/TJPzoomwidth;
+ TJPzoomoffsety=TJPzoomoffsety/TJPzoomheight;
+ }
+ if(!obj.style.width) {
+ if(obj.width > 0) {
+ //educated guess
+ obj.style.width=obj.width+'px';
+ obj.style.height=obj.height+'px';
+ }
+ }
+ if(typeof(highres) != typeof('')) {highres=obj.src}
+ var TJPstage=document.createElement("div");
+ TJPstage.style.width=obj.style.width;
+ TJPstage.style.height=obj.style.height;
+ TJPstage.style.overflow='hidden';
+ TJPstage.style.position='absolute';
+ if(typeof(TJPstage.style.filter) != typeof(nosuchthing)) {
+ //hi IE
+ if(navigator.appVersion.indexOf('Mac') == -1) { //hi Mac IE
+ TJPstage.style.filter='alpha(opacity=0)';
+ TJPstage.style.backgroundColor='#ffffff';
+ }
+ } else {
+ //hi decent gentlemen
+ TJPstage.style.backgroundImage='transparent';
+ }
+ TJPstage.addEventListener('mousemove',function(event) {TJPhandlemouse(event,this);},true);
+ TJPstage.addEventListener('mousedown',function(event) {TJPhandlemouse(event,this);},true);
+ TJPstage.addEventListener('mouseup',function(event) {TJPhandlemouse(event,this);},true);
+ TJPstage.addEventListener('mouseout',function(event) {TJPhandlemouse(event,this);},true);
+
+ if(navigator.userAgent.indexOf('MSIE')>-1) {
+ TJPstage.onmousemove = function() {TJPhandlemouse(event,this);}
+ TJPstage.onmousedown = function() {TJPhandlemouse(event,this);}
+ TJPstage.onmouseup = function() {TJPhandlemouse(event,this);}
+ TJPstage.onmouseout = function() {TJPhandlemouse(event,this);}
+ }
+ obj.parentNode.insertBefore(TJPstage,obj);
+
+ TJPwin=document.createElement("div");
+ TJPwin.style.width='0px';
+ TJPwin.style.height='0px';
+ TJPwin.style.overflow='hidden';
+ TJPwin.style.position='absolute';
+ TJPwin.style.display='none';
+ tw1='<div style="position:absolute;overflow:hidden;margin:';
+ TJPwin.innerHTML=
+ tw1+TJPshadowthick+'px 0 0 '+TJPshadowthick+'px; background-color:'+TJPbordercolor+'; width:'+(TJPzoomwidth-TJPshadowthick*2)+'px;height:'+(TJPzoomheight-TJPshadowthick*2)+'px"></div>' +
+ tw1+(TJPshadowthick+TJPborderthick)+'px 0 0 '+(TJPshadowthick+TJPborderthick)+'px; width:'+(TJPzoomwidth-TJPshadowthick*2-TJPborderthick*2)+'px;height:'+(TJPzoomheight-TJPshadowthick*2-TJPborderthick*2)+'px;"><img src="'+highres+'" style="margin:0;padding:0;border:0; width:'+(TJPzoomamount*parseInt(obj.style.width))+'px;height:'+(TJPzoomamount*parseInt(obj.style.height))+'px;" '+((highres != obj.src)?('onload="if(this.parentNode) {this.parentNode.parentNode.getElementsByTagName(\'div\')[2].style.display=\'none\';}"'):(''))+'/></div>';
+ if(highres != obj.src) {
+ TJPwin.innerHTML+='<div style="position:absolute; margin:'+(TJPshadowthick+TJPborderthick)+'px 0 0 '+(TJPshadowthick+TJPborderthick)+'px;">'+TJPloading+'</div>';
+ }
+ if(TJPshadowthick>0) {
+ st1='<span style="position:absolute; display:inline-block; margin: ';
+ st2='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=\'scale\',src='
+ st3='filter:alpha(opacity=0);margin:0;padding:0;border:0;"/></span>';
+ TJPwin.innerHTML+=
+ st1+'0 0 0 0 ; width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st2+'\''+shadowNW+'.png\')"><img src="'+shadowNW+'.png" style="width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st3 +
+ st1+'0 0 0 '+(TJPzoomwidth-TJPshadowthick*2)+'px; width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st2+'\''+shadowNE+'.png\')"><img src="'+shadowNE+'.png" style="width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st3 +
+ st1+''+(TJPzoomheight-TJPshadowthick*2)+'px 0 0 0px; width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st2+'\''+shadowSW+'.png\',sizingMethod=\'scale\')"><img src="'+shadowSW+'.png" style="width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st3 +
+ st1+''+(TJPzoomheight-TJPshadowthick*2)+'px 0 0 '+(TJPzoomwidth-TJPshadowthick*2)+'px; width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st2+'\''+shadowSE+'.png\',sizingMethod=\'scale\')"><img src="'+shadowSE+'.png" style="width:'+TJPshadowthick*2+'px; height:'+TJPshadowthick*2+'px;'+st3 +
+ st1+'0 0 0 '+(TJPshadowthick*2)+'px; width:'+(TJPzoomwidth-TJPshadowthick*4)+'px; height:'+TJPshadowthick*2+'px;'+st2+'\''+shadowN+'.png\',sizingMethod=\'scale\')"><img src="'+shadowN+'.png" style="width:'+(TJPzoomwidth-TJPshadowthick*4)+'px; height:'+TJPshadowthick*2+'px;'+st3 +
+ st1+''+(TJPshadowthick*2)+'px 0 0 0; width:'+(TJPshadowthick*2)+'px; height:'+(TJPzoomheight-TJPshadowthick*4)+'px;'+st2+'\''+shadowW+'.png\',sizingMethod=\'scale\')"><img src="'+shadowW+'.png" style="width:'+(TJPshadowthick*2)+'px; height:'+(TJPzoomheight-TJPshadowthick*4)+'px;'+st3 +
+ st1+''+(TJPshadowthick*2)+'px 0 0 '+(TJPzoomwidth-TJPshadowthick*2)+'px; width:'+(TJPshadowthick*2)+'px; height:'+(TJPzoomheight-TJPshadowthick*4)+'px;'+st2+'\''+shadowE+'.png\',sizingMethod=\'scale\')"><img src="'+shadowE+'.png" style="width:'+(TJPshadowthick*2)+'px; height:'+(TJPzoomheight-TJPshadowthick*4)+'px;'+st3 +
+ st1+''+(TJPzoomheight-TJPshadowthick*2)+'px 0 0 '+(TJPshadowthick*2)+'px; width:'+(TJPzoomwidth-TJPshadowthick*4)+'px; height:'+TJPshadowthick*2+'px;'+st2+'\''+shadowS+'.png\',sizingMethod=\'scale\')"><img src="'+shadowS+'" style="width:'+(TJPzoomwidth-TJPshadowthick*4)+'px; height:'+TJPshadowthick*2+'px;'+st3;
+ }
+ ;
+ //marker - zoomer
+ obj.parentNode.insertBefore(TJPwin,TJPstage);
+
+ //TJPmark=document.createElement("div");
+ //TJPmark.style.width=(TJPzoomwidth-TJPborderthick*2-TJPshadowthick*2)/TJPzoomamount+'px';
+ //TJPmark.style.height=(TJPzoomheight-TJPborderthick*2-TJPshadowthick*2)/TJPzoomamount+'px';
+ //TJPmark.style.margin='30px 0 0 50px';
+ //TJPmark.style.position='absolute';
+ //TJPmark.style.backgroundColor='#ffee00';
+ //TJPmark.style.opacity='.3';
+
+ //obj.parentNode.insertBefore(TJPmark,TJPstage);
+
+
+ TJPresize(obj);
+}
+
+function TJPresize(obj) {
+ sbr=0; sbl=0;
+ if(TJPzoomwidth-2*TJPborderthick-3*TJPshadowthick < 22) {sbr=1}
+ if(TJPzoomheight-2*TJPborderthick-3*TJPshadowthick < 22) {sbr=1}
+ if(TJPzoomwidth > parseFloat(obj.style.width)) {sbl=1;}
+ if(TJPzoomheight > parseFloat(obj.style.height)) {sbl=1}
+
+ if(sbr==1 && sbl == 1) {
+ TJPzoomwidth=parseFloat(obj.style.width)/2;
+ TJPzoomheight=parseFloat(obj.style.height)/2;
+ TJPzoomratio=TJPzoomheight/TJPzoomwidth;
+ }
+
+ if(sbr==1) {
+ if(TJPzoomwidth<TJPzoomheight) {
+ TJPzoomheight=TJPzoomheight/TJPzoomwidth*(22+2*TJPborderthick+3*TJPshadowthick); TJPzoomwidth=22+2*TJPborderthick+3*TJPshadowthick;
+ } else {
+ TJPzoomwidth=TJPzoomwidth/TJPzoomheight*(22+2*TJPborderthick+3*TJPshadowthick); TJPzoomheight=22+2*TJPborderthick+3*TJPshadowthick;
+ }
+ }
+
+
+ if(sbl==1) {
+ if(parseFloat(obj.style.width)/parseFloat(obj.style.height) > TJPzoomwidth/TJPzoomheight) {
+ TJPzoomheight=parseFloat(obj.style.height);
+ TJPzoomwidth=TJPzoomheight/TJPzoomratio;
+ } else {
+ TJPzoomwidth=parseFloat(obj.style.width);
+ TJPzoomheight=TJPzoomratio*TJPzoomwidth;
+ }
+ }
+
+ TJPzoomwidth=Math.floor(TJPzoomwidth/2)*2;
+ TJPzoomheight=Math.floor(TJPzoomheight/2)*2;
+
+ ww=obj.parentNode.getElementsByTagName('div')[0];
+ ww.style.width=TJPzoomwidth+'px';
+ ww.style.height=TJPzoomheight+'px';
+ w=ww.getElementsByTagName('div')[0];
+ w.style.width=TJPzoomwidth-TJPshadowthick*2+'px';
+ w.style.height=TJPzoomheight-TJPshadowthick*2+'px';
+ w=ww.getElementsByTagName('div')[1];
+ w.style.width=TJPzoomwidth-TJPshadowthick*2-TJPborderthick*2+'px';
+ w.style.height=TJPzoomheight-TJPshadowthick*2-TJPborderthick*2+'px';
+ if(TJPshadowthick > 0) {
+ w=ww.getElementsByTagName('span')[1]; w.style.margin='0 0 0 '+(TJPzoomwidth-TJPshadowthick*2)+'px';
+ w=ww.getElementsByTagName('span')[2]; w.style.margin=(TJPzoomheight-TJPshadowthick*2)+'px 0 0 0px';
+ w=ww.getElementsByTagName('span')[3]; w.style.margin=(TJPzoomheight-TJPshadowthick*2)+'px 0 0 '+(TJPzoomwidth-TJPshadowthick*2)+'px';
+
+ w=ww.getElementsByTagName('span')[6]; w.style.margin=(TJPshadowthick*2)+'px 0 0 '+(TJPzoomwidth-TJPshadowthick*2)+'px';
+ w=ww.getElementsByTagName('span')[7]; w.style.margin=(TJPzoomheight-TJPshadowthick*2)+'px 0 0 '+(TJPshadowthick*2)+'px';
+
+ www=(TJPzoomwidth-TJPshadowthick*4)+'px';
+ w=ww.getElementsByTagName('span')[4]; w.style.width=www;
+ w=w.getElementsByTagName('img')[0]; w.style.width=www;
+ w=ww.getElementsByTagName('span')[7]; w.style.width=www;
+ w=w.getElementsByTagName('img')[0]; w.style.width=www;
+
+ www=(TJPzoomheight-TJPshadowthick*4)+'px';
+ w=ww.getElementsByTagName('span')[5]; w.style.height=www;
+ w=w.getElementsByTagName('img')[0]; w.style.height=www;
+ w=ww.getElementsByTagName('span')[6]; w.style.height=www;
+ w=w.getElementsByTagName('img')[0]; w.style.height=www;
+ }
+}
+
+function TJPfindposy(obj) {
+ var curtop = 0;
+ if(!obj) {return 0;}
+ if (obj.offsetParent) {
+ while (obj.offsetParent) {
+ curtop += obj.offsetTop
+ obj = obj.offsetParent;
+ }
+ } else if (obj.y) {
+ curtop += obj.y;
+ }
+ return curtop;
+}
+
+function TJPfindposx(obj) {
+ var curleft = 0;
+ if(!obj) {return 0;}
+ if (obj && obj.offsetParent) {
+ while (obj.offsetParent) {
+ curleft += obj.offsetLeft
+ obj = obj.offsetParent;
+ }
+ } else if (obj.x) {
+ curleft += obj.x;
+ }
+ return curleft;
+}
+
+
+function TJPhandlemouse(evt,obj) {
+ var evt = evt?evt:window.event?window.event:null; if(!evt) { return false; }
+ if(evt.pageX) {
+ nowx=evt.pageX-TJPfindposx(obj)-TJPadjustx;
+ nowy=evt.pageY-TJPfindposy(obj)-TJPadjusty;
+ } else {
+ if(document.documentElement && document.documentElement.scrollTop) {
+ nowx=evt.clientX+document.documentElement.scrollLeft-TJPfindposx(obj)-TJPadjustx;
+ nowy=evt.clientY+document.documentElement.scrollTop-TJPfindposy(obj)-TJPadjusty;
+ } else {
+ nowx=evt.x+document.body.scrollLeft-TJPfindposx(obj)-TJPadjustx;
+ nowy=evt.y+document.body.scrollTop-TJPfindposy(obj)-TJPadjusty;
+ }
+ }
+ if(evt.type == 'mousemove') {
+ TJPsetwin(obj,nowx,nowy);
+ } else if(evt.type == 'mousedown') {
+ TJPmouse=1; //left: 1, middle: 2, right: 3
+ TJPmousey=nowy;
+ TJPmousex=nowx;
+ } else if(evt.type =='mouseup') {
+ TJPmouse=0;
+ } else if(evt.type =='mouseout') {
+ TJPmouse=0;
+ if(navigator.appVersion.indexOf('Mac') == -1 || navigator.appVersion.indexOf('MSIE') == -1) { //hi Mac IE
+ x=obj.parentNode;
+ x.removeChild(x.getElementsByTagName('div')[0]);
+ x.removeChild(x.getElementsByTagName('div')[0]);
+ //x.removeChild(x.getElementsByTagName('div')[0]); //AAAAAAAAAAAAAAAAAAAAAAAAAA
+ }
+ }
+}
+
+
+// TJPzoom 3 * János Pál Tóth
+// Docs @ http://valid.tjp.hu/tjpzoom/
+// News @ http://tjpzoom.blogspot.com/
+
+
+function TJPsetwin(obj,nowx,nowy) {
+ obj.parentNode.getElementsByTagName('div')[0].style.display='block';
+ if(TJPzoomoffset=='smart') {
+ TJPzoomoffsetx=nowx/parseFloat(obj.style.width);
+ TJPzoomoffsety=nowy/parseFloat(obj.style.height);
+ }
+
+ stage=obj.parentNode.getElementsByTagName('div')[0];
+ if(TJPmouse == 1) {
+ if(Math.abs(nowy-TJPmousey) >= 1) {
+ TJPzoomamount*=((nowy>TJPmousey)?(0.909):(1.1));
+ TJPmousey=nowy;
+ if(TJPzoomamount < TJPzoomamountmin) {TJPzoomamount=TJPzoomamountmin;}
+ if(TJPzoomamount > TJPzoomamountmax) {TJPzoomamount=TJPzoomamountmax;}
+ stage.getElementsByTagName('div')[1].getElementsByTagName('img')[0].style.width= parseInt(obj.style.width)*TJPzoomamount+'px';
+ stage.getElementsByTagName('div')[1].getElementsByTagName('img')[0].style.height= parseInt(obj.style.height)*TJPzoomamount+'px';
+ }
+ if(Math.abs(nowx-TJPmousex) >= 12 && TJPzoomwindowlock==0) {
+ TJPzoomwidth*=((nowx>TJPmousex)?(1.1):(0.909));
+ TJPzoomheight=TJPzoomwidth*TJPzoomratio;
+ TJPresize(obj);
+ TJPmousex=nowx;
+ }
+ }
+ stage.style.marginLeft=nowx-(TJPzoomwidth -2*TJPborderthick-2*TJPshadowthick)*TJPzoomoffsetx-TJPborderthick-TJPshadowthick+'px';
+ stage.style.marginTop= nowy-(TJPzoomheight-2*TJPborderthick-2*TJPshadowthick)*TJPzoomoffsety-TJPborderthick-TJPshadowthick+'px';
+ clip1=0; clip2=TJPzoomwidth; clip3=TJPzoomheight; clip4=0;
+ nwidth=TJPzoomwidth; nheight=TJPzoomheight;
+ /*tmp=(1-2*TJPzoomoffsetx)*(TJPborderthick+TJPshadowthick);
+
+ if(nowx-TJPzoomwidth*TJPzoomoffsetx < tmp) {
+ clip4=TJPzoomwidth*TJPzoomoffsetx-nowx + tmp;
+ } else if(parseFloat(nowx-TJPzoomwidth*TJPzoomoffsetx+TJPzoomwidth) > parseFloat(obj.style.width)+tmp) {
+ clip2= TJPzoomwidth*TJPzoomoffsetx - nowx + parseFloat(obj.style.width)+tmp;
+ nwidth=TJPzoomwidth*TJPzoomoffsetx-nowx+parseInt(obj.style.width)+TJPborderthick+TJPshadowthick;
+ }
+
+ tmp=(1-2*TJPzoomoffsety)*(TJPborderthick+TJPshadowthick);
+
+ if(nowy-TJPzoomheight*TJPzoomoffsety < tmp) {
+ clip1=TJPzoomheight*TJPzoomoffsety-nowy+tmp;
+ } else if(parseFloat(nowy-TJPzoomheight*TJPzoomoffsety+TJPzoomheight) > parseFloat(obj.style.height)+tmp) {
+ clip3= TJPzoomheight*TJPzoomoffsety - nowy + parseFloat(obj.style.height)+tmp;
+ nheight=TJPzoomheight*TJPzoomoffsety - nowy + parseFloat(obj.style.height)+TJPborderthick+TJPshadowthick;
+ }*/
+ stage.style.width=nwidth+'px';
+ stage.style.height=nheight+'px';
+
+ // stage.style.clip='rect('+clip1+'px,'+clip2+'px,'+clip3+'px,'+clip4+'px)';
+
+ if(nowy-TJPzoomoffsety*(TJPzoomheight-2*TJPborderthick-2*TJPshadowthick) < 0) { t=-(nowy-TJPzoomoffsety*(TJPzoomheight-2*TJPborderthick-2*TJPshadowthick))}
+ else if(nowy-TJPzoomoffsety*(TJPzoomheight-2*TJPborderthick-2*TJPshadowthick) > parseFloat(obj.style.height)-TJPzoomheight+TJPborderthick*2+TJPshadowthick*2) { t=-TJPzoomamount*parseFloat(obj.style.height)+TJPzoomheight-TJPborderthick*2-TJPshadowthick*2-((nowy-TJPzoomoffsety*(TJPzoomheight-2*TJPborderthick-2*TJPshadowthick))-(parseFloat(obj.style.height)-TJPzoomheight+TJPborderthick*2+TJPshadowthick*2)); }
+ else { t=(-TJPzoomamount*parseFloat(obj.style.height)+TJPzoomheight-TJPborderthick*2-TJPshadowthick*2)/(parseFloat(obj.style.height)-TJPzoomheight+TJPborderthick*2+TJPshadowthick*2)*(nowy-TJPzoomoffsety*(TJPzoomheight-2*TJPborderthick-2*TJPshadowthick)) }
+ stage.getElementsByTagName('div')[1].getElementsByTagName('img')[0].style.marginTop=t+'px';
+
+ if(nowx-TJPzoomoffsetx*(TJPzoomwidth-2*TJPborderthick-2*TJPshadowthick) < 0) { t=-(nowx-TJPzoomoffsetx*(TJPzoomwidth-2*TJPborderthick-2*TJPshadowthick))}
+ else if(nowx-TJPzoomoffsetx*(TJPzoomwidth-2*TJPborderthick-2*TJPshadowthick) > parseFloat(obj.style.width)-TJPzoomwidth+TJPborderthick*2+TJPshadowthick*2) { t=-TJPzoomamount*parseFloat(obj.style.width)+TJPzoomwidth-TJPborderthick*2-TJPshadowthick*2-((nowx-TJPzoomoffsetx*(TJPzoomwidth-2*TJPborderthick-2*TJPshadowthick))-(parseFloat(obj.style.width)-TJPzoomwidth+TJPborderthick*2+TJPshadowthick*2)); }
+ else { t=(-TJPzoomamount*parseFloat(obj.style.width)+TJPzoomwidth-TJPborderthick*2-TJPshadowthick*2)/(parseFloat(obj.style.width)-TJPzoomwidth+TJPborderthick*2+TJPshadowthick*2)*(nowx-TJPzoomoffsetx*(TJPzoomwidth-2*TJPborderthick-2*TJPshadowthick)) }
+ stage.getElementsByTagName('div')[1].getElementsByTagName('img')[0].style.marginLeft=t+'px';
+
+
+ //document.getElementsByTagName('h1')[0].innerHTML=;
+}
+
+function TJPinit() {
+ TJPadjustx=0; TJPadjusty=0;
+ if(navigator.userAgent.indexOf('MSIE')>-1) {TJPadjustx=2;TJPadjusty=2;}
+ if(navigator.userAgent.indexOf('Opera')>-1) {TJPadjustx=0; TJPadjusty=0;}
+ if(navigator.userAgent.indexOf('Safari')>-1) {TJPadjustx=1; TJPadjusty=2;}
+}
+
+// configuration - do not modify the following, instead read the behaviors.html file in the tutorial!
+var TJPon=new Array();
+var TJPadjustx,TJPadjusty;
+var TJPmouse=0; var TJPmousey;
+var TJPloading='<div style="background-color: #ffeb77; color: #333333; padding:2px; font-family: verdana,arial,helvetica; font-size: 10px;">'+localiser.localise('loading')+'</div>';
+
+var TJPzoomwidth= 160;
+var TJPzoomheight= 120;
+var TJPzoomratio;
+var TJPzoomwindowlock=0;
+
+var TJPzoomoffsetx=TJPzoomwidth/2;
+var TJPzoomoffsety=TJPzoomheight/2;
+var TJPzoomoffset;
+
+var TJPzoomamount=4;
+var TJPzoomamountmax=12;
+var TJPzoomamountmin=1;
+
+var TJPborderthick=1;
+var TJPbordercolor='#000000';
+
+var TJPshadowthick=8;
+
+var shadowN = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1E9%9A%24%FF%19%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%15IDATx%DAc%60%18%05%C3%000B%F1(%18%05%14%01%00%08%9E%00%03%83%17%0BH%00%00%00%00IEND%AEB%60%82";
+var shadowNE = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1C1%A6%C9%15%A9%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%88IDATx%DA%ED%90%CB%0A%830%10E%13M%AA(t%D7%AD%82%FF%FFk%BA%F0I%F1%11o%E0%06B7%8E%DB%E2%C0a%20d%CE%3C%94z%E2%0FB%93%3B%E1~%05W%F1b%3E%A2%EC%82(%15%08%DE%C0%02%03%92%A8%A9XP%81%1Cd%D1%FF%B0%863%02A%0DV%B0%80%01%F4%D1*%87D%D0%80%2F%18A%CB7%2F%DC%C0.%9D%C0w%EF8%FAL%99%CFZ%22%F8%80%89%C5%13%EFa%C3A%25%82%92%C5%05%0FiyL%2FP'%B6%E5%1E%5D%DCX%24%10%00%00%00%00IEND%AEB%60%82";
+var shadowE = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1D%0F~%B39C%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%2BIDATx%DAcd%20%0C%D6%02%F1%17%20~%05%C4%0F%80%F8%0E%94~%0D%12g%22%C2%00%BC%60%D4%80Q%03F%0D%18%2C%06%00%00l%95%07%26%D9%C2%1F%9D%00%00%00%00IEND%AEB%60%82";
+var shadowSE = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1D(%DB%B9%8C(%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%9EIDATx%DA%ED%92A%0E%83%20%10E%B11%3D%40%EF%7F%85%DE%C8%85k%9B%D8%C4%9AR%A32~%F0O3%2B%60%D5U'y%40L%E6%F1A%1AW%AE%3B%98%C1%00z%D0q~%C4%EF%97%0AA%B6%FE%82%1F%09%02%11%83%D3u%EB%CE%FF%9Ck%5E%C9%06v%23K%15%05sA%10%1B%DFd%A1LEI0d%04B%81%07O%F0%02%1FJ%82%1E%A1%2F%DC%C1%C6%9Dc%D2%91%92%C5%0A%BAB%02%E1%8E%9E%CD%93IQ%95%40xfM%E2m%82%06%C3%ADB%20lP%D1N%92%E0%EA%EA*%98%F9%FB%1E%0E%F1sO6%10%CB%E6%9B%00%00%00%00IEND%AEB%60%82";
+var shadowS = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1D8%C6%0E%9CL%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%000IDATx%DAc%60%18%05%A3%80%81%81%11%88%D7Rb%00%0B%10%7F%A1%D4%80W%94%1A%F0%80R%03%EE%0C%A8%0B%40%B1%20D%A9%01l%94%18%00%002V%05W%11%99%89%DE%00%00%00%00IEND%AEB%60%82";
+var shadowSW = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1E%13A%9F6%CF%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%89IDATx%DA%ED%92K%0A%800%0CD%5B%AB%A2%E0R%B7%BA%F0%FE%97%13%2B%FEu%22%11%A5%0B%1B%10%5C9%F0%08%FDM%9A%B4J%3DK%7B%D6U%E0%DB%F0%1B%7C%60%F0Z%DEw%86%22%90%81%02%94%A0%06%15%C8i%3E%14%26Z%C1%02%260%80%8E%D1F%D8'J%14%83%14%24%3C%26%8D%12%03*%D38%D0%8Dz%D0J%0D%EEq%E6%C3%164%92%1El%9Cq%B8%19X.%C3H%5E%C1-%23%E4H%BD%D1R%83%D3D%AB%EB%F3%1Dq%07%2C%D4%13%98%99%83%B5%22%00%00%00%00IEND%AEB%60%82";
+var shadowW = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1E%20%FEOW%D9%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%1CIDATx%DAc%60%C0%0F%18%09%C830%11R0j%C0%A8%01%A3%06%0C%15%03%00D%F0%00%20zzK%0C%00%00%00%00IEND%AEB%60%82";
+var shadowNW = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D7%04%1A%16%1E%2Fn%F0JH%00%00%00%09pHYs%00%00.%23%00%00.%23%01x%A5%3Fv%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%15IDATx%DAc%60%18%05%C3%000%D2I%CF(%18%E6%00%00%08n%00%03%9BHo7%00%00%00%00IEND%AEB%60%82";
+
+if(GM_getValue('zoomwidth')) {
+ TJPzoomwidth = GM_getValue('zoomwidth');
+ TJPzoomoffsetx=TJPzoomwidth/2
+}
+if(GM_getValue('zoomheight')) {
+ TJPzoomheight = GM_getValue('zoomheight');
+ TJPzoomoffsety=TJPzoomheight/2;
+}
+
+
+TJPinit();
+
+
+
+// TJPzoom 3 * J�nos P�l T�th
+// Docs @ http://valid.tjp.hu/tjpzoom/
+// News @ http://tjpzoom.blogspot.com/
+
+
+//**********************************************************************
+
+ //======================================================================
+ //to do the closure and get the right this.
+ //adapted from http://persistent.info/greasemonkey/gmail.user.js
+
+ function getObjectMethodClosure2(object, method,args,args1,args2) {
+ return function() {
+ return object[method](args,args1,args2);
+ }
+ }
+ function getObjectMethodClosure1(object, method,args,args1) {
+ return function() {
+ return object[method](args,args1);
+ }
+ }
+
+ function getObjectMethodClosure0(object, method,args) {
+ return function() {
+ return object[method](args);
+ }
+ }
+
+ function getObjectMethodClosure(object, method) {
+ return function(args) {
+ return object[method](args);
+ }
+ }
+
+ /*
+ Xpath trickery, from:
+ http://ecmanaut.blogspot.com/2006/07/expressive-user-scripts-with-xpath-and.html
+ */
+ function $x( xpath, root )
+ {
+ var doc = root ? root.evaluate?root:root.ownerDocument : document;
+ var got = doc.evaluate( xpath, root||doc, null, 0, null ), next;
+ var result = [];
+ while( next = got.iterateNext() )
+ result.push( next );
+ return result;
+ }
+
+
+ function $x1(xpath) {
+ return document.evaluate(
+ xpath,
+ document,
+ null,
+ XPathResult.FIRST_ORDERED_NODE_TYPE, null
+ ).singleNodeValue;
+ }
+
+ function foreach( xpath, cb, root )
+ {
+ var nodes = $x( xpath, root ), e = 0;
+ for( var i=0; i<nodes.length; i++ )
+ e += cb( nodes[i], i ) || 0;
+ return e;
+ }
+
+ var useLarge = !!GM_getValue('useLarge');
+
+ var init = function() {
+ var img_div = $x1("//div[@class='photoImgDiv']/img");
+
+ if(img_div && (img_div.parentNode.childNodes.length >= 1)) {
+ var med_width;
+ var med_height;
+ var med_src;
+ var big_width;
+ var big_height;
+ var big_src;
+ var found_large = false;
+ var listener = {
+ flickr_photos_getSizes_onLoad: function(success, responseXML, responseText, params){
+ try{
+ var rsp = responseText.replace(/jsonFlickrApi\(/,'');
+ rsp = eval('('+rsp);
+ if(rsp.stat == 'ok') {
+ var lrg_src;
+ var lrg_width;
+ for(var i=0;i<rsp.sizes.size.length;i++) {
+ var size = rsp.sizes.size[i];
+ if(size.label == 'Medium') {
+ med_src = size.source;
+ med_width = size.width;
+ } else if(size.label == 'Large') {
+ lrg_src = size.source;
+ lrg_width = size.width;
+ } else if(size.label == 'Original') {
+ big_src = size.source;
+ big_width = size.width;
+ }
+
+ }
+ if(lrg_src && ((!useLarge && !big_src) || useLarge)){
+ big_src = lrg_src;
+ big_width = lrg_width;
+ }
+
+ if(med_src && big_src) {
+ TJPzoomamount = big_width/med_width;
+ img_div.addEventListener('mouseover',function(event) {
+ TJPzoomif(img_div,big_src)
+ }
+ ,true);
+ var buttonBar = document.getElementById('button_bar');
+ if(buttonBar.childNodes.length > 5) {
+ buttonBar.style.height = "52px";
+ }
+ var divbut = buttonBar.appendChild(document.createElement('span'));
+ divbut.setAttribute('style','height:24px;font-size:90%;');
+ var magButton = divbut.appendChild(document.createElement('img'));
+ magButton.setAttribute('style','height:24px;');
+ //Icon by Janos Pal Toth
+ var offButton = magButton.src = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%001%00%00%00%18%08%02%00%00%00%DC%5D%82%B5%00%00%00%07tIME%07%D7%05%09%10%05%0E%F0%EE%3C%FF%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%011IDATx%DA%ED%96%C1%0E%820%0C%86%87%E1%19%7C%01O%5E%7C6%0F%5E%09%04%8Ez%F0%D9%E0%40H%F4%05%7C%89%D9%A4%A1%19m77c%00%13%FE%90%A5ec%7CiKGf%AD5%2B%D3ni%80%8D%E9k%E5%BE%89%5B%D3%A0q)%8A%E5%99%90%86P%98%3B%87%ECT%D7%BAF%A3%1D%C5%EE%A3%CA%B2%A4%91%19(f%93%2B%D7%CB%95z%3Du%5D%07%E3%BD%DD%A3%8D%AE%AA%AA%AA%5C%9BDS4%BAS%F2A%F7%CE%24w%90%26%C8%91Jp8%1EqV2%B9%AFa%BB%FB%E8%D9%83Lz%8Dc%84%C88%9F%5E%91%95%E0F%C57%F5q%13%9D%09!%00(%86F%86'%E6%C5%81Pe%EClq%D3GL%8Fax%F6%BD%99%EB%EB%D3k%1C%20(Zh%CF%06%A4%C4%C9%8C%0D%09%8A%1A%5D%8CP%18%8BeMM%A5%2C5o%99%5B%8F%A0!%D1%E5%BA%D6%2F%B5i%A9%AD%88%B5%2B%26%EFy%07!%A1%CB%88%B6%AE%86*%A9%B4%03%8B%13%CE%E0%00V%3C%10%CB%B5%AA%3Cv%9B%11%0B%81%24%04%EB%D7F%14P%02%B4M%97%AF%0E~%25%E5%BB%5B%5Ck%FC%A7%DB%98%FE%97%E9%0DW%1B94%E9%07%06%FD%00%00%00%00IEND%AEB%60%82";
+ var overButton = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%001%00%00%00%18%08%02%00%00%00%DC%5D%82%B5%00%00%00%07tIME%07%D7%05%09%10%05!%5B%3F%01%A6%00%00%00%09pHYs%00%00%0E%C3%00%00%0E%C3%01%C7o%A8d%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%01qIDATx%DA%ED%97%3DN%C40%10%85m%B4%02q%81%3DB%1A%24z~%9A%E5%0EHt%14%1C%83%9AKD%A2%A0C%E2%0ElC%B5%25%12H%7B%05.%80%A0%09%D6%3E%E9iv~%82%B3Bd%8B%7DE4%8E'%F1%E7%F1x%E2%E4%AE%EB%D26%A9m%DB%BD%B1%19%1C%ED%98%EA4%89%3A%0E%0F%F6a%7C~%7D%8F%CF%04%1A%A2%A8%E6%08L%85%00%C3%BF%BC%BE%C98%F1%3E%94s.%1B%16W6a%C0%01%BD%B4%D9e%FD%AD%A7%9FO%00%BA%BC%FF%80M%3E%2B%BE%8E%03%40%1C%40%8E-%87%97%0FJO%CD%84%60%B8%04w%0F%8F%CC0)5%CB%BCRD%AF8%22O%3F%C7%11!%1AO7%D3T'%B54n%D7%AF%2F%F1%99%00Q%80jh8c%95%16%F5%0F*%AD%AD%5DY%B8%B2%40%E7%C7G%CAi%F1%BE%BC%BD%BE%B2%93%E6%D8l2%99%14%9C%F5%8C%1CR%94%E3%05%82%D1%82%9D%FE%B1%1C%E8%B5C%A8%D2*%A9q%87%11R%E5%40%AAg%DB%A7%A0%0A%A4%20%ED%92%9BO%2CH%164%C2%92(%B6%F6%F4%D7%A4*%26IV%8F%15M%DA%9D%40%3F%D6%80o%B0%FA%DAl%06%24%E3%1Ai%D8%B9%80X%17%B3%99%C5b%DE%C0%E6%16%93%CD%1A%0D%3E%AB%14%AC%93%D3%B3%E7%F9%5C%CD%5BV%01%5B%11%DC%3D%1FQnr~R%40%7F%AEm%3C%D3%ED%98%EA4)%FF.c3%AC%A9i%9A%1F%A5%C3%3A%C6%DCQW%10%00%00%00%00IEND%AEB%60%82";
+ var onButton = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%001%00%00%00%18%08%06%00%00%00S%3F%15%E2%00%00%00%06bKGD%00%FF%00%FF%00%FF%A0%BD%A7%93%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%07tIME%07%D7%05%09%15%3B%15%3D%85%2C%85%00%00%01%ACIDATX%C3%ED%97%3Bn%C2%40%10%86%FFA%A9%B8%82%5Br%02%94%9E%0B%D0%A3%B4%96CI%C1%05r%01%0A%CA%80%DC%A2%F4%BE%00%A9%23N%90%B4%CE%11h7%05%5E%7Bv3%FB%B0-%25%8E%E4%91%2C%EF%5B%F3%CDxf%D6%C0(%C3%10%F2%CE%A6%9F%0F%00%A6l%E4%8A%7C%F6%FE%3F%20%1A%E53%00%09%9B)%01%1C%87%06C%0E%80%8DV%FE%25%DF.%F4%D4%3A%DD%9D%19%CC~(%20%E4%02%D0%CA%3F-%1F%EB%E9Cq%E20%83%01%B9%B3%FAS%0DP%2B_%7C%D4%93%F5X%BE%5DT%20%3C%5ETe%14%C5%8Cc%B7%B9%F1%94%60L%25%F4I8%DF%D87%B1%BC%90%19H%15%00%A5%AB%A6%CF%A0%00d%D5%3E%5B%94%D0'%F6%40x%F35%CAs%96%BD%8FA%D8%5E0%955d%8ED%C7Jby%C3gi%25(%24%C1%AB%C0Y%C1%CF%C9%DC%AD%3D%C0%DA*%7F%ED%1B%7F%CA%93%DA%C9a%7Dt%86%D0%0AS%BA%EA%A2%3C%B7%A0%8A%AEM%E1%B3~%C8%C4(d%40%B9Nw%E7Cq%02%96%F7%E2%86%0B%BEpA%E9%B3%229%C6H%00%A0%40%9B%22%D62%88%5B%AA%3C%DA%0As%8F%E8%BE%95f%AF%83%AF%13sV%B0m%0FD%D4%8B%984%1AJ%AD%A18jW%B1%B5%E2B%15%0F%15%3E_%0D%F1%D5%02r%40%F7%BA%3B%E9%2BG%D2%02DE%14%2F%D7%98%B4%A6%F7-V'%80M%24%88%EF%B3%88%F5%0E%FAA%F8%E1%5C%20%CF%C8go%BF%19%13%93N%107K%EFuJ%F6d%2B)%B5%BAR-y%8CK%DD%7F%8AZx%E4%2Fo%B5%D4%FB%84%26n%06%F9%D77%CA(-%E5%1B%DA%09%D6%07%83%D7%5C%25%00%00%00%00IEND%AEB%60%82";
+ magButton.alt = localiser.localise('switch');
+ magButton.addEventListener('mouseover', function() {
+ if(magButton.src != onButton) {
+ magButton.src = overButton;
+ }
+ },true);
+ magButton.addEventListener('mouseout', function() {
+ if(magButton.src != onButton) {
+ magButton.src = offButton;
+ }
+ },true);
+ divbut.addEventListener('click',function() {
+ if(TJPzoomswitch(img_div)) {
+ magButton.src=onButton;
+ img_div.parentNode.style.zIndex = 2000;
+ img_div.parentNode.style.position = 'relative';
+ } else {
+ magButton.src=offButton;
+ img_div.parentNode.style.zIndex = '';
+ img_div.parentNode.style.position = '';
+
+ }
+ }, true);
+ // divbut.appendChild(document.createTextNode('Flickr Magnifier'));
+ }
+ }
+ else
+ M8_log("Error2 "+responseText);
+ } catch (e) {
+ M8_log("Error1 "+responseText);
+ M8_log(e);
+ }
+ }
+ };
+
+
+ unsafeWindow.F.API.callMethod('flickr.photos.getSizes', {
+ photo_id: unsafeWindow.page_photo_id,
+ format: 'json'
+ }, listener);
+ }
+ };
+
+ var prompt_conf = function() {
+ var back = document.body.appendChild(document.createElement('div'));
+ back.id="poolCleaningBack";
+ back.setAttribute('style',"position:absolute;background-color: black;opacity: 0.35; display: block; left: 0pt;");
+ back.style.width = document.body.clientWidth+'px';
+ back.style.height = document.body.clientHeight+'px';
+ back.style.top = document.body.scrollTop+'px';
+ var modal = document.body.appendChild(document.createElement('div'));
+ modal.id="poolCleaning";
+ modal.setAttribute('style',"z-index:3000;position:absolute;background:white;border: 3px solid black;display: block;");
+ modal.style.width = (document.body.clientWidth*2/3) +'px';
+ modal.style.left = (document.body.clientWidth*1/6) +'px';
+ modal.innerHTML = '<div style="padding:12px;background-color: #EEEEEE;clear:both;font-size: 14px;">'+localiser.localise('menu_item')+'</div>';
+ modal.style.top = document.body.scrollTop+(document.body.clientHeight/2)+'px';
+
+ var dialog = modal.appendChild(document.createElement('div'));
+ dialog.setAttribute('style',"padding: 18px 16px;clear:both; width:70%;overflow:auto;margin-left:15%;");
+ var content = dialog.appendChild(document.createElement('div'));
+
+ var pAbout = content.appendChild(document.createElement("p"));
+ pAbout.setAttribute('style',"padding: 18px 16px;clear:both; width:100%;overflow:auto;");
+ pAbout.innerHTML = localiser.localise('about',{
+ 'jpl' : '<a href="http://valid.tjp.hu">J&aacute;nos P&aacute;l T&oacute;th</a>',
+ 'paypal' : '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input name="cmd" value="_s-xclick" type="hidden"><input src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!" border="0" type="image"><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" height="1" width="1"><input name="encrypted" value="-----BEGIN PKCS7-----MIIHLwYJKoZIhvcNAQcEoIIHIDCCBxwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYDA5c0QwIqmzvsrcelK+yJC8wxaiI/nV+kCj525jUdUADuSl9bfakUDmzheWkr+WiAVzqEs7B4P4b6jKZY9xxw478x3VbMLra4WfgNuvxYiw/2ZGkWogPUUF/OWmJ97e/hL5trrSACfP0fRs2jUaLlBFpisAI14Xf8uZkn/F981OTELMAkGBSsOAwIaBQAwgawGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQITabcZFJAqqCAgYgMTDRs7S2FtcbS0sWetXiZ3ZHdC+HOqrnt7qUzrMqJLo89Cj5VgVaQV+bbS7QAww6vqRX4p7bSwelYa3xq8KGySk3ExOvYAJ4GEfjnvzOemkzL1exmtjkd+/5GqaixmhCaEsZ9kYskalcKocqharFZzY2G6Ts1HxFYp7DFbhCbVJltwoAcmttsoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDYxMDA2MTM1MTMyWjAjBgkqhkiG9w0BCQQxFgQUuqvfyhAn1aMoSdFg7zMiOb4CvmcwDQYJKoZIhvcNAQEBBQAEgYCJ242PMy0Hr+zddkoLipMwkqL9N0U/RwO/M67tuKSZtiqZpwTjfHYLU9TsiXZbYQavMFvPxqjuf3OOrw+Jh5FdRbnkwHqa9thYvhMZH50LOgd3rvHu3Wyxd3rkSFYlNdTyz0CAv3JTfmzjaT8QM3CZMP9mHgV6NbNWLWKVD1gZRQ==-----END PKCS7-----" type="hidden"></form><br/>',
+ 'pa' : '<a href="http://6v8.gamboni.org">Pierre Andrews</a>'
+ });
+
+ var spanForm = content.appendChild(document.createElement("div"));
+ spanForm.setAttribute('style',"padding: 18px 16px;clear:both; width:100%;overflow:auto;");
+ spanForm.innerHTML = '<form><input type="checkbox" name="gm_mag_shoulduselarge" id="gm_mag_shoulduselarge" '+(useLarge?'checked="on"':'')+'/><label for="gm_mag_shoulduselarge">'+localiser.localise('lower_quality')+'*.</label><br/><input name="gm_mag_zoomwidth" id="gm_mag_zoomwidth" value="'+TJPzoomwidth+'"/><label for="gm_mag_zoomwidth">'+localiser.localise('magnifier_width')+'.</label><br/><input name="gm_mag_zoomheight" id="gm_mag_zoomheight" value="'+TJPzoomheight+'"/><label for="gm_mag_zoomheight">'+localiser.localise('magnifier_height')+'.</label></form><p>(*)'+localiser.localise('quality_note')+'.</p>'
+
+ var buttons = dialog.appendChild(document.createElement('div'));
+ var ok = buttons.appendChild(document.createElement('button'));
+ ok.type ='button';
+ ok.className='Butt';
+ ok.innerHTML = localiser.localise('save');
+ var cancel = buttons.appendChild(document.createElement('button'));
+ cancel.type ='button';
+ cancel.className = 'Butt';
+ cancel.innerHTML = localiser.localise('cancel');
+
+ cancel.addEventListener('click',function() {
+ document.body.removeChild(back);
+ document.body.removeChild(modal);
+ },true);
+
+
+ ok.addEventListener('click',function() {
+ var inp = document.getElementById("gm_mag_shoulduselarge");
+ if(inp) {
+ GM_setValue('useLarge',inp.checked);
+ useLarge = inp.checked;
+ }
+ inp = document.getElementById("gm_mag_zoomheight");
+ if(inp) {
+ GM_setValue('zoomheight',inp.value);
+ TJPzoomheight = inp.value;
+ TJPzoomoffsety=TJPzoomheight/2;
+ }
+ inp = document.getElementById("gm_mag_zoomwidth");
+ if(inp) {
+ GM_setValue('zoomwidth',inp.value);
+ TJPzoomwidth = inp.value;
+ TJPzoomoffsetx=TJPzoomwidth/2;
+ }
+
+
+ document.body.removeChild(back);
+ document.body.removeChild(modal);
+ },true);
+
+ modal.style.top = document.body.scrollTop+((document.body.clientHeight-modal.scrollHeight)/2)+'px';
+ };
+ GM_registerMenuCommand( localiser.localise("menu_item"), prompt_conf);
+
+
+ //======================================================================
+
+
+ try {
+ window.addEventListener("load", function () {
+ init();
+ }, false);
+ } catch (ex) {}
+
+
+})();
151 _input/betterflickr/user_scripts/photopageenhancer.user.js
@@ -0,0 +1,151 @@
+// ==UserScript==
+// @name Flickr Photo Page Enhancer
+// @description Adds links to different sizes directly to a Flickr photo page, generates html code to easily copy'n paste thumbnail & description, and automatically loads your 20 most used tags when you click "Add Tag."
+// @namespace http://www.rhyley.org/gm/
+// @include http://*flickr.com/photos/*
+
+// Based upon the original by Fabricio Zuardi (http://www.mamata.com.br/greasemonkey/)
+// By Jason Rhyley (jason AT rhyley DOT org)
+
+// @author Jason Rhyley
+// @enabledbydefault true
+// @homepage http://userscripts.org/scripts/show/1030
+// ==/UserScript==
+
+(function() {
+
+ //if a photo page
+ if (document.getElementById("button_bar")) {
+
+ pid = location.pathname.split('/')[3];
+
+ var self = this;
+ var listener = {
+ flickr_photos_getSizes_onLoad: function(success, responseXML, responseText, params){
+ makeObject(responseText);
+ }
+ };
+
+ var makeObject = function (rsp) {
+ var rsp = rsp.replace(/<\?xml.*\?>/,'');
+ rsp = new XML(rsp);
+ gSizes = new Object();
+ for each (i in rsp.sizes.size) {
+ eval ("gSizes." + i.@label +" = new Object();");
+ eval ("gSizes." + i.@label +".w = i.@width; ");
+ eval ("gSizes." + i.@label +".h = i.@height; ");
+ eval ("gSizes." + i.@label +".src = i.@source; ");
+ }
+ doPPEsetup();
+ }
+
+ doUpdateWithXHR = function() {
+ unsafeWindow.F.API.callMethod('flickr.photos.getSizes', {
+ photo_id: pid
+ }, listener);
+ }
+
+ function doPPEsetup() {
+ var containerA = document.createElement("li");
+ containerA.setAttribute("class","Stats");
+ var linkA = 'View sizes: ';
+ if (gSizes.Original) linkA += '<a href="' + gSizes.Original.src + '" style="text-decoration: none;">Original</a>, ';
+ if (gSizes.Large) linkA += '<a href="' + gSizes.Large.src + '" style="text-decoration: none;">Large</a>, ';
+ if (gSizes.Medium) linkA += '<a href="' + gSizes.Medium.src + '" style="text-decoration: none;">Medium</a>, ';
+ if (gSizes.Small) linkA += '<a href="' + gSizes.Small.src + '" style="text-decoration: none;">Small</a>, ';
+ if (gSizes.Thumbnail) linkA += '<a href="' + gSizes.Thumbnail.src + '" style="text-decoration: none;">Thumbnail</a>, ';
+ if (gSizes.Square) linkA += '<a href="' + gSizes.Square.src + '" style="text-decoration: none;">Square</a>';
+ containerA.innerHTML = linkA;
+
+ //This next bit inserts a 'Copy HTML' link which shows a textarea
+ //with the thumbnail & description suitble for copy & paste.
+
+ var containerB = document.createElement("li");
+ containerB.setAttribute("class","Stats");
+ containerB.innerHTML = '<span id="showHide">Show Quicklink</span>: '+
+ '<a id="thLink" href="javascript:showQuick(0)" style="text-decoration:none">Thumbnail</a>, ' +
+ '<a id="smLink" href="javascript:showQuick(1)" style="text-decoration:none">Small</a>, ' +
+ '<a id="sqLink" href="javascript:showQuick(2)" style="text-decoration:none">Square</a>';
+
+ var texty = document.createElement("textarea");
+ texty.setAttribute("rows","6");
+ texty.setAttribute("cols","25");
+ texty.setAttribute("style","display:none");
+ texty.setAttribute("id","texty");
+
+ //get various attributes of the image for use in the generated HTML
+ if (document.getElementById("title_div" + pid))
+ ptitle = document.getElementById("title_div" + pid).innerHTML;
+ else ptitle = 'Flickr - photo sharing!';
+
+ if (document.getElementById("description_div" + pid))
+ pdescription = ' ' + document.getElementById("description_div" + pid).innerHTML;
+ else pdescription = '';
+
+ pOwnerName = location.pathname.split('/')[2];
+ (pOwnerName.indexOf('@') != -1) ? pOwnerName = '' : pOwnerName = ', by ' + pOwnerName;
+
+ imglink = '<a title="' + ptitle + pOwnerName + '" href="' + document.location + '">'
+
+ unsafeWindow.thumb_html = imglink + '<img src="' + gSizes.Thumbnail.src +
+ '" width="'+ gSizes.Thumbnail.w +
+ '" height="'+ gSizes.Thumbnail.h +'"></a>' + pdescription;
+ unsafeWindow.small_html = imglink + '<img src="' + gSizes.Small.src +
+ '" width="'+ gSizes.Small.w +
+ '" height="'+ gSizes.Small.h +'"></a>' + pdescription;
+ unsafeWindow.squar_html = imglink + '<img src="' + gSizes.Square.src +
+ '" width="'+ gSizes.Square.w +
+ '" height="'+ gSizes.Square.h +'"></a>' + pdescription;
+
+ addlInfo = document.evaluate("//li[contains(@class,'Stats')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).parentNode; // This broke before, let's see
+ addlInfo.appendChild(containerA);
+ addlInfo.appendChild(containerB);
+ addlInfo.parentNode.insertBefore(texty, addlInfo.nextSibling);
+ } // end PPEsetup()
+
+ unsafeWindow.showQuick = function (size){ // By request from striatic (whom I do remember from lurking on mefi way back in the day)
+ texty = document.getElementById("texty");
+ texty.style['display'] = 'block';
+ if (size == 0) {
+ texty.value = unsafeWindow.thumb_html;
+ unsafeWindow.setWeight("thLink",'bold');
+ unsafeWindow.setWeight("smLink",'normal');
+ unsafeWindow.setWeight("sqLink",'normal');
+ } else if (size == 1) {
+ texty.value = unsafeWindow.small_html;
+ unsafeWindow.setWeight("thLink",'normal');
+ unsafeWindow.setWeight("smLink",'bold');
+ unsafeWindow.setWeight("sqLink",'normal');
+ } else if (size == 2) {
+ texty.value = unsafeWindow.squar_html;
+ unsafeWindow.setWeight("thLink",'normal');
+ unsafeWindow.setWeight("smLink",'normal');
+ unsafeWindow.setWeight("sqLink",'bold');
+ }
+ texty.select();
+ document.getElementById("showHide").innerHTML = '<a href="javascript:hideQuick()" style="text-decoration:none">[Hide Quicklink]</a>'
+ }
+
+ unsafeWindow.hideQuick = function (){
+ texty = document.getElementById("texty");
+ texty.style['display'] = 'none';
+ unsafeWindow.setWeight("thLink",'normal');
+ unsafeWindow.setWeight("smLink",'normal');
+ unsafeWindow.setWeight("sqLink",'normal');
+ document.getElementById("showHide").innerHTML = 'Show Quickink';
+ }
+
+ unsafeWindow.setWeight = function (what,weight) {
+ document.getElementById(what).setAttribute('style','text-decoration:none;font-weight:' + weight );
+ }
+
+ // 'ZILLA BUG 249843 - 3 years old and going strong!
+ unsafeWindow.setTimeout(doUpdateWithXHR, 1);
+
+ // This bit makes clicking the "Add Tag" link automatically populate your most popular tags
+ tagadderlink = document.getElementById('tagadderlink');
+ if(tagadderlink) tagadderlink.firstChild.setAttribute("onclick", "tagrs_showForm(); tagrs_showPopular(20, '"+pid+"'); return false;");
+
+ }//close if a photo page
+
+})();
354 _input/betterflickr/user_scripts/richedit.user.js
@@ -0,0 +1,354 @@
+// Flickr Rich Edit
+// version 0.4 BETA!
+// 2007-05-02
+// Copyright (c) 2007, Todd Moon (toddmoon.com) & jrhyley ( http://www.flickr.com/people/jrhyley/ )
+// Released under the GPL license
+// http://www.gnu.org/copyleft/gpl.html
+//
+// --------------------------------------------------------------------
+//
+// This is a Greasemonkey user script. To install it, you need
+// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
+// Then restart Firefox and revisit this script.
+//
+// To uninstall, go to Tools/Manage User Scripts,
+// select "Flickr SPi-V preview", and click Uninstall.
+//
+// --------------------------------------------------------------------
+//
+// ==UserScript==
+// @name Flickr Rich Edit
+// @description Adds a simple rich edit interface (Italic, Bold, Blockquote, Link) to any comment text area on flickr and any in-situ description editor.
+// @namespace http://www.toddmoon.com/GreaseMonkey/
+// @include http://*flickr.com/*
+// @exclude http://*flickr.com/messages_write.gne*
+
+// @author Todd Moon and Jason Rhyley
+// @homepage http://www.flickr.com/groups/flickrhacks/discuss/72157600167344563/
+// @enabledbydefault true
+// ==/UserScript==
+
+// == CONSTANTS == //
+
+var CONTROL_BAR_ITEM_COMMAND = {
+ ITALICIZE: 1,
+ EMBOLDEN: 2,
+ QUOTE: 3,
+ LINK: 4
+}
+
+// == LIFECYCLE == //
+
+//Find existing text areas to add rich controls to.
+textAreas = document.evaluate(
+ "//textarea",
+ document,
+ null,
+ XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
+ null
+);
+
+//Add the rich editor to the existing text areas.
+for ( var i = 0; i < textAreas.snapshotLength; i++)
+{
+ var textArea = textAreas.snapshotItem(i);
+
+ // if this is not the extra special hidden textarea from the "invite to group" widget
+ if ( !textArea.style || !textArea.style.display || textArea.style.display.toLowerCase() != "none" )
+ {
+ var controlBar = new ControlBar( true, true, true, true );
+ controlBar.inject( textArea );
+ }
+}
+
+var pathSegments = getLowercasePathSegments( document.location.pathname );
+
+//Override each startEditing function on each description_div on the page if this is your photo stream.
+if ( unsafeWindow.global_photos && thisPageContainsYourPhotos( pathSegments ) )
+{
+ for( photoID in unsafeWindow.global_photos )
+ {
+ var descriptionDiv = unsafeWindow.document.getElementById( "description_div" + photoID );
+
+ var controlBarLoader = new DescriptionDivControlBarLoader( descriptionDiv, false );
+ controlBarLoader.initialize();
+ }
+}
+
+//Override each startEditing function on the description_div if this is your set.
+if ( unsafeWindow.page_set && isYourSet( pathSegments ) )
+{
+ var descriptionDiv = unsafeWindow.document.getElementById( "description_div" + unsafeWindow.page_set.id );
+
+ var controlBarLoader = new DescriptionDivControlBarLoader( descriptionDiv, false );
+ controlBarLoader.initialize();
+}
+
+//Override each startEditing function on the description_div if this is your collection.
+if ( unsafeWindow.page_collection_id && isYourCollection( pathSegments ) )
+{
+ var descriptionDiv = unsafeWindow.document.getElementById( "description_div" + unsafeWindow.page_collection_id );
+
+ var controlBarLoader = new DescriptionDivControlBarLoader( descriptionDiv, true );
+ controlBarLoader.initialize();
+}
+
+// == CLASSES == //
+
+function ControlBar( showItalic, showBold, showQuote, showLink )
+{
+ this.showItalic = showItalic;
+ this.showBold = showBold;
+ this.showQuote = showQuote;
+ this.showLink = showLink;
+
+ this.inject = function( targetTextArea )
+ {
+ var controlBar = document.createElement("div");
+
+ controlBar.setAttribute('style','');
+ controlBar.style.marginBottom = "2px";
+ controlBar.style.fontSize = "12px";
+
+ if ( showItalic )
+ {
+ var item = new ControlBarItem( "<i>italic</i> ", CONTROL_BAR_ITEM_COMMAND.ITALICIZE, targetTextArea );
+
+ controlBar.appendChild( item.create() );
+ }
+
+ if ( showBold )
+ {
+ var item = new ControlBarItem( " <b>bold</b> ", CONTROL_BAR_ITEM_COMMAND.EMBOLDEN, targetTextArea );
+
+ controlBar.appendChild( item.create() );
+ }
+
+ if ( showQuote )
+ {
+ var item = new ControlBarItem( " quote ", CONTROL_BAR_ITEM_COMMAND.QUOTE, targetTextArea );
+
+ controlBar.appendChild( item.create() );
+ }
+
+ if ( showLink )
+ {
+ var item = new ControlBarItem( " link ", CONTROL_BAR_ITEM_COMMAND.LINK, targetTextArea );
+
+ controlBar.appendChild( item.create() );
+ }
+
+ targetTextArea.parentNode.insertBefore( controlBar, targetTextArea );
+ };
+}
+
+function ControlBarItem( label, editCommand, targetTextArea )
+{
+ this.label = label;
+ this.editCommand = editCommand;
+ this.targetTextArea = targetTextArea;
+
+ this.create = function()
+ {
+ var link = document.createElement("a");
+
+ link.innerHTML = label;
+ link.href = "javascript:;";
+ link.style.marginRight = "18px;";
+
+ link.editCommand = this.editCommand;
+ link.targetTextArea = this.targetTextArea;
+ link.execute = this.execute;
+ link.linkSelection = this.linkSelection;
+ link.tagSelection = this.tagSelection;
+
+ addEvent( link, "click", "execute" );
+
+ return link;
+ }
+
+ this.execute = function()
+ {
+ switch( this.editCommand )
+ {
+ case CONTROL_BAR_ITEM_COMMAND.ITALICIZE:
+ this.tagSelection( "<i>", "</i>" );
+ break;
+ case CONTROL_BAR_ITEM_COMMAND.EMBOLDEN:
+ this.tagSelection( "<b>", "</b>" );
+ break;
+ case CONTROL_BAR_ITEM_COMMAND.QUOTE:
+ this.tagSelection( "<blockquote>", "</blockquote>" );
+ break;
+ case CONTROL_BAR_ITEM_COMMAND.LINK:
+ this.linkSelection();
+ break;
+ default:
+ throw "Unknown command encountered";
+ }
+ }
+
+ this.linkSelection = function()
+ {
+ var url = prompt( "Enter the URL:", "" );
+
+ if ( url != null )
+ {
+ this.tagSelection( '<a href="' + url + '">', '</a>' );
+ }
+ }
+
+ this.tagSelection = function( tagOpen, tagClose )
+ {
+ if ( this.targetTextArea.selectionStart || this.targetTextArea.selectionStart == 0 ) //relies on this property.
+ {
+ //record scroll top to restore it later.
+ var scrollTop = this.targetTextArea.scrollTop;
+
+ // work around Mozilla Bug #190382
+ if ( this.targetTextArea.selectionEnd > this.targetTextArea.value.length )
+ {
+ this.targetTextArea.selectionEnd = this.targetTextArea.value.length;
+ }
+
+ //We will restore the selection later, so record the current selection.
+ var selectionStart = this.targetTextArea.selectionStart;
+ var selectionEnd = this.targetTextArea.selectionEnd;
+
+ this.targetTextArea.value =
+ this.targetTextArea.value.substring( 0, selectionStart ) + //text leading up to the selection start
+ tagOpen +
+ this.targetTextArea.value.substring( selectionStart, selectionEnd ) + //selected text
+ tagClose +
+ this.targetTextArea.value.substring( selectionEnd ); //text after the selection end
+
+ this.targetTextArea.selectionStart = selectionStart + tagOpen.length;
+ this.targetTextArea.selectionEnd = selectionEnd + tagOpen.length;
+
+ this.targetTextArea.scrollTop = scrollTop;
+ }
+ }
+}
+
+function DescriptionDivControlBarLoader( descriptionDiv, showBlockQuote )
+{
+ this.descriptionDiv = descriptionDiv;
+
+ this.initialize = function()
+ {
+ if ( typeof( this.descriptionDiv.startEditing ) == 'function' )
+ {
+ this.descriptionDiv.richEditStartEditing = this.descriptionDiv.startEditing; // richEditStartEditing needs to be a name unique to your script if you want to follow this pattern.
+ this.descriptionDiv.addControlBar = this.addControlBar;
+
+ this.descriptionDiv.startEditing = function() {