User talk:Js/ajaxPreview.js

Need QDiff
Could you make a new gadget for quickly displaying the change of editing like this so useful gadget? --百楽兎 (talk) 01:51, 26 January 2010 (UTC)


 * I assume you mean that it would be very nice if this user script was added as a Gadget. And I agree with that, it would be very nice, since this is a fantastic script. So please add your "support" over at Gadget/proposals.
 * --David Göthberg (talk) 02:22, 26 January 2010 (UTC)


 * I mean I need a new tool like ajaxPreview.js, but its function is quickly showing the changes of editing as the same as the result of pushing down the "Show changes" button.--百楽兎 (talk) 01:48, 30 January 2010 (UTC)

Stopped working
This script stopped working for me today. I got the error “wgWikiEditorPreferences is not defined” in the error console, but when I tried the recently added code,, it returns  , despite the variable   not being defined. I think it should be  instead. That seems to work for me (i.e. it returns ). I use Vector and Firefox 3.6. Svick (talk) 22:46, 22 April 2010 (UTC)
 * Thank you for reporting that. Problem now fixed, and the preview and diff functions work again as well (had been broken since Mediawiki 1.16 upgrade). —Th e DJ (talk • contribs) 23:19, 22 April 2010 (UTC)

Changes button doesn't work for editing sections
If you are editing just a section, the Changes button doesn't work - it thinks you are deleting all the other sections! For example, try to edit a section on this talk page.--greenrd (talk) 09:08, 30 September 2010 (UTC)


 * This has been fixed some time ago. — AlexSm 18:48, 30 September 2011 (UTC)

Changes button gives cryptic error if page does not exist yet
If the page you are editing does not exist yet (i.e. you're creating a new page), the Changes button shows a technical error message. A more user-friendly error message, or even showing all the new text as changes, would be preferable.--greenrd (talk) 09:31, 30 September 2010 (UTC)


 * I'll see if I can fix that. — AlexSm 18:48, 30 September 2011 (UTC)


 * I simply removed the button on page creation. I could look into making it work properly instead if someone requests this. — AlexSm 03:38, 9 October 2011 (UTC)

[BUG] AJAX preview is different from what is saved
I'm using the secure server and the code should generate a URL which points to https://secure.wikimedia.org/wikipedia/en/w/index.php?title=User_talk:Js/ajaxPreview.js&action=history but when I preview this section using User:Js/ajaxPreview.js it points to which doesn't exist.

If I save the page, or use the normal preview from MediaWiki, the link is correct.

Could you fix the ajaxPreview script? Helder 18:02, 30 September 2011 (UTC)


 * I think I traced it to a temporary hack which is mentioned at WM blog relative-urls and explained at this post. It's not the script's fault that MediaWiki API returns incorrect link so I don't have plans to fix the script. The developer wrote "I am not leaving this up for more than two weeks"; I'll see if I can contact the developer to fix this sooner. — AlexSm 18:48, 30 September 2011 (UTC)
 * I suspected it could be something like that. Thanks for investigating the root of the problem. Helder 20:24, 30 September 2011 (UTC)


 * The developer says it was fixed and indeed now API outputs working link although not a secure one. I'm not sure if API will produce secure link some time in the future but imho it's not a big problem anyway. — AlexSm 21:00, 30 September 2011 (UTC)
 * Thanks! Helder 22:02, 30 September 2011 (UTC)

Fix loading issues
Hi!

Could someone make [//en.wikipedia.org/w/index.php?title=User:Js/ajaxPreview.js&oldid=474105305&diff=512081575&diffonly=1 this update] to fix some issues with this script? (sometimes the buttons are not shown, because the code gets executed too soon). Helder 22:18, 12 September 2012 (UTC)
 * So? Helder 17:12, 6 October 2012 (UTC)
 * done —Th e DJ (talk • contribs) 09:02, 9 October 2012 (UTC)

Preview of the titles of sections with links is broken
If we add a link to the summary, as in [//en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit&section=new&preview=yes&preloadtitle=%5Bhttps%3A%2F%2Fen.wikipedia.org%20Test%5D this example] and use the ajax "Preview" button, the link is not parsed as it should. Specifically, we get instead of in the HTML. Helder 16:36, 14 January 2013 (UTC)

Fix dependencies
After the addition of mathjax rendering support (thanks TheDJ!), I believe it is necessary to make sure User:Js/preview2.js is only loaded after the module "user.options", as in this change. Helder 14:45, 3 June 2013 (UTC)
 * ✅ - Hoo man (talk) 20:42, 3 June 2013 (UTC)

tooltipAccessKeyRegexp and tooltipAccessKeyPrefix are deprecated
Hi!

I noticed this script is generating the following warning: Use of "tooltipAccessKeyRegexp" property is deprecated. Use mediawiki.util instead. and Use of "tooltipAccessKeyPrefix" property is deprecated. Use mediawiki.util instead. Could someone fix this? Alex Smotrov, TheDJ? Helder 14:57, 23 August 2013 (UTC)
 * I've disabled the edit request for now - edit requests are only for when the change is obvious or when the code to be used is available in a sandbox somewhere. Not many of the admins who patrol CAT:EP can code JavaScript, actually. If you don't get a reply from Alex or from TheDJ, perhaps you could try asking at WP:VPT? — Mr. Stradivarius  ♪ talk ♪ 07:05, 24 August 2013 (UTC)
 * I had already done this, but forgot to disable the request. There is some further work to do here, mostly in regard to firing the wikipage.content hook and replacing the collapsible triggers with mw.hook point in Common.js. But that's for a different day :D —Th e DJ (talk • contribs) 11:20, 24 August 2013 (UTC)

Since 125426 is live, we are now getting another error: Use of "tooltipAccessKeyRegexp" is deprecated. Use jquery.accessKeyLabel instead. I think 132003 can be used as an example as how to fix this issue. Helder.wiki 15:07, 17 May 2014 (UTC)
 * Fixed. Helder.wiki 20:26, 26 July 2014 (UTC)

Use mw.config.get
Hi!

Could someone (TheDJ, Js, Alex Smotrov?) replace  by a call to  ? This would make the script to work on Translatewiki, where these variables are not in the global scope (currently I get the error message " Uncaught ReferenceError: wgArticleId is not defined "). Helder 00:48, 29 August 2013 (UTC)
 * done —Th e DJ (talk • contribs) 06:54, 29 August 2013 (UTC)