Re: [Wikitech-l] Global user CSS and JS

2013-03-06 Thread Matthew Flaschen
On 03/05/2013 10:50 PM, Krinkle wrote:
> Considering the "global" aspect it may be more useful (and flexible) to 
> enforce this from the global script instead of from local preferences, which 
> are rather annoying to maintain imho.
> 
> if ( dbname == wikidatawiki || .. ) {
>  return;

Good point.  wgDBname is probably good enough for this, without needing
a whole local opt-out system.

Matt Flaschen

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-05 Thread Krinkle
On Mar 6, 2013, at 2:43 AM, Matthew Flaschen  wrote:

> On 03/05/2013 09:27 AM, James Forrester wrote:
>> You can of course always counter-over-ride your global JS/CSS locally - the
>> composite rule would presumably be changed to:
>> 
>> 1. file,
>> 2. site
>> 3. skin,
>> *. global-user
>> 4. local-user
> 
> However, it's trickier to override JS then override CSS.  For example,
> you can't remove a single event listener unless you have a reference to
> the original function.
> 
> Matt Flaschen
> 

Considering the "global" aspect it may be more useful (and flexible) to enforce 
this from the global script instead of from local preferences, which are rather 
annoying to maintain imho.

if ( dbname == wikidatawiki || .. ) {
 return;
}

-- Krinkle


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-05 Thread Matthew Flaschen
On 03/05/2013 09:27 AM, James Forrester wrote:
> You can of course always counter-over-ride your global JS/CSS locally - the
> composite rule would presumably be changed to:
> 
> 1. file,
> 2. site
> 3. skin,
> *. global-user
> 4. local-user

However, it's trickier to override JS then override CSS.  For example,
you can't remove a single event listener unless you have a reference to
the original function.

Matt Flaschen

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-05 Thread Isarra Yos
Not rubbish - that would be quite useful. The only problem is it would 
be a somewhat limited use case. Many users never go near their css/js, 
so it would just be another checkbox for them to ignore, and those who 
do use global css/js would just as likely have wider scope issues than 
that - only works on english projects, only applies where they have 
rollback, or don't have rollback, etc - and at that point it would be a 
lot easier and more effective for them to just add a check to the 
particular script/css rule that it is on an applicable project before it 
runs.


Although that does assume the user actually understands what they're 
putting in their user css/js files.


On 05/03/13 13:43, Paul Selitskas wrote:

I may be saying rubbish, but...

I think we should have a checkbox in Preferences where we can switch off
global JS and CSS for the wiki where this checkbox is set/unset. Let's
imagine I have a script which fits well for every project but Wikidata.
Then I go to the preferences and just disable the global script in Wikidata.


On Tue, Mar 5, 2013 at 4:00 AM, James Forrester wrote:


On 4 March 2013 14:59, Krenair  wrote:

On 04/03/13 22:57, Matthew Flaschen wrote:

Has anyone looked at allowing a user to have global CSS and JS across
all WMF wikis?

I know you can hack it with a mw.loader.load on all the wikis you use,
but it would be useful if CentralAuth had it built in.

Is there a bug for this?

It seems so, yes: https://gerrit.wikimedia.org/r/7274

Bug: https://bugzilla.wikimedia.org/13953

Yes, it would be really lovely to get this enhancement fulfilled
(either with that or new code); it's now on the backlog for "admin
tools development"[*].

(I speak conflicted, as someone who's used the bot to fake this
globally for my staff account.)

[*] -
https://www.mediawiki.org/wiki/Admin_tools_development/Roadmap#Other_tasks

J.
--
James D. Forrester
Product Manager, VisualEditor
Wikimedia Foundation, Inc.

jforres...@wikimedia.org | @jdforrester

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l






--
-— Isarra


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-05 Thread James Forrester
You can of course always counter-over-ride your global JS/CSS locally - the
composite rule would presumably be changed to:

1. file,
2. site
3. skin,
*. global-user
4. local-user

… - so you could fix local incompatibilities.

J.



On 5 March 2013 09:14, Isarra Yos  wrote:

> Not rubbish - that would be quite useful. The only problem is it would be
> a somewhat limited use case. Many users never go near their css/js, so it
> would just be another checkbox for them to ignore, and those who do use
> global css/js would just as likely have wider scope issues than that - only
> works on english projects, only applies where they have rollback, or don't
> have rollback, etc - and at that point it would be a lot easier and more
> effective for them to just add a check to the particular script/css rule
> that it is on an applicable project before it runs.
>
> Although that does assume the user actually understands what they're
> putting in their user css/js files.
>
>
> On 05/03/13 13:43, Paul Selitskas wrote:
>
>> I may be saying rubbish, but...
>>
>> I think we should have a checkbox in Preferences where we can switch off
>> global JS and CSS for the wiki where this checkbox is set/unset. Let's
>> imagine I have a script which fits well for every project but Wikidata.
>> Then I go to the preferences and just disable the global script in
>> Wikidata.
>>
>>
>> On Tue, Mar 5, 2013 at 4:00 AM, James Forrester > >**wrote:
>>
>>  On 4 March 2013 14:59, Krenair  wrote:
>>>
 On 04/03/13 22:57, Matthew Flaschen wrote:

> Has anyone looked at allowing a user to have global CSS and JS across
> all WMF wikis?
>
> I know you can hack it with a mw.loader.load on all the wikis you use,
> but it would be useful if CentralAuth had it built in.
>
> Is there a bug for this?
>
 It seems so, yes: 
 https://gerrit.wikimedia.org/**r/7274

 Bug: 
 https://bugzilla.wikimedia.**org/13953

>>> Yes, it would be really lovely to get this enhancement fulfilled
>>> (either with that or new code); it's now on the backlog for "admin
>>> tools development"[*].
>>>
>>> (I speak conflicted, as someone who's used the bot to fake this
>>> globally for my staff account.)
>>>
>>> [*] -
>>> https://www.mediawiki.org/**wiki/Admin_tools_development/**
>>> Roadmap#Other_tasks
>>>
>>> J.
>>> --
>>> James D. Forrester
>>> Product Manager, VisualEditor
>>> Wikimedia Foundation, Inc.
>>>
>>> jforres...@wikimedia.org | @jdforrester
>>>
>>> __**_
>>> Wikitech-l mailing list
>>> Wikitech-l@lists.wikimedia.org
>>> https://lists.wikimedia.org/**mailman/listinfo/wikitech-l
>>>
>>>
>>
>>
> --
> -— Isarra
>
>
>
> __**_
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/**mailman/listinfo/wikitech-l
>



-- 
James D. Forrester
Product Manager, VisualEditor
Wikimedia Foundation, Inc.

jforres...@wikimedia.org | @jdforrester
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-05 Thread Isarra Yos
Not rubbish - that would be quite useful. The only problem is it would 
be a somewhat limited use case. Many users never go near their css/js, 
so it would just be another checkbox for them to ignore, and those who 
do use global css/js would just as likely have wider scope issues than 
that - only works on english projects, only applies where they have 
rollback, or don't have rollback, etc - and at that point it would be a 
lot easier and more effective for them to just add a check to the 
particular script/css rule that it is on an applicable project before it 
runs.


Although that does assume the user actually understands what they're 
putting in their user css/js files.


On 05/03/13 13:43, Paul Selitskas wrote:

I may be saying rubbish, but...

I think we should have a checkbox in Preferences where we can switch off
global JS and CSS for the wiki where this checkbox is set/unset. Let's
imagine I have a script which fits well for every project but Wikidata.
Then I go to the preferences and just disable the global script in Wikidata.


On Tue, Mar 5, 2013 at 4:00 AM, James Forrester wrote:


On 4 March 2013 14:59, Krenair  wrote:

On 04/03/13 22:57, Matthew Flaschen wrote:

Has anyone looked at allowing a user to have global CSS and JS across
all WMF wikis?

I know you can hack it with a mw.loader.load on all the wikis you use,
but it would be useful if CentralAuth had it built in.

Is there a bug for this?

It seems so, yes: https://gerrit.wikimedia.org/r/7274

Bug: https://bugzilla.wikimedia.org/13953

Yes, it would be really lovely to get this enhancement fulfilled
(either with that or new code); it's now on the backlog for "admin
tools development"[*].

(I speak conflicted, as someone who's used the bot to fake this
globally for my staff account.)

[*] -
https://www.mediawiki.org/wiki/Admin_tools_development/Roadmap#Other_tasks

J.
--
James D. Forrester
Product Manager, VisualEditor
Wikimedia Foundation, Inc.

jforres...@wikimedia.org | @jdforrester

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l






--
-— Isarra


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-05 Thread Paul Selitskas
I may be saying rubbish, but...

I think we should have a checkbox in Preferences where we can switch off
global JS and CSS for the wiki where this checkbox is set/unset. Let's
imagine I have a script which fits well for every project but Wikidata.
Then I go to the preferences and just disable the global script in Wikidata.


On Tue, Mar 5, 2013 at 4:00 AM, James Forrester wrote:

> On 4 March 2013 14:59, Krenair  wrote:
> > On 04/03/13 22:57, Matthew Flaschen wrote:
> >>
> >> Has anyone looked at allowing a user to have global CSS and JS across
> >> all WMF wikis?
> >>
> >> I know you can hack it with a mw.loader.load on all the wikis you use,
> >> but it would be useful if CentralAuth had it built in.
> >>
> >> Is there a bug for this?
> >
> > It seems so, yes: https://gerrit.wikimedia.org/r/7274
> >
> > Bug: https://bugzilla.wikimedia.org/13953
>
> Yes, it would be really lovely to get this enhancement fulfilled
> (either with that or new code); it's now on the backlog for "admin
> tools development"[*].
>
> (I speak conflicted, as someone who's used the bot to fake this
> globally for my staff account.)
>
> [*] -
> https://www.mediawiki.org/wiki/Admin_tools_development/Roadmap#Other_tasks
>
> J.
> --
> James D. Forrester
> Product Manager, VisualEditor
> Wikimedia Foundation, Inc.
>
> jforres...@wikimedia.org | @jdforrester
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>



-- 
З павагай,
Павел Селіцкас/Pavel Selitskas
Wizardist @ Wikimedia projects
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-04 Thread James Forrester
On 4 March 2013 14:59, Krenair  wrote:
> On 04/03/13 22:57, Matthew Flaschen wrote:
>>
>> Has anyone looked at allowing a user to have global CSS and JS across
>> all WMF wikis?
>>
>> I know you can hack it with a mw.loader.load on all the wikis you use,
>> but it would be useful if CentralAuth had it built in.
>>
>> Is there a bug for this?
>
> It seems so, yes: https://gerrit.wikimedia.org/r/7274
>
> Bug: https://bugzilla.wikimedia.org/13953

Yes, it would be really lovely to get this enhancement fulfilled
(either with that or new code); it's now on the backlog for "admin
tools development"[*].

(I speak conflicted, as someone who's used the bot to fake this
globally for my staff account.)

[*] - https://www.mediawiki.org/wiki/Admin_tools_development/Roadmap#Other_tasks

J.
--
James D. Forrester
Product Manager, VisualEditor
Wikimedia Foundation, Inc.

jforres...@wikimedia.org | @jdforrester

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-04 Thread Tilman Bayer
On Mon, Mar 4, 2013 at 2:59 PM, Brian Wolff  wrote:
> Somebody (pathoschild maybe) used to have a bot that copied over css files
> from meta. (Why people didnt just dynamically load things I don't know)
https://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/Synchbot

> On 2013-03-04 6:57 PM, "Matthew Flaschen"  wrote:
>
>> Has anyone looked at allowing a user to have global CSS and JS across
>> all WMF wikis?
>>
>> I know you can hack it with a mw.loader.load on all the wikis you use,
>> but it would be useful if CentralAuth had it built in.
>>
>> Is there a bug for this?
>>
>> Matt Flaschen
>>
>> ___
>> Wikitech-l mailing list
>> Wikitech-l@lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l



-- 
Tilman Bayer
Senior Operations Analyst (Movement Communications)
Wikimedia Foundation
IRC (Freenode): HaeB

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-04 Thread Brian Wolff
Somebody (pathoschild maybe) used to have a bot that copied over css files
from meta. (Why people didnt just dynamically load things I don't know)
On 2013-03-04 6:57 PM, "Matthew Flaschen"  wrote:

> Has anyone looked at allowing a user to have global CSS and JS across
> all WMF wikis?
>
> I know you can hack it with a mw.loader.load on all the wikis you use,
> but it would be useful if CentralAuth had it built in.
>
> Is there a bug for this?
>
> Matt Flaschen
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Global user CSS and JS

2013-03-04 Thread Krenair

It seems so, yes: https://gerrit.wikimedia.org/r/7274

Bug: https://bugzilla.wikimedia.org/13953

On 04/03/13 22:57, Matthew Flaschen wrote:

Has anyone looked at allowing a user to have global CSS and JS across
all WMF wikis?

I know you can hack it with a mw.loader.load on all the wikis you use,
but it would be useful if CentralAuth had it built in.

Is there a bug for this?

Matt Flaschen

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l