|
User scripts | |
---|---|
preferences. This page provides a list of available scripts and instructions on installing them. User scripts are written in JavaScript.
| User scripts are powerful customizations, authored by the community, that allow registered Wiktionarians to change Wiktionary's interface beyond the options available in |
How to install user scripts: (Simple method for scripts located on English Wiktionary)
| |
Automatic installer: Script Installer makes script installations fully automatic. The installer itself must first be installed manually. Afterwards, scripts can be installed with a single click. | |
| |
|
This is a portal about user scripts. The main purpose of this page is to list all of the useful userscripts that exist. Feel free to add a new userscript.
If you want to request a userscript or discuss a development-related stuff or just have an idea refer to here.
{{auto cat}}
and save the page, or add it and preview.Scripts that add to or refine editors' toolsets.
{{m}}
, {{l}}
) can display tooltip with link to references if hovered, 3) Language bibliography page (Appendix:Church Slavonic bibliography) can replace marked queries (orange color) by known word (hash in address or search input at screen bottom). Language codes are stored in browser local storage. {{diff}}
Reconstructed:language name/
with an asterisk in category pages containing reconstructed terms (such as Category:Proto-Indo-European nouns), making the list much easier to read.{{User:Dixtosa/expandable}}
now it is supereasy to create expandable lists. The template also has prefix and suffix parameters. see it for details.The template Template:navbox does not use the parameter(s): groupstyle=background-color: #DFEFFF; listclass=vlist liststyle=background-color: #E8F3FF; text-align:left; name=Snippets navbar=plain style=border: 2px ridge #CAE1FF; titlestyle=background-color: #BADFEB;Please see Module:checkparams for help with this warning. Snippets This list is transcluded from Wiktionary:User scripts/Snippets. Here are the list of snippets that are proof of concepts. They are supposed to be useful for creators.
Get wikitext
function get_wikitext(pageTitle) {
var wikitext = "";
$.ajax({
url: mw.util.wikiScript( 'index' ),
data: {
action: 'raw',
title: pageTitle
},
type: 'GET',
success: function( result ) {
wikitext = result;
},
error: function( xhr ) {
alert( 'Error.\nRequest failed.' );
},
async: false
});
return wikitext;
}
Editing pagefunction addNewSection( pageTitle, summary, content, editToken ) {
$.ajax({
url: mw.util.wikiScript( 'api' ),
data: {
format: 'json',
action: 'edit',
title: pageTitle,
section: 'new',
summary: summary,
text: content,
token: editToken
},
dataType: 'json',
type: 'POST',
success: function( data ) {
if ( data && data.edit && data.edit.result == 'Success' ) {
window.location.reload(); // reload page if edit was successful
} else if ( data && data.error ) {
alert( 'Error: API returned error code "' + data.error.code + '": ' + data.error.info );
} else {
alert( 'Error: Unknown result from API.' );
}
},
error: function( xhr ) {
alert( 'Error: Request failed.' );
}
});
}
Current
LangName → LangCodenew LanguageUtilsAsync().GetWiktionaryCodeByCanonicalName("Georgian").then(function(langcode){
//do something with langcode
});
LangCode → Canonical namenew LanguageUtilsAsync().GetCanonicalNameByWiktionaryCode("ka").then(function(langname){
//do something with langname. Here it is "Georgian"
});
|
For more take a look at here.
These functions can be included directly in a script but don't do anything unless called by some other code. The functions marked as deprecated have been rendered obsolete by new features added to MediaWiki, and only exist now as wrappers for compatibility with existing code.
Documentation | Summary |
---|---|
User:Dixtosa/XMLize.js | (de)XMLization of wikitext. Good for wikitext processing. |
morebits.js | A collection of wiki-related functions (such as editing via the API and displaying Twinkle-style windows), maintained as part of Twinkle (but usable separately) |
|
{{subst:iusc|1=User:Erutuon/scripts/scriptTitles.js}}
{{subst:iusc|1=User:Swalladge/scripts/sToSearch.js}}
{{subst:iusc|1=User:Erutuon/scripts/gadgets-definition.js}}
{{subst:iusc|1=User:Betty/custom_languages.js}}
{{subst:iusc|1=User:Dixtosa/nymReferer.js}}
{{subst:iusc|1=User:Ruakh/Tbot.js}}
{{subst:iusc|1=User:Erutuon/scripts/addAutoCat.js}}
{{subst:iusc|1=User:Dixtosa/expandASADRS.js}}
{{subst:iusc|1=User:Erutuon/scripts/Edittools-character-names.js}}
{{subst:iusc|1=User:Yair rand/AddAudio.js}}
{{subst:iusc|1=User:Dixtosa/AjaxEdit.js}}
{{subst:iusc|1=w:en:User:קיפודנחש/TemplateParamWizard.js}}
{{subst:iusc|1=w:en:User:ערן/autocomplete.js}}
{{subst:iusc|1=w:en:User:Theopolisme/Scripts/autocompleter.js}}
{{subst:iusc|1=en:w:User:Js/ajaxPreview.js}}
{{subst:iusc|1=en:w:User:Equazcion/UniversalTransclusionPreviews.js}}
{{subst:iusc|1=User:Erutuon/scripts/templatePreview.js}}
{{subst:iusc|1=User:Dixtosa/minorEdits.js}}
{{subst:iusc|1=w:Wikipedia:AutoEd/basic.js}}
{{subst:iusc|1=w:en:User:Joeytje50/AWB.js/load.js}}
{{subst:iusc|1=User:Dixtosa/history.js}}
{{subst:iusc|1=User:Erutuon/scripts/searchLang.js}}
{{subst:iusc|1=User:Useigor/Gadget-Ledokol.js}}
{{subst:iusc|1=User:So9q/TranslationAdder-InputFiller.js}}
{{subst:iusc|1=User:So9q/FilterTranslations.js}}
{{subst:iusc|1=w:en:User:Writ Keeper/Scripts/commonHistory.js}}
{{subst:iusc|1=User:Dixtosa/WhoDidThat.js}}
{{subst:iusc|1=User:Dixtosa/skipToPost.js}}
{{subst:iusc|1=User:Dixtosa/catwatch.js}}
{{subst:iusc|1=w:en:User:MusikAnimal/customWatchlists.js}}
{{subst:iusc|1=w:en:User:UncleDouggie/smart watchlist.js}}
{{subst:iusc|1=w:en:User:Js/watchlist.js}}
{{subst:iusc|1=w:en:User:Equazcion/RemoveMarkAll.js}}
{{subst:iusc|1=w:en:User:קיפודנחש/watchlistMark.js}}
{{subst:iusc|1=w:en:User:Kephir/gadgets/hollis.js}}
{{subst:iusc|1=User:Dixtosa/unwatch.js}}
{{subst:iusc|1=User:Erutuon/scripts/watchlistScriptTagging.js}}
{{subst:iusc|1=en:w:User:Epicgenius/nothanks.js}}
{{subst:iusc|1=User:Dixtosa/highlightme.js}}
{{subst:iusc|1=User:Erutuon/scripts/reconstructedCategories.js}}
{{subst:iusc|1=w:en:User:V111P/js/wlhFilters.js}}
{{subst:iusc|1=w:en:User:Markhurd/hidetopcontrib.js}}
{{subst:iusc|1=meta:User:Dentonius/scripts/GlobalRecentChanges.js}}
{{subst:iusc|1=User:Erutuon/scripts/hideUnwantedCategories.js}}
{{subst:iusc|1=User:Dixtosa/expandable.js}}
{{subst:iusc|1=en:w:User:Equazcion/ScriptInstaller.js}}
{{subst:iusc|1=User:Erutuon/scripts/ScriptInstaller.js}}
{{subst:iusc|1=w:en:User:Dixtosa/userscriptInterwikiLink.js}}