MozillaZine

Updated file for Stylish that is broken by patch 1254752

Discussion about official Mozilla Firefox builds
streetwolf

User avatar
 
Posts: 2151
Joined: August 21st, 2011, 8:07 am
Location: NJ (USA)

Post Posted March 11th, 2016, 9:59 am

I got in contact with Chris who created the patch the broke Stylish and other add-ons. The patch can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=1254752. He gives the changes to be made in the last post for Stylish. Here I've included all the code, with the update, from the file which is called aboutStylishEdit.js. Replace the code in the file with the code below. Stylish is in the Extensions folder and is called {46551EC9-40F0-4e47-8E18-8E5CF550CFB8}.xpi. The file is just a zip file so you can update it in place or copy over one you made.

Hoping Jason B the author updates it officially.

"use strict";

const Cc = Components.classes;
const Ci = Components.interfaces;

Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");

function AboutStylishEdit() { }
AboutStylishEdit.prototype = {
classDescription: "about:stylish-edit",
contractID: "@mozilla.org/network/protocol/about;1?what=stylish-edit",
classID: Components.ID("{3d4ef6d0-548b-11e4-916c-0800200c9a66}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),

getURIFlags: function(aURI) {
return Ci.nsIAboutModule.ALLOW_SCRIPT;
},

newChannel: function(aURI, aLoadInfo) {
let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
let newURI = ios.newURI("chrome://stylish/content/edit.xul", null, null);
let channel = ios.newChannelFromURIWithLoadInfo(newURI, aLoadInfo);
channel.originalURI = aURI;
return channel;
}
};
const NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutStylishEdit]);
Intel Core i7-8700K CPU @ 5.1GHz | Gigabyte Z370 AORUS Gaming 7 | Corsair 1000W PSU | Corsair H115i CPU Cooler | Corsair 64GB RAM @ 3.7GHz | EVGA GeForce GTX 1080 Ti FTW3 11GB | Dual ASUS PA249Q 24" LCDs | 2-512GB Samsung 960 PRO M.2 | 4TB WD Black | 2TB Seagate | Windows 10 Pro x64 | FIOS 1Gb

streetwolf

User avatar
 
Posts: 2151
Joined: August 21st, 2011, 8:07 am
Location: NJ (USA)

Post Posted March 11th, 2016, 1:21 pm

If you want the complete xpi file with the changes you can grab it below. Remember the changes were made my Christoph Kerschbaumer and verified as working by me.

http://1drv.ms/24Votbl
Intel Core i7-8700K CPU @ 5.1GHz | Gigabyte Z370 AORUS Gaming 7 | Corsair 1000W PSU | Corsair H115i CPU Cooler | Corsair 64GB RAM @ 3.7GHz | EVGA GeForce GTX 1080 Ti FTW3 11GB | Dual ASUS PA249Q 24" LCDs | 2-512GB Samsung 960 PRO M.2 | 4TB WD Black | 2TB Seagate | Windows 10 Pro x64 | FIOS 1Gb

makondo
 
Posts: 1959
Joined: October 18th, 2007, 5:26 pm
Location: Rocky Mountains

Post Posted March 13th, 2016, 11:44 am

Thanks, got hit with it yesterday. Although can't update edited published styles anyway ...

Image

Custom Buttons is broken too, dead Rclick menu, nothing happens on clicks.

paltus
 
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Post Posted March 13th, 2016, 1:04 pm


Joker1337
 
Posts: 64
Joined: July 15th, 2012, 2:04 pm

Post Posted March 13th, 2016, 1:46 pm

streetwolf, open PR on github with these changes.

makondo
 
Posts: 1959
Joined: October 18th, 2007, 5:26 pm
Location: Rocky Mountains

Post Posted March 13th, 2016, 2:57 pm

Thanks, paltus, but it's all Esperanto to me. Hopefully Anton will update CB before this hits a release version.
Surprisingly, my other exts. seem to work all right so far.

paltus
 
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Post Posted March 13th, 2016, 3:06 pm

makondo
Just open CustomButtonsService.js (firefox_profile_folder\extensions\custombuttons@xsms.org\components\) in text editor, search
Code: Select all
this. channel = ios. newChannel (imageURL, null, null);

replace to
Code: Select all
this. channel = ios. newChannelFromURIWithLoadInfo (ios. newURI (imageURL, null, null), null);

and
Code: Select all
var xulchan = ios. newChannel (uri, null, null);

to
Code: Select all
var xulchan = ios. newChannelFromURIWithLoadInfo (ios. newURI (uri, null, null), null);

makondo
 
Posts: 1959
Joined: October 18th, 2007, 5:26 pm
Location: Rocky Mountains

Post Posted March 13th, 2016, 3:08 pm

I see, thanks!

EDIT: actually, Menu Wizard appears broken too, doesn't open Options.

EDIT: the developer posted a test version there, it works.
Last edited by makondo on March 17th, 2016, 10:10 am, edited 1 time in total.

paltus
 
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Post Posted March 13th, 2016, 4:33 pm

Same, as with Stylish. Unpack xpi file, open s3menuwizard.js, search
Code: Select all
   'aboutPage' : {
      QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
      getURIFlags: function(aURI) {
         return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
      },
      newChannel: function(aURI) {
         let uri = Services.io.newURI("chrome://s3menuwizard/content/settings.xul", null, null);
         let chan = Services.io.newChannelFromURI(uri);
         chan.originalURI = aURI;
         return chan;
      },
      getURIFlags: function(aURI) { 0 }
   }
};

and replace with
Code: Select all
   'aboutPage' : {
      QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule]),
      getURIFlags: function(aURI) {
         return Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
      },
      newChannel: function(aURI, aLoadInfo) {
         let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
         let newURI = ios.newURI("chrome://s3menuwizard/content/settings.xul", null, null);
         let channel = ios.newChannelFromURIWithLoadInfo(newURI, aLoadInfo);
         channel.originalURI = aURI;
         return channel;
      },
      getURIFlags: function(aURI) { 0 }
   }
};

Also, please, report here: [EXT] Menu Wizard

makondo
 
Posts: 1959
Joined: October 18th, 2007, 5:26 pm
Location: Rocky Mountains

Post Posted March 13th, 2016, 4:39 pm

I already did. Thanks!

Return to Firefox Builds


Who is online

Users browsing this forum: No registered users and 2 guests