// By AllCity ~ Web-Codes.Net
e=document.getElementsByTagName("td");
for(k=0;k<e.length;k++) {
if(e[k].className=='posttdMessage') {
s=e[k].innerHTML;
while (s.indexOf('[syntax]') != -1) {
s=s.replace(/<br>/gi,'\r\n');
if(navigator.userAgent.indexOf('IE')!=-1) {
s=s.replace(/<p>/gi,'\r\n');
s=s.replace(/<\/p>/gi,'\r\n');
} else {
s=s.replace(/<p>/gi,'\r\n\n');
s=s.replace(/<\/p>/gi,'\r\n\n');
}
s=s.replace('[syntax]','<pre name="code" class="js">');
s=s.replace('[\/syntax]','</pre>');
e[k].innerHTML=s;
}}}
dp.SyntaxHighlighter.ClipboardSwf = '/SyntaxHighlighter/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
<input type="button" value="syntax" id="syntax" onclick="simpletag('syntax','','','message',''); return false;" class="codeButtons" title="Код (Подсветка синтаксиса)" />
<title>About...</title>
<title>О скрипте...</title>
<div class="para">Version: {V}</p>
<div class="para">Версия: {V}</p>
<a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a></p>©2004-2007 Alex Gorbatchev.</td>
<a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/syntaxhighlighter</a><br><a href="http://web-codes.net/" target="_blank">http://web-codes.net/</a></p>©2004-2007 Alex Gorbatchev.<br>Русификация от AllCity © 2005-2008.</td>
{label:'view plain',func:function(sender,highlighter)
{label:'исходный код',func:function(sender,highlighter)
{label:'copy to clipboard',
{label:'скопировать в буфер обмена',
alert('The code is in your clipboard now')
alert('Код успешно скопирован в буфер обмена')
PrintSource:{label:'print',func:function(sender,highlighter)
PrintSource:{label:'печать',func:function(sender,highlighter)
alert('Printing...')
alert('Печатается...')
Roma2Duo писал(а):Но уже вышло много обновлений.
Вернуться в Архив скриптов и интересных решений
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2