Chrome bug
Page 1 of 1

Author:  Sluor [ Sun Mar 18, 2012 12:55 am ]
Post subject:  Chrome bug

So, yea, there's a bug in the Chrome version (and has been since Sep '11).

Spreadsheet servers aren't working. It may be a JSON issue, or an incompatibility in how chrome treats ajax now. I'm sorry, but I don't have the time to look into it and fix it. The code is open, though, and I do think the problem is in bg.html, or possibly gm_compatibility.js; so if anyone else has the time and knowledge to fix it feel free to send me a patch!

Sorry, again.

Author:  Aeon Swiftwind [ Sun Mar 18, 2012 5:10 pm ]
Post subject:  Re: Chrome bug

Alright I think I've got this one figured out now after a few hours worth of tinkering and looking at other extensions.

The error that is thrown in the Javascript Console is a result of a function call to an invalid function from skycust.user.js around Line 38 approximately.

You Have:

var blacklist = GM_getValue('blacklist');
other code

But the function call asks for 3 parameters
Change it to:

var blacklist;

GM_getValue('blacklist', null, function(b) {
blacklist = b;
if (blacklist) { blacklist = JSON.parse(blacklist); } else { blacklist = {}; }

But that is all minor stuff that doesn't actually affect anything.

To just make it work, all you have to do is change manifest.json. Somewhere along the line of the request something doesn't get access. I assume that is because it is trying to go through https: instead of just http:. So if you change the permissions in the manifest to include "https://*/" everything appears to work again.

Author:  Sluor [ Sun Mar 18, 2012 9:10 pm ]
Post subject:  Re: Chrome bug

Where were you in September? :remywicked:

Apparently I missed that call when continuifying the greasemonkey compatibility layer. Apparently no one noticed because no one uses blacklists >_>

So the issue was just the https xhr request being denied, huh. Chrome must have updated at some point to distinguish between those two permissions... cheers for figuring that out, and may I ask: how did you figure that out?

In any case, fixed and uploaded now. Your chrome skycust should update automagically soon. (The biggest problem was adhering to Google's new "guidelines" for screenshots, urgh :razz: )

Author:  Aeon Swiftwind [ Sun Mar 18, 2012 9:19 pm ]
Post subject:  Re: Chrome bug

How I figured it out was quite the adventure. I tinkered with the Extension until the Console quit throwing an error and I realized that it wasn't the problem in the first place. After that I started researching extensions and how to convert scripts. After converting the original script on my own and arriving at the same problem I had no idea.

I looked at some of the other extensions I had and realized that StumbleUpon used several other permissions including "Tabs" and "Https". I decided what the heck and threw them in to skycust and it was magic! StumbleUpon really helped me to stumble upon the answer :grin: .

TL; DR = It was trial and error.

Author:  Sluor [ Sun Mar 18, 2012 9:29 pm ]
Post subject:  Re: Chrome bug

Heh. In retrospect, "examine a working example" really should have been higher on my list. Thanks again!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group