These methods aren't designed to return "undefined" or "null".
What they return is not checked. It's assumed to always be an
object (2 of them) or an array (1 of them). This simple patch
does make sure the following code does not fail with TypeErrors.
Bug: 55701
Change-Id: I19f51bbff2209044485b9d7cef4c7654cb5f6425
* Updated font to 2.5.5. Since there wasn't any other changes, I just
renamed font name here.
* Upstream: https://fedorahosted.org/lohit/
Change-Id: I553098e54849c19ede45951d208d81f5d681f2e1
MW ULS uses its api to load the localization. Avoid the conflict with
i18n.load method. Directly use the i18n message stores load method
Bug: 61990
Change-Id: I7ea7e7fc31a0831ae2b2c4b4301fbe81109fdf9d
Passed with svgo 0.4.2 <https://github.com/svg/svgo>, then prepended
'<?xml version="1.0" encoding="UTF-8"?>' prolog to each file since
svgo sees it fit to remove it and that breaks file type detection.
svgo truncated all numerical values to a maximum of 3 decimal places
of precision.
Applied some additional optimizations by hand (with a text editor or
in Inkscape).
Did not touch upstream-managed SVG files, will submit separate
patches for them.
File size changes:
* cog-sprite.svg: 2,520 → 1,253 bytes – 50.3% smaller
* cog.svg: 17,961 → 1,154 bytes – 93.6% smaller
* display.svg: 2,591 → 1,053 bytes – 59.4% smaller
* help.svg: 1,790 → 674 bytes – 62.3% smaller
* input.svg: 5,515 → 2,092 bytes – 62.1% smaller
* remove-input.svg: 5,956 → 2,208 bytes – 62.9% smaller
Total: 36,333 → 8,434 bytes – 76.8% smaller
Details:
* cog-sprite.svg:
* Use <defs> and <use> instead of duplicating the path data.
* cog.svg:
* Vacuumed defs with Inkscape, there were weird leftovers there.
* input.svg:
* Simplified the shapes.
* remove-input.svg:
* As above. Reused the same path data with a transform to improve
compression when embedded.
Bug: 56292
Change-Id: Iad1771829ba2711e4827befc1c73e34453734640
After seeing this wrong color dozens of times while testing svg
icons on high zooms, I can't stand the slightly different color of
the border for the caret from the rest of the ULS dialog. The border
of ULS is transparent with 0.2 alpha component over the background,
in this case I just hardcoded the resulting color here to match.
Change-Id: Ib2b2801f51ea02d2788d8703e3410eca9b3a57a3
Preferences were saved using jStorage. The browsers which ULS supports now
have wide native support for local storage, so we removed jquery.jStorage
in I09b2bd52972.
The old local storage key was 'jStorage' as put by jquery.jStorage. We now
check if that key is present. If so we migrate the preferences and remove
the old key to save space. We are not aware of anything else using this
module.
Change-Id: I995a32c4cb7a3bc818fe255f92dbc972211cb112
This patch restores the enableWebfonts preference, stored inside
the uls-preferences blob. It existed as 'enable-webfonts' in
the past and was removed in
If735a733717596fae03042c5e277bd538bd8501f
Each wiki can be configured to load the fonts by default
using the new global variable $wgULSWebfontsEnabled.
Its default value is true (to load fonts).
This also removes the preference 'uls-enable', recently added in
I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f
The initialization of ext.uls.webfonts.js is changed as well,
so that minimal webfonts JS library code is loaded,
and the rest is loaded only if a user requests it.
Bug: 60304
Change-Id: I49e812eae32266f165591c75fd67b86ca06b13f0
Files:
* Consistently have one (1) new line at EOF
(.gitignore, *.css, *.sh)
JSHint:
* Separate the common (general Wikimedia code conventions) from
the local more stricter rules (nice work!).
Maintenance:
* Use simplified $IP definition where getenv is only called once.
Based on http://git.io/ve-mw-36fc3b59-makeStaticLoader
JavaScript:
* Use the same closure in all files:
- No need for "undefined".
- One linebreak between license header and start of closure
(sometimes there were 1 or 2 empty lines).
- ext.uls.ime.js: No need for "document" (redundant in general,
but especially as it wasn't used anywhere in this file).
- Use "$, mw" for all ext.* modules (one of them used "mw, $").
Change-Id: Iba5dab14bbc3fbfc9f8fe96dd2d95529587a69aa
Load tooltip at 700ms on page load to give enough time for collapsible
navigation to finish altering sidebar layout.
Bug: 51170
Change-Id: I8c7666a51ffe68007c4aadb4e72aa668d0fe6164
Xerxes is not passing OpentypeSanitizer check per
https://bugzilla.mozilla.org/show_bug.cgi?id=964696 that is why it won't work
as web font on Chrome and Firefox. This is its derivation to fix the issue.
Change-Id: I619e0c3ecb882ee91d46b36bf65a143bd8647d2f
Turns out the messages for language selector were not loading
in Special:MainPage. This fixes that as well as cleaning up the
dependencies.
Change-Id: Ice8dcf1b2e878a0fe3cd0e002a9b1cff2f1901dd
Use RL for trigger tooltip messages to avoid using jquery.i18n just
to display the triggers. Reordered dependencies so that messages
are loaded for the setting panels and ime menu.
Change-Id: Ic9518f7b63699542deb02a413e03c28344c99fa4
This does not have much effect on the gzipped payload, but it still
makes the modules look big and (I assume) take space in the local
storage.
This prefix is not used by current versions of browsers, so the only
change is that some users with old browsers get bitmap images instead
of vector images.
Instances where -moz-linear-gradient is used with colors were left in,
as were the instances in upstream libs.
Change-Id: I1515c53955467eb21c8ed70e46aecc61ab4718c2
Adding salt won't work for IE since it uses a tofu with small width
for unassigned code points. From tests, algorithm without salt
should be enough for IE.
Change-Id: If39e6c49d272fa67f60c19f1af64f1fb71856bcd
To detect whether the client can render a given string,
use a tofu detection algorithm.
If the user has an explicit font preference, do not override it.
If the user has no preference and there is a default font for a
language, see if that language can be rendered at the user's browser
using tofu detection.
If tofu is detected, apply the font.
If the element has 'autonym' class, apply Autonym font only when
that language has tofu.
Change-Id: Ib9ee9497e6bcfa7eb86f7d264e0980d8880d6b70
So that the fontfamily values are always 'seen' by the webfonts jquery
plugin. Missing this was causing incorrect behavior -overriding the
fontfamiliy from css- in random cases.
The stylesheet ext.uls.webfonts.css define font family values for
interlanguge links and autonym class. This patch make sure that that
css values are read by jquery.webfonts while deciding which font to
apply. Autonym font is supposed to be used for them. If jquery.webfonts
does not read that these elements has a font family defined in css as
"'Autonym', sans-serif", it will attempt to apply fonts as per user
preference or default fonts based on lang attribute. That will cause
applying bigger fonts.
jquery.webfonts does not apply any fonts, if an element has explicit
font family value defined by inline css or by external style sheets.
Bug: 59958
Change-Id: I2da436caa618bc2318e20e3c0492a6bf1c03e162
Not adding as a font option for English, but make it possible to define
the font in css and get the font downloaded from server
Bug: 58203
Change-Id: I968c4c4c3ba35ca53a9762cef0f7c59b374b1f67
The calculated font-height is about 13.5px on my machine. For some
reason the usage of Autonym font sways the rounding of the container
height to 14px instead of 13px as for other items. I found out that
setting line-height to 1em or 100% makes the trigger size also round
to 13px, but I can't explain why. I didn't see any change in Modern
or Monobook skins (Monobook is broken already with bold and icon
missing).
Bug: 59239
Change-Id: I71ed556f2ef707b7e5f5891d6fc0c88c01f6b0ca
* Also improves Nazli by adding Nazli bold from its original pack
* Scheherazade-R.woff is taken from Scheherazade font pack
* Except the above, rest WOFFs and EOTs are made by sfntly
Bug: 58381
Bug: 58382
Change-Id: Iede469600ddcaebfce177f5b3d33a9fc81ea33f9
Written in pair-programming with Ryan Kaldari.
This adds a version of webfonts initialization that is stripped
of any smart features. It only loads the basic jquery.webfonts
library and the fonts repository in a way that is usable
with the MobileFronted extension.
It is completely disabled by default.
It can be enabled by setting
$wgULSMobileWebfontsEnabled = true;
and even then it will only be enabled for users
who opted in for the mobile beta mode.
Change-Id: I488e411232a1192bbf46ae5675c701366bda9a3e