Firefox: дополнения Firefox (fix-версии)
Есть в сборнике дополнений для Firefox пара замечательных дополнений, но, к сожалению, авторы их забросили и начиная с версии Firefox 3.5 они уже якобы не совместимо с браузером. Но это не совсем так.
Сделаем небольшой фикс: в файле install.rdf надо переставить максимальную версию до 4.0 - и вот у нас уже полноценные рабочие версии этих дополнений.
Fetch Text URL - Откройте простые текстовые URL с помощью контекстного меню
Оригинальная ссылка: https://addons.mozilla.org/ru/firefox/addon/fetch-text-url/
Fix-версия: https://addons.mozilla.org/ru/firefox/addon/fetch-text-url-fix-version/
Extended Copy Menu - Предлагает скопировать выделенное в виде простого текста или как html
Оригинальная ссылка: https://addons.mozilla.org/ru/firefox/addon/extended-copy-menu/
Fix-версия: https://addons.mozilla.org/ru/firefox/addon/extended-copy-menu-fix-vers/
Сделаем небольшой фикс: в файле install.rdf надо переставить максимальную версию до 4.0 - и вот у нас уже полноценные рабочие версии этих дополнений.
Fetch Text URL - Откройте простые текстовые URL с помощью контекстного меню
Оригинальная ссылка: https://addons.mozilla.org/ru/firefox/addon/fetch-text-url/
Fix-версия: https://addons.mozilla.org/ru/firefox/addon/fetch-text-url-fix-version/
Extended Copy Menu - Предлагает скопировать выделенное в виде простого текста или как html
Оригинальная ссылка: https://addons.mozilla.org/ru/firefox/addon/extended-copy-menu/
Fix-версия: https://addons.mozilla.org/ru/firefox/addon/extended-copy-menu-fix-vers/
Похожие материалы:
Комментарии:
31 Января 2014 (10:59:32)
Сергей
(гость)
• ответить
Александр, благодарю за S3.Download Statusbar!
26 Января 2016 (06:24:39)
Alex
(гость)
• ответить
Есть пожелание дополнить fix версию "Fetch Text URL" возможностью определять выделенный текст в поле ввода (типа того, где сейчас текст набираю или однострочный вариант). Даю решение, чтоб добавить в существующий аддон и не плодить дополнительные.
Добавилась одна новая функция getBrowserSelection_ и минимальные изменения в существующей searchSelected.
Надеюсь, данный функционал будет добавлен.
Спасибо.
Добавилась одна новая функция getBrowserSelection_ и минимальные изменения в существующей searchSelected.
//------------------------------------------------------------------------------
/** from firefox-34.0.5.source\mozilla-release\browser\base\content\browser.js:5132
* Gets the selected text in the active browser. Leading and trailing
* whitespace is removed, and consecutive whitespace is replaced by a single
* space. A maximum of 150 characters will be returned, regardless of the value
* of aCharLen.
*
* @param aCharLen
* The maximum number of characters to return. -1 - for no limit
*/
FTU.getBrowserSelection_ = function(aCharLen) {
// selections of more than 150 characters aren't useful
const kMaxSelectionLen = 150;
const charLen = Math.min(aCharLen || kMaxSelectionLen, kMaxSelectionLen);
//let [element, focusedWindow] = BrowserUtils.getFocusSync(document);
var focusedWindow = document.commandDispatcher.focusedWindow;
var element = document.commandDispatcher.focusedElement;
var selection = focusedWindow.getSelection().toString();
// try getting a selected text in text input.
if (!selection) {
var isOnTextInput = function isOnTextInput(elem) {
// we avoid to return a value if a selection is in password field.
// ref. bug 565717
return elem instanceof HTMLTextAreaElement ||
(elem instanceof HTMLInputElement && elem.mozIsTextField(true));
};
if (isOnTextInput(element)) {
let Ci = Components.interfaces;
selection = element.QueryInterface(Ci.nsIDOMNSEditableElement)
.editor.selection.toString();
}
}
if (selection) {
if (charLen>0 && selection.length > charLen) {
// only use the first charLen important chars.
var pattern = new RegExp("^(?:\\s*.){0," + charLen + "}"
pattern.test(selection);
selection = RegExp.lastMatch;
}
else
selection = selection.trim().replace(/\s+/g, " "
//if (charLen>0 && selection.length > charLen)
// selection = selection.substr(0, charLen);
}
return selection;
}
//------------------------------------------------------------------------------
FTU.searchSelected = function() {
//var focusedWindow = document.commandDispatcher.focusedWindow;
//var searchStr = focusedWindow.getSelection();
var searchStr = FTU.getBrowserSelection_(-1);
searchStr = searchStr.toString();
searchStr = searchStr.replace( /^\s+/, "" );
searchStr = searchStr.replace(/(\n|\r|\t)+/g, " "
searchStr = searchStr.replace(/\s+$/,""
if (! /[^\.]+\.[^\.]+/.test(searchStr)) {
searchStr = '';
}
return searchStr || gContextMenu.linkURL;
}
//------------------------------------------------------------------------------
Надеюсь, данный функционал будет добавлен.
Спасибо.
23 Июня 2026 (07:08:15)
Benjaarer
(гость)
• ответить
That's a clever workaround for those classic Firefox add-ons! It's awesome how a simple install.rdf tweak can breathe new life into seemingly abandoned tools. Sometimes, a little ingenuity is all it takes to keep things going strong, much like mastering the physics in Slope Game. Thanks for sharing this helpful tip for fellow Firefox users!
Generator Teks Kosong online. Dapatkan teks kosong dengan mudah untuk semua keperluan Anda.
Blank Text
Blank Text
That's a smart workaround for bringing older Firefox add-ons back to life. It's impressive how a simple edit to the install.rdf file can restore compatibility and extend the usefulness of tools that many people thought were no longer usable. Thanks for sharing this helpful tip with the Firefox community! Сайт healthcare marketing services austin texas
;