Лучше спросить у знающих - чем лезть не зная.
Отсутствует
villa7
https://forum.mozilla-russia.org/viewto … 81#p662181
Замените там "contentAreaContextMenu" на id нужного меню.
Отсутствует
bunda1, спасибо, но не работает "Сплывающая подсказка у кнопки"... Удалить нужно только "Flash кукиси" а не все... На кукисы есть кнопка с исключениями. Думал, что сам исправлю, Но, УВЫ...https://forum.mozilla-russia.org/viewto … 92#p662292
Отсутствует
bunda1, С кукисами в коде разобрался... А в правом нижнем всплывающее сообщение, как https://forum.mozilla-russia.org/viewto … 38#p486538 Вы делали ранее.
Отсутствует
А в правом нижнем всплывающее сообщение, как
Тоже должно работать, может ты сучайно удалил:
// Всплывающее сообщение .... Cc["@mozilla.org/alerts-service;1"].getService(Ci.nsIAlertsService). showAlertNotification(self.image, self.label, 'Очистил кеш и удалил Flash кукиси и историю', false, "", null, "");
Отсутствует
Проверил. Не работает после очистки.http://img6.tempfile.ru/13267/00b1a8181 … 19c62a.jpg
Отсутствует
bunda1, ошибка такая: Метка времени: 24.09.2014 23:28:07
Ошибка: TypeError: sjs.Sanitizer.prototype.items[it] is undefined
Источник: chrome://custombuttons-context/content/button.js?windowId=Firefox&id=custombuttons-button4@init
Строка: 22
Отсутствует
turbot
С главного меню черточки убрались, но там блин ещё с десяток подменю, в них остались, как остальные добавлять.
bunda1
Не врубился вместо чего это менять.
Лучше спросить у знающих - чем лезть не зная.
Отсутствует
turbot
Как правильно через запятую, так не хочет
var menus = document.getElementById('Compact-Menu-menupopup', 'menu_FilePopup').childNodes;
Лучше спросить у знающих - чем лезть не зная.
Отсутствует
villa7
Я попробовал :before { content: "Файл" !important; } работает, но глючит.
А вот это работает:
[...document.getElementById('main-menubar').childNodes].forEach(function(m) m.removeAttribute('accesskey'));
положи в начало Compact Menu. Но возможно не будет работать клавиатурные сочитания для меню.
Добавлено 25-09-2014 11:13:55
bunda1, ошибка такая: Метка времени: 24.09.2014 23:28:07
Ошибка: TypeError: sjs.Sanitizer.prototype.items[it] is undefined
Источник: chrome://custombuttons-context/content/button.js?windowId=Firefox&id=custombuttons-button4@init
Строка: 22
Ты не всё удалил в кнопке, что то отставил, возможно: .forEach(function(it) { sjs.Sanitizer.prototype.items[it].clear() });
Отредактировано bunda1 (25-09-2014 11:17:32)
Отсутствует
bunda1
[...document.getElementById('main-menubar').childNodes].forEach(function(m) m.removeAttribute('accesskey'));
В главном меню убирает, а в подменю нет. Если не выходит то ладно. Спасибо.
Лучше спросить у знающих - чем лезть не зная.
Отсутствует
bunda1
Выделить кодКод:
[...document.getElementById('main-menubar').childNodes].forEach(function(m) m.removeAttribute('accesskey'));В главном меню убирает, а в подменю нет. Если не выходит то ладно. Спасибо.
Всё работает, просто надо положить код в начало инициализации кнопки Compact Menu
Отсутствует
bunda1
Странно, 32чистая, в главном меню убирает в подменю остаётся.
[...document.getElementById("main-menubar").childNodes].forEach(function(m) { removal(m); [...m.lastChild.childNodes].forEach(function(m) removal(m) ); }); function removal(m) m.removeAttribute('accesskey');
Или все accesskey даже из подменю:
function removal(node) { [...node.childNodes].forEach(function(m) { m.removeAttribute('accesskey'); m.firstChild && removal( m.firstChild ); }) }; removal( document.getElementById("main-menubar") );
Отредактировано bunda1 (25-09-2014 23:24:24)
Отсутствует
Насчёт Template strings.
Допустим, запускается такой код.
var line01 = ` line02 line03 line04 line05 line06 line07 line08 line09 line10`; // line11 // line12 // line13 alert(Components.stack.lineNumber); line15; line16;
Есть об этом какая-нибудь дополнительная информация ?
Очень неудобно когда CB-редактор открывается
не на той строке, на которой случилась ошибка.
Пока лисорубы это не починили, завёл себе
gBrowser.currentURI == "about:customizing" || (() => { var flag = _id + "-liner"; var console = "chrome://global/content/console.xul"; var webconsole = "chrome://browser/content/devtools/webconsole.xul"; var els = Cc["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService); function liner(e) { var loc = e.target.location.href; if (loc != console && loc != webconsole) return; var win = e.target.defaultView; if (flag in win) return; win[flag] = true; var info = els.getListenerInfoFor(win).map(inf => inf.listenerObject); var str = "var buttonId = href. match(/id=([\\w-]+)/)[1];\n\t\t\t\t"; for(var lo of info) { if ("handleClick" in lo && String.contains(lo.handleClick, str)) break; } var add = "line = this.checkMissingLines(line, phase, buttonId);\n\t\t\t\t"; lo.handleClick = eval("(" + String.replace(lo.handleClick, str, "$&" + add) + ")"); lo.checkMissingLines = function(line, phase, id) { var attr = phase == "code" ? "cb-oncommand" : "cb-init"; var code = document.getElementById(id).getAttribute(attr); var ind = code.indexOf("`"); if (ind == -1 || ind == code.lastIndexOf("`")) return line; var doubleQuoteString, singleQuoteString, singleLineComment, multiLineComment, regExp, templateString, template; function free() !( doubleQuoteString || singleQuoteString || singleLineComment || multiLineComment || regExp || templateString ); function nbs(p = pos) code[p - 1] != "\\"; var currLine = 1, subs = {}, sub = 0; for(var pos = 0; pos < code.length; pos++) { switch (code[pos]) { case "/": if (free()) { var nxt = code[pos + 1]; if (nxt == "*") multiLineComment = true; else if (nxt == "/") singleLineComment = true; else regExp = true; } else if (regExp) { if (nbs()) regExp = false; } else if (multiLineComment && code[pos - 1] == "*") multiLineComment = false; break; case "'": if (free()) singleQuoteString = true; else if (singleQuoteString && nbs()) singleQuoteString = false; break; case '"': if (free()) doubleQuoteString = true; else if (doubleQuoteString && nbs()) doubleQuoteString = false; break; case "`": if (free()) templateString = true; else if (templateString && nbs()) templateString = false; break; case "$": if (templateString && nbs() && code[pos + 1] == "{") { templateString = false; sub++; } break; case "{": if (sub && free()) sub in subs ? subs[sub]++ : subs[sub] = 1; break; case "}": if (sub && free()) { if (!--subs[sub]) { delete subs[sub]; sub--; templateString = true; } } break; case "\n": currLine++; if (singleLineComment) singleLineComment = false; else if (templateString) line++; } if (currLine == line) break; } return line; } } addEventListener("pageshow", liner, false); function onWin(win, topic) topic == "domwindowopened" && win.addEventListener("load", function load(e) { win.removeEventListener("load", load, false); liner(e); }, false); Services.ww.registerNotification(onWin); addDestructor(() => Services.ww.unregisterNotification(onWin)); })();
Отредактировано Dumby (27-09-2014 10:27:58)
Отсутствует