MediaWiki:Gadget-common.js
Ocio: Daspò ver salvà, podaria esare neçesario snetare ła cache dal propio navegadore web par vedare i canbiamenti.
- Firefox / Safari: tegner strucà el boton de łe letare grande Shift e schiciare sora Ricarga, o se nò struca Ctrl-F5 o Ctrl-R (⌘-R so Mac)
- Google Chrome: strucare Ctrl-Shift-R (⌘-Shift-R so on Mac)
- Internet Explorer / Edge: tegner strucà el boton Ctrl e schiciare so Ajorna, o sinò Ctrl-F5
- Opera: Va in tel Menu → Inpostasion (Opera → Prefarense so on Mac) e pò in Privacy & sicuresa → Sneta dati del navegadore → Imajini e file in te ła cache.
function impostaBottoni(fun) {
$(document).ready(function () {
var saveButton = document.getElementById("wpSave");
var previewButton = document.getElementById("wpPreview");
var diffButton = document.getElementById("wpDiff");
if (saveButton) {
saveButton.onclick = fun;
previewButton.onclick = fun;
diffButton.onclick = fun;
}
});
}
/*
* Get the value of a template parameter
* str: the text of the template (without spaces, as in: "|param1=")
* param_name: the name of the parameter
*/
function findparam(str, param_name) {
var pattern = "\\n\\|" + param_name + "=([\\s\\S]*?)\\n\\|([^=\\n\\|]+)=";
var re = new RegExp(pattern);
var m = str.match(re);
if (m) return m[1];
return '';
}
function getRadioValue(radioObj) {
for (var i=0; i < radioObj.length; i++) {
if (radioObj[i].checked) {
return radioObj[i].value;
}
}
return "";
}