Difference between revisions 58145 and 58148 on cawikisource

/*Barreja de diferents Mediawikis de Wikisource (ThomasV, Pathoschild, et al.)*/

function Fragment_Tipo(text) {
 var typo_def = new Array (
  "(  )", " ",
  "(— )", "—",
  "( —)", "—",
  "(- )", "-",
(contracted; show full)  "([ce]n[lt] )", "ent ",
  "( [ce]n[it]r[ce])", " entre",
  " [ce]s ", " es ",
  "[ce][8s][ce]ri", "escri",
  "[ce][8s][ce]r ", "eser ",
  "( [ceo][8s][8s][ceo]r )", " esser ",
  " [ce][s8][lt]([aáà]) ", " est$1 ",

  "exlr", "extr",
  "(fc)", "fe",
  "f[1!Iil]([bcdfgjlmnpqrstvxyz])", "fi$1", //fic,fim...
  "[fí][iïíìl!1I][iïíìl!1I][iïíìl!1I]", "fill",
  "(g[iïíìl!1I][6é]s)", "glés",
  "(g[nu][óé])", "gué",
  "(gn[ce])", "gne", //p.ex. digne
  "(gu[ce])", "gue",
  "g[nu]t", "gut",
(contracted; show full)  "(loient )", "lment ",
  "(ni[ce][nu]y)", "menys",
  "(mo[iïíìl!1]t)", "molt",
  "(—jN)", "—¡N",
  "(n[*'\\^])", "n'",
  "([*'\\^]n)", "'n",
  " [nu]o ", " no ",
  "
[a-z][un][lt]nl([ ;.:r])[aeiou]","nt$1",  //entre,contra -nt
  "(oU)", "oll",
  "(—jP)", "—¡P",
  "(prc)", "pre",
  "(—[ij]Q)", "—¡Q",
  "(Q[anou][ce])", "Que",
  "(Q[anou][iïíìl!1I])", "Qui",
  "([çq][*'\\^])", "q'",
(contracted; show full)  " [tl][iIïíìÏÌÍIL][un][ce]([h ;.:])"," tinc$1",
  "(trc)", "tre", //tb "tro"
  "( [nu][nu] )", " un ", //tb " nu "
  "( [nu][nu][oa] )", " una ", //tb " nua "
  "(uU)", "ull",
  "(▼)", "V",
  "v[ce]ll", "vell",

  "exlr", "extr",
  "(•)", ".",
  "([*\\^])", " "
 );
 
 var lng = typo_def.length;
 if (lng % 2 != 0) return text;
 for (var i = 0; i < lng; i += 2) {
  search = new RegExp(typo_def[i + 0], "g");
(contracted; show full) }
}
function add_Corr_button(){
 if (wgNamespaceNumber == 102) {
  addButton2("wpRep","Correccions automàtiques","Correcció automàtica", "//upload.wikimedia.org/wikipedia/commons/a/af/Button_Fractur_OCR.png", CreaFormulari);
 }
}
addOnloadHook(add_Corr_button);