Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work if extensions.webextensions.remote = true #76

Open
pintassilgo opened this issue Oct 15, 2017 · 16 comments
Open

Doesn't work if extensions.webextensions.remote = true #76

pintassilgo opened this issue Oct 15, 2017 · 16 comments

Comments

@pintassilgo
Copy link

Firefox 56

@Noitidart
Copy link
Owner

Things changed a lot. Only hope now is the re-write as an electron app - https://github.com/Noitidart/NativeShotDesktop - i use this addon heavily so i badly need to finish this.

@pintassilgo
Copy link
Author

My mistake, sorry. Native Shot is working fine here in 58.0b1 with extensions.webextensions.remote = true and I didn't change anything WebExt related, just basic things to fix 57+ compatibility.

@Noitidart
Copy link
Owner

Oh wow thanks for sharing this! I had no idea that worked! :)

@Noitidart
Copy link
Owner

@pintassilgo may you please share the things you changed to get NativeShot to work, I badly need to use it as well haha.

@pintassilgo
Copy link
Author

pintassilgo commented Nov 14, 2017

@Noitidart hehe

resources\scripts\MainFramescript.js
Replace aURI.path by aURI.pathQueryRef (lines 340 and 341).

bootstrap.js
Replace Ci.nsILocalFile by Ci.nsIFile

resources\pages\editor.xhtml
Bug 863246, so I saved resource://gre/modules/Geometry.jsm in resources\scripts, then replaced
<script src="resource://gre/modules/Geometry.jsm"></script>
by
<script src="chrome://nativeshot/content/resources/scripts/Geometry.jsm"></script>
OR simply set security.all_resource_uri_content_accessible = true, but this is not recommended.

And there's the two required SDK files (clipboard and locale) that I inserted in bootstrap.js. Ugly, I know, but it works, I didn't bother to find a more elegant solution. The final bootstrap.js:
https://gist.github.com/pintassilgo/4deb9d0cbcba625a85aec1f1ed64f747

Tell me if it works for you. I tested some days ago on Nightly, but I use Dev Edition and it is working fine here.

PS.: I'm this one.

@pintassilgo
Copy link
Author

Updated. Now Ctrl+C is working.

@pintassilgo
Copy link
Author

With extensions.webextensions.remote = true, sometimes NativeShot works, sometimes not. There's no error log on the console. The definition occurs on Firefox startup. When it doesn't work at first, restarting the extension doesn't help. You must restart Firefox and hope for luck.

But with extensions.webextensions.remote = false, NativeShot always works flawlessly.

@pintassilgo pintassilgo reopened this Nov 20, 2017
@Noitidart
Copy link
Owner

Holy moly thank you @pintassilgo - excuse my delay I missed those replies! I will definitely make those change I need this back so bad!

@Noitidart
Copy link
Owner

Nooo way you are tustamido! Thank you so much for your long time support!!!

@Noitidart
Copy link
Owner

@pintassilgo may you please upload your hacked version, I am sooo busy I couldn't get around to it. :(

@pintassilgo
Copy link
Author

https://drive.google.com/open?id=1lOPOoKGcyso_kXYq0FqjxykvIEk2l6rD

Tested in Fx 58.0b10 64-bit (current Developer Edition), Windows 10.

@Noitidart
Copy link
Owner

So so much love thank you @pintassilgo!!!

@Noitidart
Copy link
Owner

Thanks so much @pintassilgo !

Reminder for self:

Need to set prefs:

  • extensions.webextensions.remote to false
  • extensions.legacy.enabled to true

I had to increase max version so I did that and attached it here:

[email protected]

@pintassilgo
Copy link
Author

Today I updated my Firefox to 59, so I needed to fix some legacy extensions including NativeShot. Actually I tested even on current Nightly.

The trickiest part was that Mozilla removed onWindowTitleChange without a replacement. So I used setTimeout([...], 33) inside onOpenWindow. Probably there is a more elegant solution, but it works.

XPI updated, same link.

@Alexpedruzzi
Copy link

Hello ... my name is Alex and I do not know anything about what you're talking about here ... lol
I really like the extension "NativeShot" but it is not working on my Firefox browser.
Can someone help me?


P.S. - I talked to the developer some time ago and he said he was working on a version that would work without the use of browsers. Anyone know anything new about this?
reviews_for_nativeshot_ add-ons_for_firefox-_2018-03-19_00 20 14

@Noitidart
Copy link
Owner

Hi @AlejandroPerezMartin thanks so much for following up. I have not had a chance to continue work on it. I got real busy with work. I am so so so sorry. I personally need this myself and have been missing it very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants