From a8c07ce9176f8ada3e9834733263453260b29bd9 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Jul 05 2019 01:07:51 +0000 Subject: Remove use of deprecated FUEL --- diff --git a/modules/hfShared.js b/modules/hfShared.js index b4b3a2a..7ca8c8f 100644 --- a/modules/hfShared.js +++ b/modules/hfShared.js @@ -271,14 +271,12 @@ function getHostWithoutSub(fullHost){ }; function restartNow(){ - var Application = Cc["@mozilla.org/fuel/application;1"].getService(Ci.fuelIApplication); - Application.restart(); + Cc['@mozilla.org/toolkit/app-startup;1'].getService(Ci.nsIAppStartup) + .quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); }; function alertRuleFinished(aDocument){ //Check firefox version and use appropriate method - var Application = Cc["@mozilla.org/fuel/application;1"] - .getService(Ci.fuelIApplication); var windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"] .getService(Ci.nsIWindowMediator); var prefService = Cc["@mozilla.org/preferences-service;1"] @@ -306,12 +304,6 @@ function alertRuleFinished(aDocument){ promptForRestart(); }); } - else{ //Firefox versions below 4.0 - if(!Application.extensions.has("https-always@hyperbola.info")) - getHTTPSAlways(); - else - promptForRestart(); - } //Alert user to install HTTPS Always for rule enforcement var getHTTPSAlways = function() {