Enable VisualEditor using Beta Features

Change-Id: I76ba788751dacc24cdbc667b4d24f1656f0ade44
This commit is contained in:
Ed Sanders 2013-09-30 17:18:46 +01:00
parent 38f9a55b59
commit 9cba9910c6
6 changed files with 118 additions and 19 deletions

View file

@ -216,11 +216,13 @@ class VisualEditorHooks {
}
public static function onGetPreferences( $user, &$preferences ) {
$preferences['visualeditor-enable'] = array(
'type' => 'toggle',
'label-message' => 'visualeditor-preference-enable',
'section' => 'editing/beta'
);
if ( !array_key_exists( 'visualeditor-enable', $preferences ) ) {
$preferences['visualeditor-enable'] = array(
'type' => 'toggle',
'label-message' => 'visualeditor-preference-enable',
'section' => 'editing/beta'
);
}
$preferences['visualeditor-betatempdisable'] = array(
'type' => 'toggle',
'label-message' => 'visualeditor-preference-betatempdisable',
@ -232,12 +234,25 @@ class VisualEditorHooks {
public static function onGetBetaPreferences( $user, &$preferences ) {
global $wgExtensionAssetsPath;
$preferences['visualeditor-enable'] = array(
'version' => '1.0',
'label-message' => 'visualeditor-preference-core-label',
'desc-message' => 'visualeditor-preference-core-description',
// TODO: use message 'visualeditor-preference-core-info-link'
'info-link' => false,
// TODO: use message 'visualeditor-preference-core-discussion-link'
'discussion-link' => false,
'screenshot' => $wgExtensionAssetsPath . '/VisualEditor/logo.png',
);
$preferences['visualeditor-enable-experimental'] = array(
'version' => '1.0',
'label-message' => 'visualeditor-preference-experimental-label',
'desc-message' => 'visualeditor-preference-experimental-description',
'info-link' => 'visualeditor-preference-experimental-info-link',
'discussion-link' => 'visualeditor-preference-experimental-discussion-link',
// TODO: use message 'visualeditor-preference-experimental-info-link'
'info-link' => false,
// TODO: use message 'visualeditor-preference-experimental-discussion-link'
'discussion-link' => false,
'screenshot' => $wgExtensionAssetsPath . '/VisualEditor/logo-experimental.png',
);
}

View file

@ -166,6 +166,8 @@ $messages['en'] = array(
'visualeditor-parameter-search-unknown' => 'Unknown parameter',
'visualeditor-preference-betatempdisable' => 'Temporarily disable VisualEditor while it is in beta',
'visualeditor-preference-enable' => 'Enable VisualEditor (only in the [[{{MediaWiki:visualeditor-mainnamespacepagelink}}|main]] and [[{{MediaWiki:visualeditor-usernamespacepagelink}}|user]] namespaces)',
'visualeditor-preference-core-description' => 'Enable VisualEditor (only in the main and user namespaces).',
'visualeditor-preference-core-label' => 'VisualEditor',
'visualeditor-preference-experimental-description' => 'Enable the latest features inside VisualEditor. As we develop tools and make changes for the editor, we make them available for testing ahead of general release. Please remember to always review your changes before saving when using experimental features.',
'visualeditor-preference-experimental-label' => 'VisualEditor experimental features',
'visualeditor-reference-input-placeholder' => 'What do you want to reference?',
@ -543,6 +545,17 @@ See [[w:LaTeX]].',
'visualeditor-preference-betatempdisable' => 'Label for the temporary user preference to disable VisualEditor while it is in beta.',
'visualeditor-preference-enable' => 'Label for the user preference to enable VisualEditor while it is in alpha (opt-in) mode.
Links are in {{msg-mw|Visualeditor-mainnamespacepagelink}} and {{msg-mw|visualeditor-usernamespacepagelink}}.',
'visualeditor-preference-core-description' => 'Used in [[Special:Preferences]].
Used as description for the checkbox to enable VisualEditor.
The label for this checkbox is {{msg-mw|Visualeditor-preference-core-label}}.',
'visualeditor-preference-core-label' => 'Used in [[Special:Preferences]].
Used as label for checkbox to enable VisualEditor.
The description for this checkbox is:
* {{msg-mw|Visualeditor-preference-core-description}}',
'visualeditor-preference-experimental-description' => 'Used in [[Special:Preferences]].
Used as description for the checkbox to enable VisualEditor experimental features.

View file

@ -16,9 +16,9 @@
id="metadata4389"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs4387" /><g
transform="translate(0,55)"
id="g4355"><path
id="defs4387" />
<g id="VisualEditor" transform="translate(0,55)">
<path
d="m 144.765,242.56 h 13.097 l -26.967,62.11 H 126.81 L 99.199,242.56 h 13.221 l 16.476,37.556 15.869,-37.556 z"
id="path4357"
style="fill:#2ba9e0" /><path
@ -58,10 +58,11 @@
style="fill:#9acc59" /></g><path
d="m 375.18,210.906 h 12.076 V 401.094 H 375.18 V 210.906 z"
id="path4383"
style="fill:#2ba9e0" /></g><g
transform="matrix(1.5999936,0,0,1.6,-421.64602,-112.05)"
id="g4506"><g
id="g4498"><path
style="fill:#2ba9e0" />
</g>
<g id="Flasks" transform="matrix(1.6,0,0,1.6,-421.64602,-112.05)" >
<g id="g4498">
<path
d="m 602.53125,39.40625 c -5.79663,0 -10.8154,3.312104 -13.3125,8.125 0.37354,0.638437 0.79104,1.273674 1.21875,1.9375 3.73858,6.639764 8.70341,12.940888 12.875,19.90625 7.91777,-0.409539 14.21875,-6.949081 14.21875,-14.96875 0,-8.283813 -6.71619,-15 -15,-15 z"
transform="translate(72.5,191.5)"
id="path4273"
@ -69,12 +70,17 @@
d="m 597.59394,6.96875 -2.50306,2.05e-4 c -1.24695,-2.05e-4 -2.49696,1.249795 -2.49696,2.499795 0,1.25 1.25001,2.5 2.497,2.500205 -0.007,3.35931 0,11.90102 0,21.25 -2.80453,1.003296 -5.44731,2.647206 -7.62217,4.593545 l 0,3.875 0,0.15625 0,0.125 c -0.1094,0.884869 0.0551,1.839311 0.40625,2.8125 2.6881,-4.099771 7.13034,-7.097478 12.21592,-7.812295 -6e-5,-9.479478 0.003,-19.415201 0.003,-27.500205 0,-1.25 -1.25,-2.5 -2.50001,-2.5 z m 10.00004,0 c -1.25,0 -2.49988,1.19107 -2.50001,2.5 0,10.193313 -0.003,17.749117 -0.003,27.500205 8.51204,1.19643 15.00006,8.58399 15.00006,17.437 0,8.945838 -6.75797,16.266548 -15.40348,17.344045 0.4726,0.849915 0.93506,1.687998 1.375,2.5625 0.0535,0.105 0.10275,0.2075 0.15625,0.3125 0.35338,0.583989 0.58425,1.222995 0.78125,1.84375 9.7e-4,0.003 0.0303,-0.003 0.0312,0 10.23761,-2.10313 18.0598,-11.217336 18.0598,-22.062795 0,-9.74996 -6.30014,-18.07467 -15.00008,-21.187 -6.1e-4,-9.38998 -0.004,-18.062385 0.003,-21.250205 1.25001,0 2.50001,-1.25 2.49696,-2.499795 C 612.5879,8.21875 611.344,6.96875 610.09399,6.96875 z"
transform="translate(72.5,191.5)"
id="path4236"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:0.56621004;stroke:none;stroke-width:1.12521958;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /></g><g
id="g4502"><path
style="fill:#000000;fill-opacity:0.56621004;stroke:none;stroke-width:1.12521958;" />
</g>
<g id="g4502">
<path
d="m 569.8125,60 c -3.10132,4.68406 -6.31715,9.198135 -9.03125,13.875 -0.92645,1.5935 -2.35165,3.4415 -2.8125,4.6875 -0.2305,0.6215 -0.22183,0.670699 -0.15625,0.78125 0.0846,0.142678 0.1875,0.165553 0.3125,0.15625 l 38.5625,0 c 0.3125,-0.005 0.3677,0.01973 0.46362,-0.08743 0.0541,-0.06047 0.0221,-0.124603 -0.01,-0.180838 -1.79759,-3.9165 -4.17744,-7.563983 -6.67263,-11.450483 C 588.90502,65.176824 587.04472,62.640743 585.1875,60 z"
transform="matrix(1.000004,0,0,1,72.588497,191.46895)"
id="path3810"
style="fill:#9acc59;fill-opacity:1;stroke:none" /><path
d="m 639.84375,213.46875 c -1.309,0.0654 -2.44045,1.316 -2.375,2.625 0.0655,1.309 1.316,2.44045 2.625,2.375 l 2.49703,0 0,17.5002 c 0,-0.20833 -0.13689,0.64771 -0.62203,1.6873 -0.48514,1.03959 -1.24397,2.38578 -2.15625,3.90625 -1.82456,3.04093 -4.3125,6.78125 -6.8125,10.53125 -2.5,3.75 -5.01206,7.50968 -6.9375,10.71875 -0.96272,1.60453 -1.76639,3.07084 -2.375,4.375 -0.60861,1.30416 -1.09375,2.32292 -1.09375,3.78125 0,2.11295 1.02494,3.83744 2.34375,5.15625 1.31881,1.31881 3.0433,2.34375 5.15625,2.34375 l 40,0 c 2.11296,0 3.83744,-1.02493 5.15625,-2.34375 1.31881,-1.31882 2.34375,-3.04332 2.34375,-5.15625 0,-1.45833 -0.48514,-2.47709 -1.09375,-3.78125 -0.60861,-1.30416 -1.41228,-2.77047 -2.375,-4.375 -1.92544,-3.20907 -4.46875,-6.96875 -6.96875,-10.71875 -2.5,-3.75 -4.95669,-7.49032 -6.78125,-10.53125 -0.91228,-1.52047 -1.67111,-2.86666 -2.15625,-3.90625 -0.48514,-1.03959 -0.62791,-1.89563 -0.62791,-1.6873 l 0.003,-17.5002 2.5,0 c 1.32078,0.0187 2.53561,-1.17909 2.53561,-2.5 0,-1.32091 -1.21483,-2.51868 -2.53561,-2.5 l -5,0 c -1.30896,1.3e-4 -2.49987,1.19104 -2.5,2.5 l -0.003,20.0002 c -2.2e-4,1.45833 0.48807,2.47689 1.09668,3.78105 0.60861,1.30416 1.41228,2.77047 2.375,4.375 1.92544,3.20907 4.4375,6.96875 6.9375,10.71875 2.5,3.75 4.98794,7.49032 6.8125,10.53125 0.91228,1.52047 1.67111,2.86666 2.15625,3.90625 0.48514,1.03959 0.62213,1.1877 0.625,1.6875 0.004,0.61519 -0.28307,1.03307 -0.875,1.625 -0.59193,0.59193 -1.12788,0.875 -1.625,0.875 l -40,0 c -0.50305,0 -1.03306,-0.28306 -1.625,-0.875 -0.59194,-0.59194 -0.87124,-1.00981 -0.875,-1.625 -0.003,-0.4998 0.13986,-0.64791 0.625,-1.6875 0.48514,-1.03959 1.24397,-2.38578 2.15625,-3.90625 1.82456,-3.04093 4.28125,-6.78125 6.78125,-10.53125 2.5,-3.75 5.04331,-7.50968 6.96875,-10.71875 0.96272,-1.60453 1.76639,-3.07084 2.375,-4.375 0.60861,-1.30416 1.09058,-2.32272 1.0908,-3.78105 l 0.003,-20.0002 c -1.3e-4,-1.30896 -1.19104,-2.49987 -2.5,-2.5 -1.73704,-5e-5 -3.53371,0 -5.25,0 z"
id="path2987"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:0.56621004;stroke:none;stroke-width:5px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /></g></g></svg>
style="fill:#000000;fill-opacity:0.56621004;stroke:none;stroke-width:5px;" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

63
logo.svg Normal file
View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="640"
height="320"
viewBox="72.5 191.5 640 320"
id="Layer_1"
xml:space="preserve"><metadata
id="metadata4389"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs4387" />
<g id="VisualEditor" transform="translate(0,55)">
<path
d="m 144.765,242.56 h 13.097 l -26.967,62.11 H 126.81 L 99.199,242.56 h 13.221 l 16.476,37.556 15.869,-37.556 z"
id="path4357"
style="fill:#2ba9e0" /><path
d="m 173.123,216.878 c 1.991,0 3.69,0.687 5.106,2.059 1.417,1.37 2.127,3.052 2.127,5.043 0,1.948 -0.71,3.628 -2.127,5.042 -1.416,1.417 -3.115,2.122 -5.106,2.122 -1.858,0 -3.496,-0.717 -4.913,-2.155 -1.416,-1.438 -2.122,-3.108 -2.122,-5.009 0,-1.859 0.706,-3.507 2.122,-4.944 1.417,-1.435 3.055,-2.158 4.913,-2.158 z m -5.972,25.682 h 12.076 v 61.047 H 167.151 V 242.56 z"
id="path4359"
style="fill:#2ba9e0" /><path
d="m 193.694,299.228 v -13.003 c 3.407,2.388 6.886,4.322 10.452,5.805 3.559,1.482 6.556,2.224 8.989,2.224 2.522,0 4.688,-0.619 6.504,-1.859 1.812,-1.24 2.72,-2.721 2.72,-4.445 0,-1.77 -0.588,-3.243 -1.76,-4.415 -1.172,-1.172 -3.703,-2.864 -7.596,-5.076 -7.789,-4.336 -12.886,-8.04 -15.295,-11.114 -2.415,-3.076 -3.619,-6.426 -3.619,-10.055 0,-4.689 1.826,-8.513 5.473,-11.481 3.653,-2.962 8.354,-4.442 14.105,-4.442 5.972,0 12.1,1.68 18.382,5.04 v 11.947 c -7.168,-4.334 -13.031,-6.504 -17.587,-6.504 -2.344,0 -4.236,0.5 -5.671,1.497 -1.44,0.996 -2.16,2.313 -2.16,3.951 0,1.418 0.649,2.77 1.953,4.052 1.304,1.285 3.591,2.833 6.866,4.645 l 4.315,2.456 c 10.175,5.749 15.268,12.119 15.268,19.105 0,4.999 -1.958,9.1 -5.874,12.305 -3.915,3.207 -8.946,4.81 -15.098,4.81 -3.628,0 -6.856,-0.388 -9.685,-1.16 -2.831,-0.775 -6.395,-2.203 -10.682,-4.283 z"
id="path4361"
style="fill:#2ba9e0" /><path
d="m 287.856,303.607 v -7.829 c -2.565,2.807 -5.497,4.993 -8.796,6.553 -3.294,1.558 -6.58,2.339 -9.851,2.339 -3.85,0 -7.402,-0.962 -10.655,-2.888 -3.251,-1.922 -5.703,-4.531 -7.364,-7.831 -1.657,-3.294 -2.485,-8.768 -2.485,-16.423 V 242.56 h 12.076 v 34.793 c 0,6.407 0.918,10.881 2.753,13.419 1.836,2.542 5.055,3.81 9.657,3.81 5.747,0 10.637,-2.807 14.665,-8.426 V 242.56 h 12.076 v 61.047 h -12.076 z"
id="path4363"
style="fill:#2ba9e0" /><path
d="m 355.272,266.913 v 25.947 c 0,2.078 0.711,3.118 2.123,3.118 1.464,0 3.741,-1.085 6.838,-3.252 v 7.366 c -2.743,1.769 -4.946,2.977 -6.604,3.617 -1.661,0.64 -3.397,0.962 -5.209,0.962 -5.177,0 -8.231,-2.035 -9.158,-6.104 -5.13,3.981 -10.594,5.97 -16.393,5.97 -4.244,0 -7.783,-1.403 -10.612,-4.212 -2.832,-2.808 -4.249,-6.337 -4.249,-10.584 0,-3.847 1.384,-7.29 4.146,-10.318 2.763,-3.028 6.692,-5.431 11.78,-7.2 l 15.46,-5.309 v -3.252 c 0,-7.341 -3.671,-11.012 -11.018,-11.012 -6.589,0 -13.004,3.405 -19.239,10.217 V 249.66 c 4.688,-5.527 11.438,-8.292 20.237,-8.292 6.594,0 11.878,1.723 15.859,5.172 1.327,1.106 2.522,2.579 3.586,4.415 1.059,1.835 1.732,3.67 2.019,5.509 0.294,1.833 0.434,5.316 0.434,10.449 z m -11.877,24.618 v -18.115 l -8.095,3.118 c -4.113,1.638 -7.022,3.285 -8.726,4.944 -1.704,1.659 -2.556,3.728 -2.556,6.205 0,2.521 0.81,4.577 2.424,6.17 1.614,1.593 3.703,2.391 6.269,2.391 3.85,0 7.407,-1.57 10.684,-4.713 z"
id="path4365"
style="fill:#2ba9e0" /><path
d="m 468.843,276.64 h 12.144 v 92.701 h -25.811 c -9.025,0 -16.227,-2.853 -21.602,-8.561 -5.374,-5.704 -8.062,-13.356 -8.062,-22.957 0,-8.979 2.819,-16.368 8.462,-22.167 5.639,-5.793 12.839,-8.691 21.598,-8.691 4.07,0 8.495,0.863 13.271,2.588 l 0,-32.913 0,0 z m 0,82.352 v -38.689 c -3.76,-1.896 -7.566,-2.854 -11.412,-2.854 -6.02,0 -10.806,1.973 -14.368,5.906 -3.559,3.936 -5.342,9.243 -5.342,15.927 0,6.282 1.549,11.126 4.646,14.532 1.857,2.032 3.826,3.407 5.904,4.112 2.081,0.706 5.817,1.064 11.217,1.064 l 9.355,0.002 0,0 z"
id="path4367"
style="fill:#9acc59" /><path
d="m 503.617,282.613 c 1.99,0 3.693,0.684 5.105,2.057 1.416,1.371 2.122,3.054 2.122,5.042 0,1.948 -0.706,3.628 -2.122,5.042 -1.412,1.417 -3.115,2.123 -5.105,2.123 -1.859,0 -3.497,-0.718 -4.913,-2.153 -1.417,-1.441 -2.123,-3.109 -2.123,-5.012 0,-1.859 0.706,-3.504 2.123,-4.944 1.416,-1.438 3.054,-2.155 4.913,-2.155 z m -5.976,25.679 h 12.08 v 61.049 h -12.08 v -61.049 z"
id="path4369"
style="fill:#9acc59" /><path
d="m 518.611,317.982 22.692,-22.298 v 12.608 h 19.311 v 10.886 h -19.311 v 29.874 c 0,6.979 2.899,10.468 8.692,10.468 4.339,0 8.918,-1.436 13.737,-4.312 v 11.28 c -4.646,2.611 -9.709,3.911 -15.196,3.911 -5.53,0 -10.128,-1.608 -13.804,-4.839 -1.147,-0.974 -2.1,-2.07 -2.853,-3.284 -0.753,-1.22 -1.379,-2.811 -1.893,-4.782 -0.508,-1.967 -0.763,-5.713 -0.763,-11.247 v -27.069 h -10.616 v -1.195 h 0.004 z"
id="path4371"
style="fill:#9acc59" /><path
d="m 601.624,308.158 c 9.29,0 17.013,3 23.159,8.996 6.146,5.995 9.225,13.524 9.225,22.589 0,8.81 -3.121,16.114 -9.355,21.931 -6.236,5.822 -14.092,8.727 -23.561,8.727 -9.152,0 -16.811,-2.946 -22.956,-8.856 -6.15,-5.902 -9.225,-13.281 -9.225,-22.129 0,-8.933 3.105,-16.378 9.322,-22.326 6.213,-5.955 14.012,-8.932 23.391,-8.932 z m -0.664,10.888 c -5.793,0 -10.551,1.901 -14.264,5.704 -3.72,3.803 -5.578,8.649 -5.578,14.532 0,5.836 1.901,10.606 5.71,14.298 3.802,3.693 8.692,5.543 14.664,5.543 5.925,0 10.781,-1.867 14.564,-5.609 3.784,-3.735 5.677,-8.526 5.677,-14.362 0,-5.799 -1.973,-10.599 -5.905,-14.4 -3.939,-3.805 -8.896,-5.706 -14.868,-5.706 z"
id="path4373"
style="fill:#9acc59" /><path
d="m 660.354,308.292 v 14.001 l 0.663,-1.064 c 5.841,-9.419 11.677,-14.133 17.518,-14.133 4.555,0 9.312,2.304 14.269,6.904 l -6.372,10.617 c -4.202,-3.98 -8.095,-5.973 -11.681,-5.973 -3.892,0 -7.262,1.858 -10.119,5.572 -2.852,3.718 -4.277,8.118 -4.277,13.206 v 31.917 H 648.209 V 308.29 l 12.145,0.002 0,0 z"
id="path4375"
style="fill:#9acc59" /><g
id="g4377"><path
d="m 387.256,358.539 v 11.635 c 0.918,0.058 1.854,0.094 2.819,0.094 4.913,0 9.189,-0.525 12.843,-1.591 3.647,-1.062 7.333,-2.833 11.046,-5.308 v -11.812 c -6.721,4.955 -14.066,7.437 -22.029,7.437 -1.653,-0.002 -3.202,-0.167 -4.679,-0.455 z"
id="path4379"
style="fill:#9acc59" /><path
d="m 407.794,315.591 c -4.824,-5.661 -11.281,-8.495 -19.376,-8.495 -0.396,0 -0.771,0.041 -1.162,0.056 v 10.475 c 0.386,-0.02 0.767,-0.043 1.162,-0.043 4.335,0 7.785,1.304 10.35,3.915 2.564,2.612 4.006,6.325 4.315,11.149 h -15.827 v 7.229 h 27.771 v -1.524 c 0,-9.509 -2.409,-17.095 -7.233,-22.762 z"
id="path4381"
style="fill:#9acc59" /></g><path
d="m 375.18,210.906 h 12.076 V 401.094 H 375.18 V 210.906 z"
id="path4383"
style="fill:#2ba9e0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -20,7 +20,7 @@
*/
( function () {
var conf, tabMessages, uri, pageExists, viewUri, veEditUri, isViewPage,
init, support, getTargetDeferred, userPrefEnabled,
init, support, getTargetDeferred, enable, userPrefEnabled,
plugins = [];
/**
@ -341,6 +341,8 @@
support.contentEditable &&
( ( 'vewhitelist' in uri.query ) || !$.client.test( init.blacklist, null, true ) );
enable = mw.user.options.get( 'visualeditor-enable', conf.defaultUserOptions.enable );
userPrefEnabled = (
// Allow disabling for anonymous users separately from changing the
// default preference (bug 50000)
@ -355,7 +357,7 @@
mw.config.get( 'wgUserName' ) === null ?
( conf.defaultUserOptions.enable && !conf.defaultUserOptions.betatempdisable ) :
(
mw.user.options.get( 'visualeditor-enable', conf.defaultUserOptions.enable ) &&
enable && enable !== '0' &&
!mw.user.options.get(
'visualeditor-betatempdisable',
conf.defaultUserOptions.betatempdisable