[Support] Refresh Blocker


(erosman) #1

Please post your support questions about Refresh Blocker here.

Thank you


(co2225555555555) #2

hello
"white list match patterns" doesn’t work
nothing saved and store on that dialog.so white list doesn’t work.

about:addons ->click options of Refresh Blocker ->click “add…” add white list site
click ok(nothing added to white list match patterns) then click save show "preference saved successfully notification "
but don’t work at all!
firefox 45.0.2
thanks please fix


(erosman) #3

Which OS is it?

After saving, you go to your Firefox Profile folder - Firefox. There should be a new file there "refresh-blocker.txt"
It is a normal text file.

Which pattern are you trying to add?


(Noitidart) #4

I tested it on Windows 10 Firefox 47 and I was able to add and remove stuff from the whitelist. Clicking save made it persist.


(co2225555555555) #5

windows 7
content of “refresh-blocker.txt” look like this:
{“patterns”:[],“smartBlock”:false,“showNotice”:true,“autoClose”:false,“autoCloseTime”:5}

it don’t save believe me :slightly_smiling:
at least for firefox 45


(co2225555555555) #6

also tested on clean profile (new profile).
i see there is a rule https://www.mozilla.org/* by default
try adding my rule but still don’t save.it jus saying,saving but nothing happen


(erosman) #7

I am also on Win7 but FF46.0.1

That means that the prefs were saved and hence the file.
You didnt say which rule/pattern you are trying to add.

Normally, if there is a problem with the pattern, it should give a warning. I am going to check the MatchPattern.jsm of FF45 to see if there is an issue although I dont expect it to be.

Update: I checked it and there shouldn’t be a problem.


(co2225555555555) #8

i don’t matter which url it happen in every url that refresh
when i add it say save after that i get the notice at top that refresh blocked
the rule look like that https://www.mozilla.org/* anyway


(erosman) #9

If the patterns are empty, it adds https://www.mozilla.org/* as a sample

Try adding:
http://www.example1.com/*
and then SAVE
Open the Options again and see …


(co2225555555555) #10

don’t work
also found that in ctrl+shift+j

TypeError: aPattern.matchers[0].schemes is undefined options.js:140:7


(erosman) #11

You are right … sorry about the problem.

I think I know where the problems is. Firefox changed something in MatchPattern.jsm between v45 & v46.

I have changed it compatibility to FF46 for now.

You can upgrade to the current FF46 or wait for me to make a fix for it.
I am working on it and will release a new update soon.

Update: Version 1.2 is uploaded and will be available as soon as it is reviewed.

Fixed a bug where add/edit pattern was not working due to changes (scheme to schemes) in Firefox module MatchPattern.jsm between Firefox 41-45 and Firefox 46.*
Added option to delete Refresh Blocker Preferences on uninstall


(co2225555555555) #12

thank you now that work finally
also check it also
i export rule but import wont work

A promise chain failed to handle a rejection. Did you forget to ‘.catch’, or did you forget to ‘return’?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: ---------ichange the time-------
Full Message: TypeError: aPattern.matchers[0].schemes is undefined
Full Stack: addValidPatterns@chrome://refresh-blocker/content/options.js:273:1
this.OSfile.read/promise<@chrome://refresh-blocker/content/mod.jsm:44:18
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:933:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:812:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:746:1
gViewController.commands.cmd_showItemPreferences.doCommand@chrome://mozapps/content/extensions/extensions.js:1137:9
gViewController.doCommand@chrome://mozapps/content/extensions/extensions.js:1462:5
showPreferences@chrome://mozapps/content/extensions/extensions.xml:1563:11
oncommand@about:addons:1:1


(erosman) #13

yes… you are right… the same thing that was happening in ADD PATTERN is happening in import and I forgot to fix that one.

I will fix it it and upload a new version.

Update: v1.4 is uploaded and ready.


(co2225555555555) #14

thank you working now :smile::relaxed:


#15

Minor bit if feedback: I suspect this is not designed to work on Android, but it doesn’t actually specify that on the addon page (mobile version) so I tried to install it (in v46). I get a ‘Downloading addon’ toast, but no other message indicating failure to install.

An Android version would be nice - eventually.


(erosman) #16

At the moment, I don’t use any Android device to test the addon on it. If I get one, or if someone wants to test and tell me if there are errors, then I will fix it.

If Firefox of Android has a console, can you check to see if there are any errors?
Maybe this one (not tested): Console


#17

I have a console addon, and extensions.logging.enabled true. When I attempt to install I see this.

`1464522432832 addons.xpi DEBUG Download started for https://addons.mozilla.org/firefox/downloads/latest/703224/addon-703224-latest.xpi to file /data/data/org.mozilla.firefox/app_tmpdir/tmp-gzi.xpi

1464522432844 addons.xpi DEBUG Download of https://addons.mozilla.org/firefox/downloads/latest/703224/addon-703224-latest.xpi completed.

1464522433244 addons.update-checker DEBUG Requesting https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=2&id=refresh-blocker@eros.man&version=1.4&maxAppVersion=&status=userEnabled,incompatible&appID={aa3c5121-dab2-40e2-81ca-7ea25febc110}&appVersion=46.0&appOS=Android&appABI=arm-eabi-gcc3&locale=en-GB&currentAppVersion=46.0&updateType=49&compatMode=normal

1464522434196 addons.xpi DEBUG Cancelling download of https://addons.mozilla.org/firefox/downloads/latest/703224/addon-703224-latest.xpi

1464522434200 addons.xpi DEBUG removeTemporaryFile: https://addons.mozilla.org/firefox/downloads/latest/703224/addon-703224-latest.xpi removing temp file /data/data/org.mozilla.firefox/app_tmpdir/tmp-gzi.xpi`

To work in Fennec I assume you’d need a different UI for the prefs, but I don’t actually know. (I’ve used simple prefs in Fennec, which is only fixed in v48)


(erosman) #18

Thank you @DaveRo

I will ask around about it and find a solution if possible. :slightly_smiling:


(erosman) #19

After some reading, it seems these kind of addons (using XPCOM etc APIs) won’t work on Firefox for Android. WebExtension is/will be supported but it won’t provide the level of access needed for this type of addon.

Extensions for Firefox for Android

Add-ons that work with desktop Firefox do not automatically work in Firefox for Android:

  • There is no visible XUL in the UI, so you can’t use an overlay to create the UI.
  • Internal code and objects, like gBrowser, do not exist. Look at the Firefox on Android browser.js file to learn about the internals. Much of the same fundamental functionality exists.
    
  • Services like nsIPromptService and nsIAlertsService are implemented to use native Android UI. 
    
  • There is a simple JavaScript object, called NativeWindow, that allows you to manipulate parts of the native Android UI.

#20

Yes - I know that. As I said earlier I suspected it was a desktop-only add-on. But the AMO page mentions web extensions so I wasn’t sure what technology it uses.

Is the add-on specified as desktop only? If so AMO should have told me it was incompatible and not allowed me to download it. And if it’s incorrectly specified as Android-compatible Fennec shouldn’t have told me it was downloading and then silently failed. That’s my feedback!