نقاش المستخدم:وهراني/Twinkle-on.js

Urgent: Please reduce the amount of errors this script is causing

عدل

Apologies for writing in English, but I saw that you reverted a fix to your script so I would like to understand why and help you achieve whatever your goal is.

The script as currently written does not work. It threw 231 errors in the last day, making it the 6th most prominent JavaScript error across all Wikipedia code. An error that occurs with such frequency exposes information about the page viewing habits of those who use it. Because of this I updated your script to use the local gadget which functions without errors.

If you are intentionally running your own version, you will need to fix this script. JavaScript runs asynchronously so all your calls to importScript and importStylesheet happen simultaneously, however those scripts depend on them loading in the correct order.

importScript('mediawiki:Gadget-select2.min.js');

can be replaced with

mw.loader.getScript('/w/index.php?title=mediawiki:Gadget-select2.min.js&action=raw&ctype=text/javascript').then(function () {

   // load next dependency

})

Please find a way to stop this script throwing errors and test any further scripts for errors using your JavaScript error console.

Also ping @User:علاء Jon (WMF) (نقاش) 16:46، 17 ديسمبر 2020 (ت ع م)ردّ

مرحبًا وهراني أتمنى منك المطالعة والتعليق، فالظاهر أنَّ الكود يُظهر أخطاء كثيرة (231 خطأ!) ويُعد السادس في الأخطاء على مستوى جميع مشاريع ويكيميديا، وكما تعلم المؤسسة تعمل جاهدةً مؤخرًا على محاولة حل إشكال هذه الأخطاء. تحياتي --علاء راسلني 18:40، 17 ديسمبر 2020 (ت ع م)ردّ

@Jon (WMF): i want to terminate my work to present a clean script. So I ask you to stop your «maintenance» operation for a moment. --- مع تحياتي - وهراني 22:51، 17 ديسمبر 2020 (ت ع م)ردّ
my javascript error console is clean now. can I have your opinion @Jon (WMF):.
Now, Why the english version of Twinkle is non appropriate to our wiki ? the answer is simple, "most modules have been designed only with English Wikipedia in mind". So our must use a local version, of course a clean version. - مع تحياتي - وهراني 23:20، 17 ديسمبر 2020 (ت ع م)ردّ
I will hold off on my edit.

The new script looks much better - thank you - but gives me 50 HTTP errors in my JavaScript console when run. I think you need to replace `mediawiki:` with`MediaWiki:` Jon (WMF) (نقاش) 03:37، 18 ديسمبر 2020 (ت ع م) .ردّ

@Jon (WMF): I replaced `mediawiki:` with `MediaWiki:`. --- مع تحياتي - وهراني 14:08، 18 ديسمبر 2020 (ت ع م)ردّ

Thank you for fixing so quickly! No errors in the last 12hrs :) Jon (WMF) (نقاش) 16:00، 18 ديسمبر 2020 (ت ع م)ردّ

@Jon (WMF): I think it's time to restore this version as official version of twinkle on arwiki.--- مع تحياتي - وهراني 19:33، 18 ديسمبر 2020 (ت ع م)ردّ
عد إلى صفحة وهراني/Twinkle-on.js