Moving this to a separate thread for discussion.
On Sat, Aug 17, 2013 at 5:14 PM, Chris Steipp <csteipp(a)wikimedia.org> wrote:
Yeah, but I *think* that one can be solved without
affecting editors..
Just to go over ResourceLoader first, right now the main inline JS we have
is the load information for mw.config and mw.user.options, and then some
bootstrap code (one at the beginning and one at the end of the file).
The main problem is that many of these things are determined during the
page request. We'd have to figure out how to move them to an independent JS
file while preserving whatever the values are supposed to be.
Building something to let them style, but in a way that inline css isn't
allowed by the CSP is something I haven't figured
out yet.
Here's really the only thing I can think of: whenever the parser encounters
inline styling, remove the styling and add an id attribute to the element
if it doesn't already exist. Then have the client load something along the
lines of /load.php?page=Main page, or something like that, which will
instead extract that CSS and assign it to the associated ids. The main
issue would be making sure that the method in which element ids are
generated is deterministic so that they match up on the page and in the CSS
file.
*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com | tylerromeo(a)gmail.com