User talk:Js/ajaxPreview

Error: tOld is null
Hi again! I was using the script at pt.wb and I got the following error right after moving the page "User:Heldergeovane" to "User:Heldergeovane/test": Erro: tOld is null Arquivo-fonte: http://en.wikipedia.org/w/index.php?title=User:Js/ajaxPreview.js&action=raw&ctype=text/javascript Linha: 8 tOld.style.clear = 'none' I'm using vector skin and Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5. Helder (talk) 18:22, 26 September 2009 (UTC)


 * The "pagemove" part was the key. Should be fixed now, thank you for the report. — AlexSm 03:38, 27 September 2009 (UTC)

Redirects
Hi, just wanted to report a bug with previewing redirects. It doesn't seem to code them properly. Is displayed as: 1. REDIRECT User talk:Js/ajaxPreview Instead of → User talk:Js/ajaxPreview Not sure what you can do to correct, but thought you ought to know. JonEastham (talk) 09:57, 25 May 2010 (UTC)


 * That is actually how the redirect looks in preview. — MC10 ( T • C • GB •L)  05:11, 17 September 2010 (UTC)

Help me a bit...
I have included WikEd from the Preferences and am now testing the Preview callback functionality. But it turns out that ajaxPreviewFinish never gets called! I can manually invoke the function by entering it into the browser's address bar (javascript:ajaxPreviewFinish(...)) and it works fine, but it doesn't get called automatically. Comments?

Thanks, Nageh (talk) 10:23, 23 November 2010 (UTC)


 * Never mind, I was misguided in thinking this script was part of WikEd. Nageh (talk) 11:30, 23 November 2010 (UTC)

Typo
There's a typo in the code:  should be. — mc10 ( t / c ) 05:06, 28 August 2011 (UTC)


 * Fixed, thank you. — AlexSm 18:50, 29 August 2011 (UTC)

Error: sortables_init is not defined
I am receiving the error  from the file User:Js/preview2.js, line 143. Any way to fix this? — mc10 ( t / c ) 00:00, 9 October 2011 (UTC)
 * Removing the line should fix the problem; the error likely results from the change in sortable tables resulting from the 1.18 upgrade. — mc10 ( t / c ) 00:53, 9 October 2011 (UTC)
 * I removed this line. — AlexSm 03:33, 9 October 2011 (UTC)

HTTPS error
Importing preview2.js is resulting in a partially-encrypted HTTPS page. On User:Js/ajaxPreview.js, please replace

with

Note the removal of "http:". Cheers, — mc10 ( t / c ) 00:43, 9 October 2011 (UTC)


 * In addition, please replace (on User:Js/preview2.js)
 * with
 * Cheers, — mc10 ( t / c ) 00:51, 9 October 2011 (UTC)
 * Cheers, — mc10 ( t / c ) 00:51, 9 October 2011 (UTC)
 * Cheers, — mc10 ( t / c ) 00:51, 9 October 2011 (UTC)


 * Fixed, thank you. — AlexSm 03:33, 9 October 2011 (UTC)

Change link to documentation
Since this script can be used on external wikis, it should be the case that links work properly. So on User:Js/ajaxPreview.js, should be so that it links to en.wiki. Cheers, — mc10 ( t / c ) 05:35, 18 October 2011 (UTC)


 * Done. — AlexSm 16:17, 18 October 2011 (UTC)

Uncaught TypeError on protected pages
I'm getting Uncaught TypeError: Cannot call method 'lastIndexOf' of undefined from line var name = btnOld.val; var i = name.lastIndexOf(' ') + 1 if I open a protected page such as this (which I can't edit since I'm not an admin there). I tested this on Google Chrome. Helder 20:51, 30 January 2012 (UTC)


 * Fixed (hopefully), thank you. — AlexSm 21:45, 30 January 2012 (UTC)

Other quickpreviews
See Village pump (proposals)/Archive 93 - I just wanted to post that, before I lose it again. –Quiddity (talk) 05:00, 19 September 2013 (UTC)

Bug expanding preview and changes buttons
Thank you for making the script and allowing others to use it. It is quite helpful.

I have configured the script with the following options: var ajaxPreviewPos = 'bottom'; window.ajaxPreviewExec = function(previewArea) { mw.loader.using( [   'jquery.tablesorter',    'jquery.makeCollapsible'  ], function{    $( 'table.sortable' ).tablesorter;    $( '#wikiPreview .collapsible' ).makeCollapsible;  } ); }

In using the script, I always experience an issue where the "Show Preview" and/or "Show changes" button increases in horizontal size immediately upon being clicked. Only the button clicked increases in size. I am not aware of a time that I have used this and not had this issue occur. From a programming perspective, it appears that the label assigned to the button is expanded by a bit of whitespace upon each click. The addition of a  prior to actually assigning the name to the button would probably solve the issue. &mdash; Makyen (talk) 19:09, 3 June 2014 (UTC)

Preferences
Pretty sure you can do this on preferences. Hillelfrei • talk •  06:10, 30 April 2020 (UTC)