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
This code has not been working because processAllPopups does
not execute. Test the change with:
https://en.wikipedia.org/wiki/User:Prtksxna/common.js
Bug: 62952
Change-Id: I3c8b5590b89693743c85c006fc0ee0a50e8b8342
The script depends on a title being present in title attribute. So
skip links without title attributes (which were getting empty
attributes due to the implementation of removeTooltips) and bail on
trying to open a preview for links without a title.
Bug: 67728
Change-Id: I4cc744bea10af34741681f11e03d77b3d53e3a3b
removeBracketsFromText doesn't count it tracks nesting level, and
brackets are [] not (). Minor detail.
Change-Id: I8f42b1ccae5233d7b6062bb311eced6ef3085d4a
Per discussion on the bug, the current values of 150ms/100ms cause a
lot of unintended actions.
Bug: 64234
Change-Id: I6fe2d89ad97630ec5c7f47d3e3b9b71d7cfc5d3f
In combination with other gadgets the error
TypeError: re.query is undefined
can occur because the request contains titles:'' and the response is [].
Change-Id: I46d02e7c48a55cd9af20fd7ef729b4d26f69a8c0
Casees:
1) Hello (and welcome)
2) Hello )and welcome(
3) (Hello (and) welcome)
The current RegExp only takes care of (1). The new code should
take care of all the cases.
Bug: 65138
Change-Id: I39f38beed0cf612067d6fc61b18295d1d38fcc22
These links were not ignored due to a typo. This also threw an error,
because these links produced query.interwiki and not in query.pages.
Change-Id: I3b5c5b900209323e3e72b41e3b02e90f1f53b4eb