Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2008.05.11;
Скачать: CL | DM;

Вниз

DMClient - посветка.   Найти похожие ветки 

 
guav ©   (2008-03-29 18:08) [0]

Удалось прикрутить ко-какую подсетку к DMCilent 3.0 beta 1.21

Идея навеяна easy © http://delphimaster.net/view/15-1206729020/

В клиенте есть фалй hint.js, загружаемый для каждой страницы, в него вписан код, выделяющий все keywords в тэге code тэгом . Не блеск - комментарии игнорируются, и кейворды подсвечиваются и в комментариях - но уже что-то.

document.body.onload = function()
{
 var codePieces = document.getElementsByTagName("CODE");
 var keywords = new Array("and", "array", "as", "asm", "begin", "case",
   "class", "const", "constructor", "destructor", "dispinterface", "div",
   "do", "downto", "else", "end", "except", "exports", "file",
   "finalization", "finally", "for", "function", "goto", "if",
   "implementation", "in", "inherited", "initialization", "inline",
   "interface", "is", "label", "library", "mod", "nil", "not", "object",
   "of", "or", "out", "packed", "procedure", "program", "property" ,"raise",
   "record", "repeat", "resourcestring", "set", "shl", "shr", "string",
   "then", "threadvar", "to", "try", "type", "unit", "until", "uses",
   "var", "while", "with", "xor");
 re = new RegExp("(^|[^a-z0-9_])(" + keywords.join("|") + ")([^a-z0-9_]|$)", "gim");
 for (var i = 0; i != codePieces.length; ++i)
 {
   codePieces[i].innerHTML =
     codePieces[i].innerHTML.replace(re, "$1$2$3");
 }  
}


 
guav ©   (2008-03-29 18:09) [1]

На ветке http://delphimaster.net/view/15-1206729020/ например хорошо работает.


 
guav ©   (2008-03-29 18:13) [2]

Ну да, забыл, что тэг и тут есть

> "$1$2$3");

читать как "$1$2$3);



Страницы: 1 вся ветка

Текущий архив: 2008.05.11;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.011 c
2-1207819934
Chorniy
2008-04-10 13:32
2008.05.11
Опять ReadProcessMemory :( теперь у всех процессов одни данные?


15-1206933934
TPL
2008-03-31 07:25
2008.05.11
Если нету Com-порта


15-1206971003
FIL-23
2008-03-31 17:43
2008.05.11
как повернуть на 90 градусов рисунок


2-1207834516
bagos
2008-04-10 17:35
2008.05.11
выход из зацикливания


4-1188376536
leonidus
2007-08-29 12:35
2008.05.11
Как определить типа сглаживания шрифтов в системе?