Полезная информация

Общайтесь со знакомыми и друзьями в нашем сообществе в Facebook.
  • Форумы
  •  » Сustom Buttons
  •  » [Кнопка фиксируется]Консоль браузера в вкладке / боковой панели

№101-05-2015 02:45:17

Odyseus
Участник
 
Группа: Members
Зарегистрирован: 01-05-2015
Сообщений: 2
UA: Firefox 37.0

[Кнопка фиксируется]Консоль браузера в вкладке / боковой панели

Всем привет.
Прежде всего, извините меня по-русски. Я приложил перевод на английский язык в случае, если это сообщение не понял.

Может кто-то исправить Консоль браузера в вкладке / боковой панели? Это не работает в любой версии Firefox больше 39.

Кажется, проблема в "обещание" (в линии 53 кода кнопка). Но я понятия не имею, как это исправить.

Было бы здорово, если бы кто-то мог решить эту кнопку, потому что возвращаясь использовать "Консоль ошибок" не вариант. И с помощью "Обозреватель" консоль в отдельном окне полностью раздражает.

Заранее большое спасибо.


[английский]

Hello everyone.
First of all, excuse my Russian. I attached an English translation in case this message is not understood.

Could someone fix the Browser console in tab/sidebar button? It does not work in any version of Firefox greater than 39.

It seems the problem is in the "promise" (in line 53 of the button code). But I have no clue how to fix that.

It would be great if someone could fix this button, because going back to use the "Error console" is not an option. And using the "Browser console" in a separate window is totally annoying.

Thank you very much in advance.

Сообщение об ошибке (The error message is):

Выделить код

Код:

Handler function DebuggerClient.requester request callback threw an exception: Error: 'attach' request packet has no destination.
Stack: DebuggerClient.prototype.request@resource://gre/modules/devtools/dbg-client.jsm:714:1
DebuggerClient.prototype.attachTab@resource://gre/modules/devtools/dbg-client.jsm:498:5
TabTarget_makeRemote/attachTab@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/target.js:416:7
TabTarget_makeRemote@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/target.js:438:7
TF_forRemoteTab@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/target.js:57:23
anonymous/this.onload/onLoad/</<@chrome://custombuttons-context/content/button.js?windowId=Firefox&id=custombuttons-button71@init line 1 > Function:53:24
DebuggerClient.requester/</<@resource://gre/modules/devtools/dbg-client.jsm:352:9
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:104:9
Request.prototype.emit@resource://gre/modules/devtools/dbg-client.jsm:1191:29
DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:1008:7
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:561:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:82:14
Line: 714, column: 0

Отредактировано Odyseus (02-05-2015 02:23:04)

Отсутствует

 

№202-05-2015 01:32:48

Dumby
Участник
 
Группа: Members
Зарегистрирован: 12-08-2012
Сообщений: 2249
UA: Firefox 31.0

Re: [Кнопка фиксируется]Консоль браузера в вкладке / боковой панели

Odyseus пишет

Could someone fix the Browser console in tab/sidebar button?

Just attempt. For Firefox 40.0a1.
Possibility «using the "Browser console" in a separate window»
will be broken, and also other bugs will be happens, sorry.

скрытый текст

Выделить код

Код:

custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname%3EOpen%20Browser%20Console%20in%20Sidebar/Tab%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/x-icon%3Bbase64%2CAAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAicKQXAAAAABWK2v8DjOn/A4vp/xSK2/8AAAAAAAAAA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pf+1tbX/tbW1/7W1tf+1tbX/pKSk/5KQj//Gnh//4LEe//K/If/yvyH/8r8h//K/If/gsR7/xp4f/wAAAACVlZX/pqam/7Ozs/+zs7P/pqam/5WVlf8AAAAAAAAAAM+kHf/gsiP/7r4n/+6+J//gsiP/z6Qd/wAAAAAAAAAAAAAAAJCPjv+UlJT/lJSU/5GQj/8AAAAAAAAAAAAAAAAAAAAAxpwY/86jGv/Ooxr/x50Y/wAAAAAAAAAAQ8OsQYGBrEEAAKxBAACsQQAArEEAAKxBgYGsQcPDrEHDw6xBgYGsQQAArEEAAKxBAACsQQAArEGBgaxBw8OsQQ%3D%3D%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B%28tmp%20%3D%3E%20%7B%0A%09var%20title%20%3D%20%22Browser%20Console%22%3B%0A%09var%20icon%20%3D%20%60%0A%09%09chrome%3A//global/skin/icons/error-16.png%0A%09%60.trim%28%29%3B%0A%09var%20button%20%3D%20true%3B%0A%0A%0A%09var%20modules%20%3D%20%22resource%3A//gre/modules/%22%3B%0A%09var%20%7BPromise%7D%20%20%20%20%20%20%20%20%3D%20Cu.import%28modules%20+%20%22Promise.jsm%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20tmp%29%3B%0A%09var%20%7Bdevtools%7D%20%20%20%20%20%20%20%3D%20Cu.import%28modules%20+%20%22devtools/Loader.jsm%22%2C%20%20%20%20%20tmp%29%3B%0A%09var%20%7BDebuggerServer%7D%20%3D%20Cu.import%28modules%20+%20%22devtools/dbg-server.jsm%22%2C%20tmp%29%3B%0A%09var%20%7BDebuggerClient%7D%20%3D%20Cu.import%28modules%20+%20%22devtools/dbg-client.jsm%22%2C%20tmp%29%3B%0A%0A%09var%20hud%20%3D%20devtools.require%28%22devtools/webconsole/hudservice%22%29%3B%0A%09var%20url%20%3D%20%22chrome%3A//browser/content/devtools/webconsole.xul%22%3B%0A%0A%09var%20link%20%3D%20document.createElementNS%28xhtmlns%2C%20%22link%22%29%3B%0A%09link.setAttribute%28%22rel%22%2C%20%22shortcut%20icon%22%29%3B%0A%09link.setAttribute%28%22href%22%2C%20icon%29%3B%0A%0A%09function%20connect%28%29%20%7B%0A%09%09var%20deferred%20%3D%20Promise.defer%28%29%3B%0A%0A%09%09if%20%28%21DebuggerServer.initialized%29%20%7B%0A%09%09%09DebuggerServer.init%28%29%3B%20DebuggerServer.addBrowserActors%28%29%3B%0A%09%09%7D%0A%09%09DebuggerServer.allowChromeProcess%20%3D%20true%3B%0A%0A%09%09var%20client%20%3D%20new%20DebuggerClient%28DebuggerServer.connectPipe%28%29%29%3B%0A%09%09client.connect%28%28%29%20%3D%3E%20%7B%0A%09%09%09client.getProcess%28%29.then%28response%20%3D%3E%20%7B%0A%09%09%09%09deferred.resolve%28%7Bform%3A%20response.form%2C%20client%3A%20client%2C%20chrome%3A%20false%7D%29%3B%0A%09%09%09%7D%2C%20deferred.reject%29%3B%0A%09%09%7D%29%3B%0A%09%09return%20deferred.promise%3B%0A%09%7D%0A%0A%09addEventListener%28%22DOMContentLoaded%22%2C%20e%20%3D%3E%20%7B%0A%09%09var%20win%20%3D%20e.target.defaultView%2C%20loc%20%3D%20win.location%3B%0A%09%09if%20%28%21loc%20%7C%7C%20loc.href%20%21%3D%20url%20%7C%7C%20win.frameElement%29%20return%3B%0A%09%09connect%28%29%0A%09%09%09.then%28connection%20%3D%3E%20devtools.TargetFactory.forRemoteTab%28connection%29%29%0A%09%09%09.then%28target%20%3D%3E%20%7B%0A%09%09%09%09hud.openBrowserConsole%28target%2C%20win%2C%20win%29.then%28browserConsole%20%3D%3E%20%7B%0A%09%09%09%09%09win.onbeforeunload%20%3D%20e%20%3D%3E%20%7B%0A%09%09%09%09%09%09e.returnValue%20%3D%20%22%22%3B%0A%09%09%09%09%09%09browserConsole.chromeWindow%20%3D%20%7Bclose%20%3A%20%28%29%20%3D%3E%20%7B%7D%2C%20document%20%3A%20win.document%7D%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%09var%20root%20%3D%20win.document.documentElement%3B%0A%09%09%09%09%09root.setAttribute%28%22title%22%2C%20title%29%3B%0A%09%09%09%09%09root.appendChild%28link.cloneNode%28false%29%29%3B%0A%09%09%09%09%7D%2C%20Cu.reportError%29%3B%0A%09%09%09%7D%2C%20Cu.reportError%29%3B%0A%0A%09%7D%2C%20false%2C%20document.getElementById%28%22browser%22%29%29%3B%0A%0A%09if%20%28button%29%20%7B%0A%09%09self.onclick%20%3D%20e%20%3D%3E%20%7B%0A%09%09%09if%20%28e.detail%20%21%3D%201%29%20return%3B%0A%09%09%09if%20%28e.button%20%3D%3D%200%29%20%7B%0A%09%09%09%09var%20tab%20%3D%20gBrowser.visibleTabs.find%28tab%20%3D%3E%20tab.linkedBrowser.currentURI.spec%20%3D%3D%20url%29%3B%0A%09%09%09%09gBrowser.selectedTab%20%3D%20tab%20%7C%7C%20gBrowser.addTab%28url%29%3B%20%20%0A%09%09%09%7D%20else%20if%20%28e.button%20%3D%3D%201%29%20%7B%0A%09%09%09%09gShowPopup%28self%29%3B%0A%09%09%09%7D%20else%20if%20%28e.button%20%3D%3D%202%20%26%26%20%21e.ctrlKey%20%26%26%20%21e.shiftKey%20%26%26%20%21e.altKey%29%20%7B%0A%09%09%09%09e.preventDefault%28%29%3B%0A%09%09%09%09var%20wpb%20%3D%20SidebarUI.browser.contentDocument.getElementById%28%22web-panels-browser%22%29%3B%0A%09%09%09%09wpb%20%26%26%20wpb.currentURI.spec%20%3D%3D%20url%20%3F%20SidebarUI.hide%28%29%20%3A%20openWebPanel%28title%2C%20url%29%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09self.tooltipText%20%3D%20%22L%3A%20%20Open/focus%20Browser%20Console%20in%20tab%5CnM%3A%20%20CB%20context%20menu%5CnR%3A%20%20Toggle%20Browser%20Console%20in%20sidebar%22%3B%0A%09%7D%0A%7D%29%28%7B%7D%29%3B%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5B/*CODE*/%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E

Отредактировано Dumby (02-05-2015 05:31:03)

Отсутствует

 

№302-05-2015 02:22:32

Odyseus
Участник
 
Группа: Members
Зарегистрирован: 01-05-2015
Сообщений: 2
UA: Firefox 37.0

Re: [Кнопка фиксируется]Консоль браузера в вкладке / боковой панели

Thank you very much, Dumby!!

It works perfectly with Firefox 39 (Developer Edition) and Firefox 40 (Nightly). Like you said, the "normal Browser Console" can't be opened when the Browser Console is opened in a tab. But I can live with that.

Спасибо очень много снова, Dumby!!

Отсутствует

 
  • Форумы
  •  » Сustom Buttons
  •  » [Кнопка фиксируется]Консоль браузера в вкладке / боковой панели

Board footer

Powered by PunBB
Modified by Mozilla Russia
Copyright © 2004–2020 Mozilla Russia GitHub mark
Язык отображения форума: [Русский] [English]