Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Аватара для Creat0R

Must AutoIt


Сообщения: 3054
Благодарности: 1009

Профиль | Сайт | Отправить PM | Цитировать


Blast,
В коде используется lastHoveredLink, однако для его работы нужен скрипт LastHovered.js, а в инструкций в шапке оно не упоминается (в первом варианте).
Хотя на самом деле скрипт (уже) не нужен, lastHoveredLink нужно заменить на document.activeElement + некоторые поправки:

Код: Выделить весь код
[Copy link menu]
Item, "Ссылка в BBcode"=External action,,,, "Copy" | Go to page, "javascript:(function(){var a=document.activeElement,t=document.createElement('textarea');t.style='position:fixed;visibility:hidden;left:0;top:0;';t.value='[url='+a.href+']'+a.innerText.replace(/^\s+|\s+$/g,'')+'[/url]';document.documentElement.appendChild(t);t.focus();t.setSelectionRange(0, t.value.length);setTimeout(function(){document.documentElement.removeChild(t)},200)})()" & Delay, 100 & Copy
Item, "Ссылка в HTML"=External action,,,, "Copy" | Go to page, "javascript:(function(){var a=document.activeElement,t=document.createElement('textarea');t.style='position:fixed;visibility:hidden;left:0;top:0;';t.value='<a target=\x22_blank\x22 href=\x22'+a.href+'\x22>'+a.innerText.replace(/^\s+|\s+$/g,'')+'</a>';document.documentElement.appendChild(t);t.focus();t.setSelectionRange(0, t.value.length);setTimeout(function(){document.documentElement.removeChild(t)},200)})()" & Delay, 100 & Copy
Item, "Ссылка на страницу в BBcode"=External action,,,, "Copy" | Go to page, "javascript:(function(){var t=document.createElement('textarea');t.style='position:fixed;visibility:hidden;left:0;top:0;';t.value='[url='+location.href+']'+document.title+'[/url]';document.documentElement.appendChild(t);t.focus();t.setSelectionRange(0, t.value.length);setTimeout(function(){document.documentElement.removeChild(t)},200)})()" & Delay, 100 & Copy
Item, "Ссылка на страницу в HTML"=External action,,,, "Copy" | Go to page, "javascript:(function(){var t=document.createElement('textarea');t.style='position:fixed;visibility:hidden;left:0;top:0;';t.value='<a target=\x22_blank\x22 href=\x22'+location.href+'\x22>'+document.title+'</a>';document.documentElement.appendChild(t);t.focus();t.setSelectionRange(0, t.value.length);setTimeout(function(){document.documentElement.removeChild(t)},200)})()" & Delay, 100 & Copy
Item, "Ссылка на страницу в BBcode (перевод)"=External action,,,, "Copy" | Go to page, "javascript:(function(){var t=document.createElement('textarea');t.style='position:fixed;visibility:hidden;left:0;top:0;';t.value='[url=http://www.microsofttranslator.com/bv.aspx?from=&to=ru&a='+location.href+']'+document.title+' (с переводом)[/url]';document.documentElement.appendChild(t);t.focus();t.setSelectionRange(0, t.value.length);setTimeout(function(){document.documentElement.removeChild(t)},200)})()" & Delay, 100 & Copy

-------
“Сделай так просто, как возможно, но не проще этого.”... “Ты никогда не решишь проблему, если будешь думать так же, как те, кто её создал.”

Альберт Эйнштейн

P.S «Не оказываю техподдержку через ПМ/ICQ, и по email - для этого есть форум. ©»

http://creator-lab.ucoz.ru/Images/Icons/autoit_icon.png Русское сообщество AutoIt | http://creator-lab.ucoz.ru/Images/Ic...eator_icon.png CreatoR's Lab | http://creator-lab.ucoz.ru/Images/Icons/oac_icon.png Opera AC Community

Это сообщение посчитали полезным следующие участники:

Отправлено: 16:30, 26-09-2010 | #13