bugLinterna Mágica - Bugs: bug #35996, Linterna Mágica is not working...

 
 

bug #35996: Linterna Mágica is not working with Scriptish

Submitter:  Ivaylo Valkov <valkov>
Submitted:  Sun 25 Mar 2012 02:41:52 PM UTC
   
 
Category:  Feature request Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  valkov
Open/Closed:  Closed Release:  git-master
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 27 Apr 2012 02:20:46 PM UTC, comment #6: 

Fixed! Will be in the next stable (bug-fix or major) release.

Ivaylo Valkov <valkov>
Group administrator
Sat 21 Apr 2012 09:36:06 AM UTC, comment #5: 

From what I've found out I can conclude that Scriptish injects scripts differently than Greasemonkey. The code that injects Linterna Mágica in the scope of the page is based on a method [1] explained in the Greasemonkey wiki. The method works on the assumption that the userscript's code is executed inside a function and at run-time this function's body can be used to access the entire userscript. This is achieved by converting the caller function (the one that runs the userscript) to string - .caller.toString();. Scriptish breaks here and complains that the caller object is non-existent.

The work-around is to wrap the userscript inside an anonymous self invoking function - (function() { ... })();. This way the injection code works.

A working code is available in r271. The svn trunk build at the website is now at that revision, but mirrors update at 24 hours, so until then use the direct link. So far the code seems working, but just in case I'm leaving it in testing phase. Please report any new issues with that revision. The Scriptish version tested was 0.1.7 on Abrowser 11.0.

[1] http://wiki.greasespot.net/Content_Scope_Runner

Ivaylo Valkov <valkov>
Group administrator
Thu 12 Apr 2012 09:59:23 AM UTC, comment #4: 

Not necessarily. I haven't got the time to fully investigate the issue. I might come up an work-around. If that fails, a question/bug report will be send to the developers of Scriptish, so they can comment on the injection of userscripts from within the sandbox context to web page context. I'll write a comment here when I have a little bit more information.

Ivaylo Valkov <valkov>
Group administrator
Thu 12 Apr 2012 09:41:45 AM UTC, comment #3: 

So, it depends on the Scriptish team to make it work with Linterna Magica, is that it?

libre fan <librefan1>
Mon 26 Mar 2012 04:11:05 PM UTC, comment #2: 

As I've written in the first message there is a problem with the injection code that makes Linterna Mágica run in the web page scope. I had no time to investigate it in depth, but it had something to do with syntax and context errors in the JavaScript code when run within Scriptish. It might be a change in Scriptish that causes this. Of course, it might be a change in Linterna Mágica, but the last change in the part of the code mentioned was in r203 at 28th of September 2011. The injection code was first added in r46 at 26th of April 2011, because of problems with Firefox 4 and above when running in the Greasemonkey sandboxed context.

Ivaylo Valkov <valkov>
Group administrator
Mon 26 Mar 2012 08:46:58 AM UTC, comment #1: 

Linterna Magica used to work fine with Scriptish and Abrowser or Firefox beta in Trisquel 5.

Now, Linterna Magica works fine with Greasemonkey and Firefox beta (12) with gecko-mediaplayer as a plugin on Debian wheezy (testing).

libre fan <librefan1>
Sun 25 Mar 2012 02:41:52 PM UTC, original submission:  

Linterna Mágica is not working wit the Scriptish [1] extension that is meant as a replacement for Greasemonkey.

The code that injects the script in the page breaks when it is run from Scriptish.

Scriptish is free software released under MIT license, [2] so it is not a problem to fix this.

[1] http://scriptish.org/
[2] https://github.com/scriptish/scriptish/blob/master/LICENSE.txt

[3] http://trisquel.info/en/forum/anonymox-and-linterna-magica#comment-18278

Ivaylo Valkov <valkov>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by librefan1 (Posted a comment)
  • -email is unavailable- added by valkov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-04-27 valkov StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2012-04-21 valkov StatusNeed Info Ready For Test

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code