Abrowser's source code editor (Orion) doesn't work

Project:Trisquel
Version:6.0
Component:Programs
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Since some time you can't edit code using Abrowser's developer tools. If you run Abrowser's Scratchpad (Shift + F4) it displays a grey box.

If you use Firebug, which is an alternative to Abrowser's developer tools, it also won't work as expected. In Firebug's Console tab, if you press the "Show Command Editor" button, which is on the right side of the command line, it will also display a grey box.

If configure Abrowser via about:config, you can disable the editor Orion for Firebug, which enables you to use it's command editor, although it's now replaced with a very basic editor.

I've tested this on two computers. Both had this issue. One of the computers is running Abrowser 20. It would help if some of you report if you have the same issue.

Wed, 05/15/2013 - 03:51

Same here on two different computers, one 32 bits, the other 64 bits.

When I want to edit a greasemonkey script by right clicking on the script in the Add-ons Manager / User Scripts I also get a grey box in Scratchpad.

A solution is to select "Show containing folder" then opening the file with an editor, not so handy but it works.

Wed, 02/12/2014 - 02:07
Status:active» patch (needs review)

I figured out the cause of this bug. Some javascript code (browser/devtools/sourceeditor/orion/orion.js) for Orion checks for the useragent. In Firefox, it checks (at line 3426) whether your user agent contains the string "Firefox." However, because of the package helper, Abrowser checks for the string "Abrowser". This results in incorrect behavior, since the user agent of Abrowser is restored to one containing "Firefox" by the package helper.

You can easily see that this is the problem. Go to about:config. Add a string called general.useragent.override. Enter the following string:
Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Abrowser/26.0
Then press Shift-F4, and the scratchpad will indeed work!

Just add this code to the package helper:
sed -i 's/Abrowser/Firefox/g' browser/devtools/sourceeditor/orion/orion.js

I guess this is fine, since the only instances of Firefox in the original version of that file are comments and the isFirefox variable, and nothing to do with branding.

Sat, 02/22/2014 - 03:56

I think this would be better, just replacing the string checked for in the user agent.

sed -i 's/"Abrowser\/"/"Firefox\/"/g' browser/devtools/sourceeditor/orion/orion.js

Fri, 03/21/2014 - 23:21

No longer an issue in Abrowser 28, because Mozilla replaced Orion with Codemirror. How do I change the status to fixed?

Sun, 03/23/2014 - 19:05
Status:patch (needs review)» fixed
Sun, 04/06/2014 - 19:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.