Hi! I'm writing a user script that adds new links to a page, and would like to enable Page Previews handlers for those links. Per this change, it looks like the wikipage.content hook won't work, and I've been looking through the code and can't see any other way to do this. Would that be correct? (And sorry if this is the wrong venue - I wasn't sure opening a task on the Page-Previews phab workboard was a good idea.)
Page Previews: wikipage.content hook
The delegate event handler we use means any link no matter when it is added will trigger a page preview so no hooks are needed here.
The link to be considered valid however must have a link and title attribute and an associated page preview associated with the URL. This code for example will trigger a page preview:
$('<a title="Hello" href="/wiki/Hello">hello</a>').prependTo('#mw-content-text')
Thank you! I tried it, but I'm on a Special-namespace page. Will it only work in mainspace?
It displays on all special pages except those in this list: https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/extension.json#L90
A barnstar for you!
|The Special Barnstar|
|For all the work you do to make Mobile Web an awesome reading space for web readers :) X-Savitar (talk) 00:24, 7 July 2020 (UTC)|
I apologize for being so rude. Your comment is a fair point which has place to be. Sorry again.
Oh not at all. My fault for not being more careful with my editing.
I just want to make sure I play my part in keeping the creative energy flowing. I think the existing logo is outdated and I'm keen to any sort of change here.
On reflection I think it's a shame that we jumped into voted so early. There are lots of good ideas in all the logos.
I completely agree with you. We are only at the brainstorm stage now and searching for ideas. Thanks.
difference not clear (?) between tags 'mobile edit' 'mobile web edit'
mobile edit Mobile edit Edit made from mobile (web or app) 72,244 changes mobile web edit Mobile web edit Edit made from mobile web site
Hi Jon , referring to Topic:Viy7jkhlv2w5x5s2 and apart of 'This is expected behaviour.' answer from Forestier I still do not understand the difference between the tags. The number of modifications being the same for both tags, they seem redundant. One says "Edit made from mobile web site" (a) that means I have used the 'Mobile version' on my desktop for my translations (and its true). Other says "Edit made from mobile (web or app)" which covers "Edit made from mobile web" (b), and "Edit made from mobile app)"(c). I understand (b) seems the same as (a) and I wonder what are the cases "Mobile edit" which ARE NOT "Mobile web edit" ? ...
Since I make translations using the web (Special:Translate), the translated text (that means the contents) is the same when viewed on a desktop or a tablette. If one decides to cancel all updates "Mobile edit" there is a risk my translations are lost. Isn't there a warning to write for translators against this situation ?
Mobile edit is also used on edits from mobile phone applications (not mobile domain) e.g. Android and iPhone.
Consider an edit with the following tags:
Tags: Mobile edit, Mobile app edit, Android app edit
Hi Jon, Pagebanner and Women in Red.
We have 5-600 banners that we use each day on Twitter and now on our en:wiki talk page. We use some basic code to turn over to a new "Woman of the Day" each day. However our banners look no where near as good as the ones used on Wikivoyage and I'm wondering if it is possible/easy to use PageBanner on en:wiki?
Our woman of the day currently looks like this. Could this appear neater? We have run 150 editathons to date and your code would smarten us up a bit. Can you point us to how we can achieve this. ~~~~
You could always enable it for the project or talk namespace, experiment with it and turn it off if you find it is not for you.
You can also experiment with it on this test wiki page: https://en.wikivoyage.beta.wmflabs.org/wiki/Women_in_red_test - please use a throwaway account if you decide to experiment and certainly don't use your Wikipedia password on any new account you create there!
Hello Jon. Following our IRC conversation, I have declined the request to install Netlify on Wikimedia's GitHub organisation for MobileFrontend, MinervaNeue and PopUps. If however Netlify or any other GitHub App is needed over there again, please set it up and, in case you cannot approve it, please let me know to have them approved (I might need to check with RelEng though). Best regards.
Wikisource centered images rendering left in mobile
Hi. I hope that you can point me to where the configuration exists ...
On a page like https://en.m.wikisource.org/w/index.php?title=The_Works_of_Lord_Byron_(ed._Coleridge,_Prothero)/Poetry/Volume_1 the mobile skin is left aligning images that have been typeset to be centred to align with the remainder of the text on the page, see standard view, s:The Works of Lord Byron (ed. Coleridge, Prothero)/Poetry/Volume 1
So in the end we have people using text centering styles rather than image placement formatting to achieve their ends. Is this image positioning forcing something that we can control at a local level? Thanks.
Raised a bug here: https://phabricator.wikimedia.org/T193595 For quicker replies for me, best to add a task to Phabricator. Will see if I can get this fixed.
Ah, I thought that it was a feature that I could control, not a bug. Thanks.