GM_setValue working alternative - firefox

Until today GM_setValue was working perfect. I have actual version of GreaseMonkey and FF. And today it stopped working. In current version and latest version i have "GM_setValue is undefined". Also GM_setValue stopped working. I didn't change anything in script, nor in browser (maybe it updated in background?) How to fix it?

Did you set the #grant option in the header to allow GM methods?

Related

Symbol undefined error for dropzone in IE11

The latest dropzone.js version does not seem to work in IE11. How to test?
1) Open up https://www.dropzonejs.com/examples/simple.html in IE11
2) dropzone not clickable and files cannot be dragged and dropped
The error via F12 console is:
'Symbol' is undefined
File: dropzone.js, Line: 3196, Column: 11
if (_didIteratorError32) {
throw _iteratorError32;
}
How can this be solved?
I solved this issue by adding following script tag.
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.8.7/polyfill.min.js"></script>
Dropzone.js had arrow functions and lot of other things which are not supported in IE11. Therefore, it converted from es6 to es5 using Babel.
After researching a bit found that it needed polyfill support and hence script.
I had same issue with 'Symbol' is undefined in IE11 with Dropzone.js version 5.7.0 release that was (at the time of writing) still referenced from Dropzone.js website.
Issue was actually solved just by downloading latest release from GitHub which (at the time of writing) was Release v5.9.2.
So no need for explicit babel-polyfill anymore.
https://github.com/dropzone/dropzone/releases
I solved this problem when I downloaded the script directly from the website https://www.dropzonejs.com/js/dropzone.js?v=1583771423.

Firefox and ydn.db page reload bug

ydn.db-isw-core-e-cur-qry-dev-raw.js v1.0.2 crashed at the string 28537
In logs I read:
AbortError
request = index.openKeyCursor(key_range, this.dir);
It crashed in latest Firefox, but works with other browsers.
I can't find the reason of this error. Sometimes, when I try to debug it by stepping into function, it works without crashing.
What is causing this bug?
So, when I try to call history.replaceState() in callback of db.put() it causes a page reload. Why? How can I prevent that?
See debug log by ydn.debug.log ('ydn.db', 'finest')
So... I didn't find any reason, but placing history.replaceState() in setTimeout() make it work in FireFox. Maybe there are some problems with context... but it works in other browsers. So, I think that it is very strange bug of firefox.

Can't install Firefox extension in Firefox 13.0.1

I'm developing a firefox extension which has been working without any problems in firefox version 12.*.
Today I updated FF to version 13.0.1 and changed the install.rdf file accordingly:
<em:targetApplication>
<RDF:Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.0</em:minVersion>
<em:maxVersion>13.0.*</em:maxVersion>
</RDF:Description>
</em:targetApplication>
But since then the extension won't be installed. The message "-Extension name- could not be installed because it is not compatible with Firefox 13.0.1" is displayed.
I used Netbeans' foxbeans plug-in to create the first dummy version of my extension (I used to be -and still am- a beginner in Firefox extension development), so the install.rdf and install.js files are automatically generated. Feel free to ask for more code if you think it could help.
Is there anyone else who has the same problem? Any possible explanations?
SOLVED:
It seems like this is a rather weird Firefox bug. I discovered that the problem was caused by an ampersand I had placed on the extension's description:
<em:description>Demokritos Labeling & Filtering Client's Firefox Extension</em:description>
If I change the above to:
<em:description>Demokritos Labeling and Filtering Client's Firefox Extension</em:description>
the extension gets installed normally.
It's a minor but rather odd bug and I should probably report it.
Do you have an updateURL in your extension?
There is an open bug that if your updateURL is incorrect, you'll get a version error:
https://bugzilla.mozilla.org/show_bug.cgi?id=740378

console.log is not working when used in a Firefox, Greasemonkey script

My userscript prints some information using console.log().
This works fine in Chrome, but when I install this userscript in Firefox (Greasemonkey), the web console in Firefox is not displaying anything.
I searched for a solution and some suggested to use unsafeWindow but it is also not showing any output. Moreover unsafeWindow cannot be used for chrome. I even installed Firebug but it was no use. How can I resolve this?
For example, I tried this userscript in Firefox:
// ==UserScript==
// #name console
// ==UserScript==
console.log("hello");
You mean it doesn't work when installed via Greasemonkey, right?
Not long ago, Greasemonkey broke console.log (New! Bug report). Now, to see the results of a plain console.log() call from a Greasemonkey, you need to look in Firefox's Error console, not Firebug's.
You can see FF's Error console by pressing: CtrlShiftJ.
However, you can use unsafeWindow.console.log() in both Chrome and Greasemonkey scripts. Chrome now has limited support for unsafeWindow.
If you use unsafeWindow, you have access to the full range of Firebug's logging functions from Greasemonkey. (Firebug must be installed and they still might not work in Chrome userscripts; I haven't tested that way in a while.)
In Firefox, if Firebug is not installed, or it is not active for the page, then unsafeWindow.console.log() calls will display to the New "Web Console" (CtrlShiftK).
You need to use the unsafeWindow when inside a Greasemonkey script.
Note that Firefox currently supports console.log(), console.info(), console.warn(), and console.error() natively -- no Firebug required.
Wait a minute: if the question is about logging in the console with Greasemonkey (I could swear I saw the tag greasemonkey), why not use the GM_log method?
// ==UserScript==
// #name GM_log Example
// #namespace http://www.example.com/
// ==/UserScript==
GM_log("This is an example of GM_log");
Or am I missing something?
PS: you can also check for javascript.options.showInConsole in about:config. it should be true.
I found that (testing with Chrome/Tampermonkey) you need:
window.log("<message goes here>");, not unsafeWindow.console.log("<msg>");,
as unsafeWindow and console come up as undefined.
Try that, as I'm pretty sure that's the way you're supposed to do it in later versions of browsers, etc.

Is something wrong with Firebug and Firepath?

My Firebug and Firepath were working fine, but they just started acting strange. When I click on objects on webpage, and do Inspect Element, it just does nothing. I didn't update or do anything on firefox. Anyone else having similar issues?
Well I tried the next release 1.8.1b1 and it still failed. I reinstalled 1.7.3 and its working again. Here is the link:
Addon Firbug 1.7.3 Download
and the versions page:
https://addons.mozilla.org/en-US/firefox/addon/firebug/versions/
It's ok now,firepath 0.9.7 is compatable with firebug 1.8

Resources