Jump to content

Talk:XTools/ArticleInfo.js

About this board

Can't use both Recoin with ArticleInfo.js

1
Gnoeee (talkcontribs)
Reply to "Can't use both Recoin with ArticleInfo.js"

Styling issue in Vector 2022

3
Summary by Asartea

Fixed

Asartea (talkcontribs)

Hi,

Vector 2022 has changed the way it calculates base text size, so the text generated by this script now looks far too big relative to the page title, and also clips far too close to it. In addition to that it appears that in old vector its appended below "From Wikipedia, the free encyclopedia", but in new vector it gets appended above it

MusikAnimal (talkcontribs)

Hi, thanks for reporting this! I believed it is fixed now, both on the global gadget and enwiki's local gadget. Other wikis with their own copy may need to copy the same fix.

Asartea (talkcontribs)

Can confirm that on enwiki the styling is yet again equivalent for new and old vector. Thanks @MusikAnimal.

Summary by MusikAnimal

no longer minified :)

TheDJ (talkcontribs)

Why is this 'minified' on whitespace ? Makes it harder to read the code etc. Probably also want to clarify the copyright status btw. Usually WMF work is GPL by default, MIT or multi licensed, whereas gadgets are CC by-SA 3.0 by default.

MusikAnimal (talkcontribs)

Good to know, I wasn't sure if we were allowed to change the license. It is intentionally minified to prevent meddling. There will however be a comment with a link to the full source, just waiting on a PR to get merged for that to happen.

TheDJ (talkcontribs)

Yeah, just put whatever licenses you want in the comment at the top of the file.

> It is intentionally minified to prevent meddling

Honestly, to me that sounds like a terrible reason to get rid of whitespace. Copy paste, http://jsbeautifier.org and bypassed :)

MusikAnimal (talkcontribs)

Well, it's not meant to be foolproof, just a deterrent =P We've included a link back to the original source, just remove the ?uglify=1 to see the full source. It has one problem of querying XTools via http instead of https, but we're working on that. I've also indicated it is released under GPL v3.

The gadget showing page creator as incomprehensible symbols

2
Summary by MusikAnimal

Fixed

علاء (talkcontribs)

Hello,

I'm opening this section based on this complain at arwiki, that this gadget showing page creator as incomprehensible symbols. Please see this screen shot.

MusikAnimal (talkcontribs)

Sorry about that. This should be fixed now.

Some characters are incorrectly parsed

4
Summary by MusikAnimal

Fixed!

1234qwer1234qwer4 (talkcontribs)
MusikAnimal (talkcontribs)
1234qwer1234qwer4 (talkcontribs)

Sorry, I was talking about the gadget/script on the page.

1234qwer1234qwer4 (talkcontribs)
1234qwer1234qwer4 (talkcontribs)

On en:User:ترجمان05, the user and the number of edits after "created by:" are swapped. That probably means a left-to-right mark should be inserted somewhere.

MusikAnimal (talkcontribs)

Fixed with 6abf9c2, will go out with the next deploy. Thanks for flagging these issues! Though for future reference, Phabricator is always better :)

1234qwer1234qwer4 (talkcontribs)

Thanks, I just reported it here because I thought this was more appropriate for an on-wiki script. Will keep this in mind in the future.

1234qwer1234qwer4 (talkcontribs)

The number of contributions for an IP after "created by:" is always shown to be zero; if there's no way to fix this, it might be better to hide the number for IPs.

MusikAnimal (talkcontribs)

Fixed with f903bdfe, will go out with the next deploy

Summary by MusikAnimal

Javanese translations deployed

Labdajiwa (talkcontribs)
MusikAnimal (talkcontribs)

@Labdajiwa Translatewiki.net hasn't synced the translations to the repository yet, as I see there is no jv.json file. They usually do this twice a week or so, it should get synced soon, and then I can deploy it.

Labdajiwa (talkcontribs)

@MusikAnimal Idk if it will be synced. There are translations since 2020 but hasn't synced to the repository since then. . Regards.

MusikAnimal (talkcontribs)

Interesting! Did you do most of the translations very recently? It's possible Translatewiki.net didn't sync yet because there weren't enough translations, but that's purely a guess. I see now it is 60% translated, which is a lot. We can seek assistance at https://translatewiki.net/wiki/Support if need be.

Labdajiwa (talkcontribs)

Yes, that's true. For now, I will wait for the next sync if it's likely to be synced.

Labdajiwa (talkcontribs)

So, I just checked on the repository and it's synced now. All good.

MusikAnimal (talkcontribs)

Deployed!

GeneralNotability (talkcontribs)
MusikAnimal (talkcontribs)

What browser are you using? Nothing changed on the XTools-side. It should accept requests from any origin. E.g.:

curl -i -H 'Origin: https://example.org' 'https://xtools.wmflabs.org/api/page/articleinfo/en.wikipedia.org/Draft:Eric_Garland?format=html&uselang=en'

running this, I see access-control-allow-origin: https://example.org in the response headers.

Martin Urbanec (talkcontribs)
GeneralNotability (talkcontribs)

I'm using Firefox 81 + Win10.

MusikAnimal (talkcontribs)

The deployed version has no specified protocol and has not been touched in almost exactly a year, and the enwiki gadget explicitly uses https. The script generated by the app (intended to be copied/pasted to the wiki) still generates http instead of https, though, and the uglified version is broken (phab:T256582). So I'm not sure what script you are using, @Martin Urbanec, but regardless I believe your issue is separate from what GeneralNotability is reporting.

I tested in Firefox 81 and all is working fine. I can't test on Windows, but that shouldn't matter. @GeneralNotability are you seeing this issue on all wikis?

Martin Urbanec (talkcontribs)

I used mw.loader.load(LINKTOXTOOLSJSFILE), see https://ctrlv.tv/xUsz for a screencast. It works with https.

GeneralNotability (talkcontribs)

I'm using this script via my global.js using the method suggested at XTools#Installation on Wikimedia wikis, import line is mw.loader.load('//www.mediawiki.org/w/index.php?title=XTools/ArticleInfo.js&action=raw&ctype=text/javascript');. I spot-checked and I'm definitely seeing this issue on multiple wikis.

Martin Urbanec (talkcontribs)

Weirdly enough, it works for me when I use the mw.loader.load('//www.mediawiki.org/w/index.php?title=XTools/ArticleInfo.js&action=raw&ctype=text/javascript'); snippet.

Reply to "CORS"
There are no older topics