Wikipedia:WikiProject User scripts/Guide/Ajax: Difference between revisions
Content deleted Content added
Pathoschild (talk | contribs) →Userscripts: cleanup, removed broken query.php script |
Pathoschild (talk | contribs) merged bottom sections into 'See also' |
||
Line 142:
Sometimes you might want to use preview. For example, [[Special:Prefixindex]] won't work with <code>&action=render</code>. To get rid of the unnecessary menus you could submit <tt><nowiki>{{Special:Prefixindex/somepage}}</nowiki></tt> for a preview and get a "clean" list (nevertheless, it's better to use API for prefix index)
==
===Code===
;User scripts
:* [[m:User:Pathoschild/Scripts/Ajax framework|Comprehensive AJAX framework]] (by [[user:Pathoschild|Pathoschild]])▼
:* [[User:TheFearow/simpleajax.js|AJAX editing]] (by [[user:TheFearow|TheFearow]])▼
:* [[User talk:Alex Smotrov/qpreview.js|Ajax preview]] (by [[user:Alex Smotrov|Alex Smotrov]])▼
:* [[User talk:Alex Smotrov/wlunwatch.js|Ajax unwatch from watchlist]] (by [[user:Alex Smotrov|Alex Smotrov]])▼
:* Various code with AJAX▼
:** [[Wikipedia:Tools/Navigation popups|Navigation popups]]▼
:** [[Wikipedia:WikiProject User scripts/Scripts/Twinkle|Twinkle]] (some code in [[User:AzaToth/morebits.js]], and good examples of AJAX are in the bottom of [[User:AzaToth/twinklespeedy.js]])▼
:* [{{SERVER}}/skins-1.5/common/ajax.js ajax.js] - some support functions
:* [{{SERVER}}/skins-1.5/common/ajaxwatch.js ajaxwatch.js] - watch/unwatch
:* [{{SERVER}}/skins-1.5/common/upload.js upload.js] - licenses preview on [[Special:Upload]]
:* Internal and disabled code
:** [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/AjaxFunctions.php?view=markup AjaxFunctions.php] has 2 main functions:
:**: wfAjaxWatch - server part of ajaxwatch.js
:**: wfSajaxSearch - disabled on WMF projects. If it was enabled, [{{SERVER}}/skins-1.5/common/ajaxsearch.js ajaxsearch.js] would be responsible for the client side. Also see [[mw:Manual:$wgAjaxSearch]].
:** [[mw:Manual:Live preview|Live preview]] ([{{SERVER}}/skins-1.5/common/preview.js preview.js])
===
* [[IFrame]]s are an obsolete older method (see [[User:TheFearow/ajax.js|a small untested library]] by [[user:TheFearow|TheFearow]])
▲* [[m:User:Pathoschild/Scripts/Ajax framework|Comprehensive AJAX framework]] (by [[user:Pathoschild|Pathoschild]])
* URL parameters: a script can call itself on a different by adding a custom URL parameter to the address bar. It can then check the address bar on every page load, and run code depending on the values of the custom headers. See [[User:Lupin/autoedit.js|an example unmaintaned library]] by [[user:Lupin|Lupin]]).
▲* [[User:TheFearow/simpleajax.js|AJAX editing]] (by [[user:TheFearow|TheFearow]])
▲* [[User talk:Alex Smotrov/qpreview.js|Ajax preview]] (by [[user:Alex Smotrov|Alex Smotrov]])
▲* [[User talk:Alex Smotrov/wlunwatch.js|Ajax unwatch from watchlist]] (by [[user:Alex Smotrov|Alex Smotrov]])
▲* Various code with AJAX
▲** [[Wikipedia:Tools/Navigation popups|Navigation popups]]
▲** [[Wikipedia:WikiProject User scripts/Scripts/Twinkle|Twinkle]] (some code in [[User:AzaToth/morebits.js]], and good examples of AJAX are in the bottom of [[User:AzaToth/twinklespeedy.js]])
|