Page MenuHomePhabricator

Allow data-URLs for icons added to the toolbar
Closed, ResolvedPublic

Description

Currently it's impossible to insert a button with a data-URL as icon into the toolbar. Could you change the autoIcon function such that the path isn't prepended to URLs starting with "data:"? Thanks.


Version: unspecified
Severity: enhancement

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport added a project: WikiEditor.
bzimport set Reference to bz25223.
bzimport added a subscriber: Unknown Object (MLST).

Keep in mind that data URLs are not universally supported: of the browsers supported by WikiEditor, they break in IE7.

Right, you would need to support providing a data-URL+file-URL... Seems like it's possible to do, but strange.

(In reply to comment #1)

Keep in mind that data URLs are not universally supported: of the browsers
supported by WikiEditor, they break in IE7.

If data-URL were only used in personal user scripts this wouldn't be a problem. If a user uses IE7 and puts some code in his vector.js that inserts a toolbar button with a data-URL, it's his own fault.

Well sure, but toolbar icons would more typically be added through site JS, and people like to copy others' user JS.

Can this be closed or is this still a problem.

Well, define "problem". I no longer care about WikiEditor, so for me the missing support for data-URLs is no longer a problem. If anybody else wants to have this feature, then go ahead and implement it, but if nobody else cares, then let the WikiEditor rest in peace and decline this task.

Change 527946 had a related patch set uploaded (by Happy5214; owner: Happy5214):
[mediawiki/extensions/WikiEditor@master] Allow data URLs for toolbar icons

https://gerrit.wikimedia.org/r/527946

happy5214 subscribed.

Since IE7 support has been dropped, its lack of data URL support is now irrelevant.

happy5214 moved this task from Doing to Closed on the WikiEditor board.