Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 5677191404716032: make abp-128.png icon non web accessible (Closed)

Created:
March 28, 2014, 11:52 a.m. by saroyanm
Modified:
March 28, 2014, 3:16 p.m.
Reviewers:
Wladimir Palant
CC:
Thomas Greiner
Visibility:
Public.

Description

This Review is related to current ticket: https://issues.adblockplus.org/ticket/172 Chrome works differently under Ubuntu and Chrome. While I'm getting current error for the icons not listed in web_accessible resources under Ubuntu: "Denying load of chrome-extension://ojacpngaaogckgldgfpfjjpeaegdbgcb/icons/abp-128.png. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension." But under windows no error message and looks no need to list in web_accessible resources. I'll investigate that strange behavior more, maybe it's related to desktop notifications itself under ubuntu and windows. Anyway in Chrome official documentation is written that Resources inside of packages using manifest_version 2 or above are blocked by default if not whitelisted through web_accessible param in manifest.json: https://developer.chrome.com/extensions/manifest/web_accessible_resources#availability Also not sure if I need to generate data: URL in buildtool(python), or we can stick to generate it in extension.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -7 lines) Patch
M background.js View 3 chunks +28 lines, -6 lines 2 comments Download
M metadata.chrome View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
Wladimir Palant
LGTM with the nit addressed. Too bad that we have to use canvas-based hacks for ...
March 28, 2014, 2:18 p.m. (2014-03-28 14:18:29 UTC) #1
saroyanm
March 28, 2014, 3:16 p.m. (2014-03-28 15:16:02 UTC) #2
On 2014/03/28 14:18:29, Wladimir Palant wrote:
> LGTM with the nit addressed. Too bad that we have to use canvas-based hacks
for
> this rather than simply loading the image via XMLHttpRequest and running
btoa()
> on it - we would need to load binary data however which means that btoa()
isn't
> easily applicable.

I've also succeed with testing with the solution in link below for chrome:
http://stackoverflow.com/questions/8022425/getting-blob-data-from-xhr-request

But looks like it can not work in safari. 
Thanks Wladimir.

http://codereview.adblockplus.org/5677191404716032/diff/5629499534213120/back...
File background.js (right):

http://codereview.adblockplus.org/5677191404716032/diff/5629499534213120/back...
background.js:356: var canvas = document.createElement("CANVAS"),
On 2014/03/28 14:18:29, Wladimir Palant wrote:
> Nit: document.createElement("canvas") please (lowercase tag names are
compatible
> to both HTML and XHTML).

Done.

Powered by Google App Engine
This is Rietveld