Greasy Fork is available in English.

Flickr: Show All Sizes

Adds links to every available size of a Flickr image.

< Feedback on Flickr: Show All Sizes

مراجعة: Bad - script does not work

§
Posted: 24-07-2014

A couple of problems

I should first mention that I first tried using this script in an old Firefox profile and with a brand new one (without anything installed apart from Greasemonkey and Flickr: Show All Sizes), as well as with English or French language in flickr (which changes the version of the interface between 2014 and what you call in the source code the “old-style” one). Nothing helped. (I use Greasemonkey 2.0 in Firefox 30.0 on Linux.)

The first problem was that when I was on an appropriate flickr page, nothing happened at all : the script was enabled in the Greasemonkey menu, but the “User Script Commands” menu was empty and nothing appeared on the page. I looked in the web console and searched on the Internet and solved this problem: I added the lines

// @grant GM_getValue
// @grant GM_setValue
// @grant GM_registerMenuCommand

at the beginning of the script and it loaded!

But a second problem appeared: it's stucked at the stage “Loading all sizes…” The error which appears in the web console (if and only if this script is enabled) is the following (the precise nature of the error depends on the version):
- 2014-style: “Permission denied to access object” in combo:8, with the following URL appearing when I hover over “combo:8” : “https://s.yimg.com/zz/combo?yui:3.16.0-rc-1/yui/yui-min.js&uy/build/hermes-0.0.15.12319/loader-hermes/loader-hermes-min.js”.
- old-style: “Permission denied to access property 'call'“in 3.11.0:10, with the following URL: “https://s.yimg.com/pw/combo/1/3.11.0?j/yui/3.11.0/yui/yui-.E.A.v2cK5r&j/yui/3.11.0/.FN/.FN-.E.A.v2cK5r”.
I haven't found a solution for this problem, unfortunately…

Thank you for your help!

Jason Tankمؤلف
§
Posted: 25-07-2014

I haven't found a solution, either. But for the time being, I know of two "solutions" that work.

1) If you can downgrade to Greasemonkey 1.15, the script still works fine in that. (That's what I had been testing with, and I didn't notice a problem until I upgraded today.) Somewhere between that and GM 2.0, the script broke. It's confusing to me.

2) If you use Tampermonkey on Chrome, the script still works fine. (This is what I normally use.)

I'll keep looking into the problem.

§
Posted: 25-07-2014
Edited: 25-07-2014

Looks like Greasemonkey broke AJAX with 2.0
They have a fix in 2.1: http://www.greasespot.net/2014/07/greasemonkey-21-release.html

Edit:
I updated to 2.1(https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/) and it doers not change anything.
Still no luck.
Good luck finding the bug.

§
Posted: 26-07-2014

In the release notes of Greasmonkey 2.0 (http://www.greasespot.net/2014/06/greasemonkey-20-release.html), they mention two backwards incompatible changes:

1) The second one is precisely the first problem I mentioned above: «The @grant none mode is now the default, and grants will no longer be implied when not explicitly provided.»

2) And I think the first one is my second problem: «For stability, reliability, and security the privileged sandbox has been updated to match the new changes to unsafeWindow for the Add-on SDK. In order to write values to unsafeWindow you will need to use the new methods cloneInto(), exportFunction(), and/or createObjectIn().» If we follow the link to “Changes to unsafeWindow for the Add-on SDK”, we learn that «If the page script tries to read a variable defined using unsafeWindow, it will get the value undefined. If it tries to write to such a variable, the browser will throw an exception with this message: “Permission denied to access property [name of the property]“.» This is precisely the kind of error I got with the old-style version of flickr.

With my limited understanding of the way this script function, I don't know if this is something which can be easily fixed or not, and if the fix would be compatible with TamperMonkey (would it understand the methods cloneInto(), exportFunction(), or createObjectIn() ?).

§
Posted: 27-07-2014
Edited: 27-07-2014

Could this be related?
https://bugzilla.mozilla.org/show_bug.cgi?id=1043958

I have made some progress by adding YUI in my script:
// @require http://yui.yahooapis.com/3.17.2/build/yui/yui-min.js

Then I can use YUI() instead of unsafeWindow.YUI()

Now I'm stuck trying to append content in the page.

§
Posted: 28-11-2014

Thanks to this script https://greasyfork.org/scripts/3135 I realized we don't need the API anymore at all.

I have updated my own script based on this:
https://greasyfork.org/en/scripts/6699-flickr-large-embed

It works with the latest Firefox with the latest version of GM.

§
Posted: 10-05-2015

Flickr has changed.

I need to run this API: flickr.photos.getSizes with GreaseMonkey, but Flickr API has limit on number of queries (3600 per hours for each API Key). I don't want to be limited.

Is there anyway I can execute that API without using API key?

Post reply

تسجيل الدخول إلى مرحلة ما بعد الرد.