6 999
contributi
S3v (discussione | contributi) (+ tag <br/>) |
S3v (discussione | contributi) (correzione carattere "&" + icone) |
||
Riga 27: | Riga 27: | ||
<pre> | <pre> | ||
--- 12529.user.js 2013-01- | --- 12529.user.js 2013-01-16 01:35:19.565400356 +0100 | ||
+++ 12529.user.js.new 2013-01- | +++ 12529.user.js.new 2013-01-16 01:35:46.901401743 +0100 | ||
@@ -90,6 +90,25 @@ | @@ -90,6 +90,25 @@ | ||
'wikEdBold title': 'Bold text', | 'wikEdBold title': 'Bold text', | ||
Riga 37: | Riga 37: | ||
+ 'wikEdPre alt': 'Pre', | + 'wikEdPre alt': 'Pre', | ||
+ 'wikEdCode title': 'Code', | + 'wikEdCode title': 'Code', | ||
+ 'wikEdBr alt': | + 'wikEdBr alt': 'br/', | ||
+ 'wikEdBr title': 'br/', | + 'wikEdBr title': 'br/', | ||
+ 'wikEdNote title': 'Template Box', | + 'wikEdNote title': 'Template Box', | ||
Riga 64: | Riga 64: | ||
+ 'Code': 'c/c5/WikEd_dummy.png', | + 'Code': 'c/c5/WikEd_dummy.png', | ||
+ 'Compatibili': 'c/c9/Tux_icon.png', | + 'Compatibili': 'c/c9/Tux_icon.png', | ||
+ 'Warning': ' | + 'Warning': '9/97/Red_braces.png', | ||
+ 'Note': '4/ | + 'Note': '4/4b/Blu_braces.png', | ||
+ 'Tip': ' | + 'Tip': '9/9d/Yellow_braces.png', | ||
+ 'Stub': ' | + 'Stub': '3/36/Grey_braces.png', | ||
+ 'Br': 'c/c3/Break1.png', | + 'Br': 'c/c3/Break1.png', | ||
+//Fine immagini bottoni Wiki Debianizzati | +//Fine immagini bottoni Wiki Debianizzati | ||
Riga 142: | Riga 142: | ||
+ | + | ||
+ // remove markup | + // remove markup | ||
+ if ( /<code>((.|\n)*?)<\/code>/i.test(obj.changed.plain) ) { | + if ( /&lt;code&gt;((.|\n)*?)&lt;\/code&gt;/i.test(obj.changed.plain) ) { | ||
+ obj.changed.plain = obj.changed.plain.replace(/<code>((.|\n)*?)<\/code>/gi, '$1'); | + obj.changed.plain = obj.changed.plain.replace(/&lt;code&gt;((.|\n)*?)&lt;\/code&gt;/gi, '$1'); | ||
+ } | + } | ||
+ | + | ||
+ // add markup | + // add markup | ||
+ else { | + else { | ||
+ obj.changed.plain = '<code>' + obj.changed.plain + '<\/code>'; | + obj.changed.plain = '&lt;code&gt;' + obj.changed.plain + '&lt;\/code&gt;'; | ||
+ if (emptyOrSpaces == false) { | + if (emptyOrSpaces == false) { | ||
+ obj.changed.plain = obj.changed.plain.replace(/^(<code>)(\s*)((.|\n)*?)(\s*)(<\/code>)$/, '$2$1$3$6$5'); | + obj.changed.plain = obj.changed.plain.replace(/^(&lt;code&gt;)(\s*)((.|\n)*?)(\s*)(&lt;\/code&gt;)$/, '$2$1$3$6$5'); | ||
+ } | + } | ||
+ } | + } | ||
Riga 158: | Riga 158: | ||
+ // br | + // br | ||
+ case 'wikEdBr': | + case 'wikEdBr': | ||
+ obj.changed.plain = '<br/>'; | + obj.changed.plain = '&lt;br/&gt;>'; | ||
+ break; | + break; | ||
+ | + | ||
Riga 196: | Riga 196: | ||
+ | + | ||
+ // remove markup | + // remove markup | ||
+ if ( /<pre>((.|\n)*?)<\/pre>/i.test(obj.changed.plain) ) { | + if ( /&lt;pre&gt;((.|\n)*?)&lt;\/pre&gt;/i.test(obj.changed.plain) ) { | ||
+ obj.changed.plain = obj.changed.plain.replace(/<pre>((.|\n)*?)<\/pre>/gi, '$1'); | + obj.changed.plain = obj.changed.plain.replace(/&lt;pre&gt;((.|\n)*?)&lt;\/pre&gt;/gi, '$1'); | ||
+ } | + } | ||
+ | + | ||
+ // add markup | + // add markup | ||
+ else { | + else { | ||
+ obj.changed.plain = '<pre>' + obj.changed.plain + '<\/pre>'; | + obj.changed.plain = '&lt;pre&gt;' + obj.changed.plain + '&lt;\/pre&gt;'; | ||
+ if (emptyOrSpaces == false) { | + if (emptyOrSpaces == false) { | ||
+ obj.changed.plain = obj.changed.plain.replace(/^(<pre>)(\s*)((.|\n)*?)(\s*)(<\/pre>)$/, '$2$1$3$6$5'); | + obj.changed.plain = obj.changed.plain.replace(/^(&lt;pre&gt;)(\s*)((.|\n)*?)(\s*)(&lt;\/pre&gt;)$/, '$2$1$3$6$5'); | ||
+ } | + } | ||
+ } | + } | ||
Riga 211: | Riga 211: | ||
// underline | // underline | ||
</pre> | </pre> | ||
contributi