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