Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.
This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:
git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
parallel zopflipng -m -y {} {} \;
Files which zopflipng was not able to compress more efficiently were left unmodified.
Bug: T127608
Change-Id: I0bcc35a4d27a7589cd1a3f6569ef8089e8b6ec02
For the work on T113243, the Popups extension should be structured in a
more flexible way. This is achieved with this change.
Following has changed:
* The main/core logic of Popups now lives in ext.popups.core to be shareable
between implementations
* The desktop specific logic lives in ext.popups.desktop now, the frontend init
code in ext.popups.desktopTarget and the desktop renderer in
ext.popups.renderer.desktopRenderer
This change doesn't change the functionality of Popups.
Change-Id: I72121e0a1e4b2952f85dc1bc8cf59d06b8d22f47
This doesn't need to be a property. Its being used exactly once, and
because we try to test for NavigationPopup's availability so soon we
mostly get an incorrect answer.
Moving the condition to the render method instead. Chances of NavPop
being loaded when the settings' screen is being rendered are much
higher.
Bug: T109912
Change-Id: I3723dc1e3e9400b6ed2e0160104c849a25a71881
mw.RegExp.escape() is already used in ext.popups.core.js and
the dependency to module 'mediawiki.RegExp' is set.
Change-Id: Iaa7ab6902693c787234fd589276fa38ce75b82da
Right now the main renderer always picks the article renderer, no matter
if any other renderers is registered. It will now run the 'matcher'
method in the rendered, and if it returns true, we use that renderer.
Not sure how we'll avoid matchers stepping on each other.
Bug: T69434
Bug: T102921
Change-Id: Ib06812836cdbd3a5bfd54d4bc6147012fb891694
Adds the jscs and jshint packages for development and their tasks in
Grunt. Also fixes all the code convention errors.
Change-Id: If1c9dfdbe22d4912d78b6a51b1292866970a85cc
The global disablePopups function from NavigationPopups got scoped to
pg.fn.disabledPopups at some point. We were relying on that function
to both detect and disable the gadget.
Bug: T109912
Change-Id: I3d6de60ca2a387e45675ddb04cdc45b0f967e46a
Don't request unused prop=info and its rvprop=watched;
use formatversion=2 instead of indexpageids to simplify processing the
returned query object.
Bug: T103981
Change-Id: I1c0f9b0245a823413f5fed78bc1d0d46ef978cef
Popups' API query request specifies the string 'true' as the value for
some boolean request parameters, but that's functionally identical to
specifying boolean true -- both get encoded as param=true in the HTTP
request.
Change-Id: Icc5f4b8ef6faaffe4a23c964f8cd8c2582d28381
Replace $.escapeRE from 'jquery.mwExtension' by
mw.RegExp.escape from 'mediawiki.RegExp'.
Bug: T103610
Change-Id: I1d23e4c02d92828291b98a52b4e8050fbebc06d9
mw.Uri throws an exception when dealing with -
href="javascript:void(0);"
href="mailto:abc@example.com"
etc.
Using a try…catch to return undefined in this case.
Bug: T95215
Change-Id: I632e9dc0e70a5fddf9f2573572bfc8e7f6232923
This is needed for wikis that use LanguageConverter, since the title
attribute is converted to the user's variant, and the canonical title is
needed for the API unless converttitles is specified.
For filtering, instead of comparing linkHref and expectedHref, filter
out links that have other query parameters or aren't in content
namespaces.
Bug: T93605
Change-Id: I5534753307ed5e1d4b27c52c616fd143b2a397e1
Based on the comments this is what it supposed to be.
mw.popups.render.article does the API-queries on init, so do that after
the API_DELAY-timer fired.
Change-Id: Ia235cbe1eb86fc774edda84208d320843401624e
Both the title and the extract were being html escaped thus producing
string like ' and " when used with .text(). So, we now use
document.createTextNode() for the normal text and .text() with the bolded
one.
Bug: T93720
Change-Id: I6bbc52e427dc636b7b0be1ad4f749d9273ff61b3
If the URL of the thumbnail has suspicious characters like ', " or \
return a <span> instead of trying to render a thumbnail.
Bug: T88171
Change-Id: Ide052ea2a7de166599d077a385a6e788bfa63302
Instead of replacing all instances of the title in the extract -
'$1<b>$2</b>$3'
We now put symbolic strings there which we use to split the string
and then make an array of text and <b> elements that get appended
to $contentbox.
Bug: T76378
Change-Id: I02222bbff84532f63cac67af1bf889c328ec6ff2
Use proven technology to create and compare URLs.
This will display popups also on anchored links again.
Change-Id: Ic010ca027017435f666782e709e641cf3bbb8767
Hotfix for Ie34064860a81c7866b8e8b86858d2e12a8a196f4
Still won't show up popups for anchored links, but dunno if intended.
Change-Id: I91a15153cb8bcae6d8ef2e5616855e4d45be6d78
Use the getUrl method to check that the <a> actually links
to the article that it has the title of. Only those elements
are returned by selectPopupElements.
Bug: T70039
Bug: T72512
Change-Id: Ie34064860a81c7866b8e8b86858d2e12a8a196f4
This is a subset of patch Ie340648. If reviewing and merging the much
larger other patch (it does much more things) is a problem, we can
merge this first, rebase the other one and have a much more focussed
discussion.
Change-Id: I4549fb1810c7dd36df8a70983d9508015c2bfadf
HTML5 allows <a> elements with no href="..." attribute. We do this in
Wikibase/Wikidata in a few places. Hovering these <a> elements causes
TypeErrors.
This is a hotfix. Please see Ie340648 for a much more advanced fix.
Change-Id: Ib20ef8348c964a6ba736d0fc76909fd4d496c11e
- Don't prevent the link click event.
- Check with the currentLink element rather than jQuery selectoin.
- Add click handler to images (used to be only extract).
- Stop the 'closePopup' if 'reset' has already been run.
Bug: T86378
Change-Id: I8748ecffe55954425656c5103fa9ddc99b6f3f72
This <div> had been sitting visible at the bottom of the page
and went unnoticed till it caused problems with the ContentTranslation
extension.
Hiding it using 'display: none;' causes issues with the masking
of the images, thus putting the div out of the view port.
Bug: T76718
Change-Id: I731128c827aa093e0ffab52dc378aea386b0bb3c
Currently .mwe-popups-extract keeps some empty space after the last
line. This shifts a little when zooming in causing part of the text
of the next line to be visible. Reducing this to have lesser extra
empty space solves the problem.
Bug: 73551
Change-Id: I968fca23fe2de04cb3f73ba4e7d4f676fbf88536
When zooming in the border of the div is visible over the :after
pseudo element.
- Update top and bottom triangle mixins to include @extra argument
- Update pseudo elements to use the new mixin and position them
correctly according the extra size
Bug: 73550
Change-Id: I05b9c74a675c69e407c4c78771504f447da754c5
Hovercards is currently at 5 z-index which causes
it to be rendered behind the compact personal bar.
Changing this also effects the border triangles and
masked SVGs, thus incrementing them too.
Bug: 72882
Change-Id: Ib3c889c748a9c919754d8281e68fd0664db7c408
This was happening due to:
* Stale CSS selector
* Incorrect margin values
Also added missing triangle pokey for a particular
orientation of the hovercard.
Bug: 71872
Change-Id: Ic4986f9cee2a92b29548ef21f9bec3f2c2117e98