User:Cacycle/wikEd dev.js: Difference between revisions

Content deleted Content added
0.9.6
0.9.7
Line 17:
 
var wikEdProgramHomepage = 'http://en.wikipedia.org/wiki/User:Cacycle/wikEd';
var wikEdProgramVersion = '0.9.67 (beta)';
var wikEdProgramDate = 'November 14, 2006';
 
Line 1,281:
wikEdHighlightSyntax = false;
WikEdRemoveHighlighting(obj);
obj.html = obj.html.replace(/(\t)/g, '<' + 'pre class="wikEdTabPlain">$1<' + '/pre><!--wikEdTabPlain-->');
}
wikEdFrameBody.innerHTML = obj.html;
Line 2,391:
// display tabs
else {
obj.html = obj.html.replace(/(\t)/g, '<' + 'pre class="wikEdTabPlain">$1<' + '/pre><!--wikEdTabPlain-->');
}
 
Line 2,454:
}
buttonObj.style.cursor = 'auto';
}
 
// grey out inactive buttons
Line 2,837:
}
 
// replace unsupported chars (in IE6): change decimal, hex, and chars into character entities
for (i = 0; i < wikEdProblemChars.length; i ++) {
replaceChar = '&' + wikEdProblemChars[i][1] + ';';
Line 2,945:
 
// fix common typos
obj.plain = obj.plain.replace(/(^|[^a-z])h2o([^a-z]|$)/g, '$1H2O$2');
obj.plain = obj.plain.replace(/(^|[^a-z])h3o+/g, '$1H3O+');
obj.plain = obj.plain.replace(/(^|[^a-z])oh-/g, '$1OH+');
 
// uppercase lowercased elements
Line 2,984:
obj.plain = obj.plain.replace(/ *&lt;-+ */g, ' \u2190 ');
 
// &hdarr; and "leftwards harpoon over rightwards harpoon" not yet supported in IEIE6
// obj.plain = obj.plain.replace(/ *(&lt;=+&gt;|&hdarr;|&harr;|\u2190 *\u2192) */g, ' \u21cc ');
obj.plain = obj.plain.replace(/ *(&lt;==+&gt;|&hdarr;|&harr;|\u21cc|\u2190 *\u2192) */g, ' <=> ');
Line 4,280:
function (p, p1) {
if (p1 == '\u0009') {
p1 = '<' + 'pre class="wikEdTab" title="' + wikEdControlChars[p1.charCodeAt(0).toString()] + '">' + p1 + '<' + '/pre><!--wikEdTab-->';
}
else if (p1 != '\u000a') {
p1 = '<' + 'pre class="wikEdCtrl" title="' + wikEdControlChars[p1.charCodeAt(0).toString()] + '">' + p1 + '<' + '/pre><!--wikEdCtrl-->';
}
return(p1);
Line 4,298:
function (p, p1) {
if (p1 != '\u000a') {
p1 = '<' + 'pre class="wikEdBlank" title="' + wikEdStrangeSpaces[p1.charCodeAt(0).toString()] + '">' + p1 + '<' + '/pre><!--wikEdBlank-->';
}
return(p1);
Line 4,358:
// display tabs
else {
obj.html = obj.html.replace(/(\t)/g, '<' + 'pre class="wikEdTabPlain">$1<' + '/pre><!--wikEdTabPlain-->');
}
 
Line 5,129:
 
 
// supported chars in Mozilla and IEIE6
var wikEdSupportedChars = [
['00a1', 'iexcl'], // ¡