Proiect:Cod Wikipedia/Bookmarklets/Reparație poceli
Script pentru reparat poceli în pagini de web:
Exemple de asemenea pagini pocite:
- Croitorul Regelui, 15 aprilie 2007, Raluca Grintescu, Roxana Roseti, Jurnalul Național
- Regele și Margareta - De „Ziua Republicii", Mihai și-a desemnat succesoarea, 2 ianuarie 2008, Ilarion Tiu, Jurnalul Național
- http://www.observatordebacau.ro/2007/08/16/cutremur-de-79-grade-in-peru-72-de-morti-si-680-de-raniti.html
- http://www.time4news.ro/ultima-ora/mircea-badea-n-romnia-e-important-s-ai-tupeu.html
- http://www.magicfm.ro/muzica/magic-news/123/Actria-Eva-Green-ar-urma-s-o-ntruchipeze-pe-Maria-Callas-pe-ecran--.html
- Societatea anonimă de asigurări «Agricola», 3 octombrie 2007, Adrian Majuru, Capital
- Balul ca business, 19 decembrie 2007, Adrian Majuru, Capital
javascript:
var Manifest = " This program is in the Public Domain. You can use it as you wish (except the function HTMLREPLACE()). ";
var Comment = "Function HTMLREPLACE() is from this link - http://stackoverflow.com/questions/1175775/find-all-instances-of-old-in-a-webpage-and-replace-each-with-new-using-a-ja";
function HTMLREPLACE(a, b, element) {
if (!element) element = document.body;
var nodes = element.childNodes;
for (var n=0; n<nodes.length; n++) {
if (nodes[n].nodeType == Node.TEXT_NODE) {
var r = new RegExp(a, 'gi');
nodes[n].textContent = nodes[n].textContent.replace(r, b);
} else {
HTMLREPLACE(a, b, nodes[n]);
}
}
}
function hex2asc(hex) {
var str = '';
for (var i = 0; i < hex.length; i += 2) str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
return str;
}
HTMLREPLACE("„","“"); var sample_link="http://www.hotnews.ro/stiri-presa_regionala_arhiva-1725794-niki-spaga.htm";
HTMLREPLACE("–","–");
HTMLREPLACE("—","–");
HTMLREPLACE("’","’");
HTMLREPLACE("‘","‘");
HTMLREPLACE("“","“"); var sample_link="http://www.evz.ro/cum-s-a-ales-cel-mai-tanar-parlamentar-roman-831197.html";
HTMLREPLACE("â€","”"); var sample_link="http://www.evz.ro/Ioana-fiica-Andei-Clugreanu-batjocorit-de-televiziuni-1004928.html";
HTMLREPLACE("”ž","„"); var sample_link="http://www.evz.ro/BTAIE-DE-JOC-Ioana-Tufaru-a-fost-dezbrcat-la-televizor-1004330.html";
HTMLREPLACE("„","„");
HTMLREPLACE("…","…");
HTMLREPLACE("ö","ö");
HTMLREPLACE("ü","ü");
HTMLREPLACE("Ãœ","Ü");
HTMLREPLACE("é","é");
HTMLREPLACE("î","î");
HTMLREPLACE("Ã¥","â");
HTMLREPLACE("ÃŽ","Î");
HTMLREPLACE("Å¢","Ț");
HTMLREPLACE("Èš","Ț"); var sample_link="http://www.evz.ro/dezmatul-de-vineri-seara-bautura-altercatii-si-exhibitionism-galerie-foto-1058617.html";
HTMLREPLACE("Åž","Ș");
HTMLREPLACE("Ș","Ș");
HTMLREPLACE("Ä‚","Ă");
var comment="Extra";
var comment="� - can be î or â or Î - check: http://jurnalul.ro/special-jurnalul/croitorul-regelui-87556.html";
HTMLREPLACE("�","î");
HTMLREPLACE("ă","ă");
HTMLREPLACE("â","â");
HTMLREPLACE("ÅŸ","ș");
HTMLREPLACE("È™","ș");
HTMLREPLACE("Å£","ț");
HTMLREPLACE("È›","ț");
var comment="A caron - to breve";
HTMLREPLACE("ÇŽ","ă");
var comment="Ã... can be Ă or  - check: http://jurnalul.ro/special-jurnalul/amigdalita-lui-gil-dobrica-112136.html";
HTMLREPLACE("Ã...","Ă");
var comment="check http://jurnalul.ro/campaniile-jurnalul/viata-mea-e-un-roman/viata-ca-un-roman-colegul-regelui-26177.html";
HTMLREPLACE("«","«");
HTMLREPLACE("»","»");
var comment="check http://www.agero-stuttgart.de/REVISTA-AGERO/ISTORIE/Romance%20celebre%20de%20Venera%20Dumitrescu-Staia.htm";
HTMLREPLACE("\uFFFD","î");
var comment="Bullet (•) - check http://jurnalul.ro/special-jurnalul/editie-speciala-100293.html";
HTMLREPLACE("•","•");