How to modify installed search plugin.

Discussion about official Mozilla Firefox builds
thebudman
Posts: 143
Joined: November 26th, 2007, 2:16 am

How to modify installed search plugin.

Post by thebudman »

This has become extremely difficult. i used to be able to install a search plugin and then modify the xml file restart firefox done. It used to be simple. I need to modify and verify a plugin i installed from a website is using the correct parameters and https. Not only that some websites i have plugins for jump around domains and i need to modify them to update it for the new domain. Happens frequently, I have no way of doing this as you cannot read the search.json.mozlz4 file. I have always modified my search plugins. Mainly to make sure all mine are using https and i like saving them to backup. I had to trick firefox by deleting the search.json.mozlz4 file to install my xml variants. This is only making it harder to do simple things. Example i went to a website installed the search plugin but i have no way of changing anything about it once installed. I also have no idea how to rip it off the site or i would just do it that way. A virus writer can still easily change your search plugins so the change was a unnecessary change just made it more difficult for the end user. It does not and will not protect against what it was designed to do, Plain and simple. If malware is in your system it can do anything it wants including change your plugins regardless of the attemp to make it unreadable. offtopic Besides i ditched windows a long time ago. Anything after windows 7 is a sick joke and most people i know are sticking to windows 7 or switching to linux. Windows killed itself. I have to teach everyone i know how to use linux now. Windows 10 is basically maleware to me. ontopic i need a way to easily modify an installed search plugin i cannot read or instructions on how to rip it off the websites themselves then i can just delete my search.json.mozlz4 file and restart installing my xml files.
User avatar
squall_leonhart
Posts: 885
Joined: March 17th, 2008, 5:32 am
Location: Australia
Contact:

Re: How to modify installed search plugin.

Post by squall_leonhart »

A virus writer can still easily change your search plugins so the change was a unnecessary change just made it more difficult for the end user.
Mozillazine is a completely seperate entity to mozilla.
thebudman
Posts: 143
Joined: November 26th, 2007, 2:16 am

Re: How to modify installed search plugin.

Post by thebudman »

I know Mozillazine is not Mozilla. I have been coming here for years. I have been around for a long time i just took a break and i am trying to figure out how to do a task that used to be easy and simple.
paltus
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Re: How to modify installed search plugin.

Post by paltus »

Button for Custom Buttons, to decompress search.json.mozlz4 (which now store added search engines) in ff profile folder, to easy editable json file and for compression back:

Code: Select all

custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname%3EMozilla%27s%20Lz4%20files%20format%20Compressor/Decompresser%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAACFQTFRF////AAAAQ0NDRkZGQ0NDREREREREREREQ0NDREREREREAZbyowAAAAp0Uk5TAAEqN0h/gIey1dBJRykAAABJSURBVAhbZcghFYBAFAXRUYgfgQg0IQF2FU1IQIEPclIi3jrcPRdUB0BTngBdXcuYwzlHM01lCP6z+QYHV3CzB49r0NYEgaryAYwJHrhR09lxAAAAAElFTkSuQmCC%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B/*Initialization%20Code*/%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5Bvar%20fp%20%3D%20Components.classes%5B%22@mozilla.org/filepicker%3B1%22%5D.createInstance%28Components.interfaces.nsIFilePicker%29%3B%0Afp.init%28window%2C%20%22Open%20File%22%2C%20Components.interfaces.nsIFilePicker.modeOpen%29%3B%0Afp.appendFilter%28%22Mozilla%27s%20Lz4%20and%20json%20files%20format%22%2C%20%22*.jsonlz4%3B%20*.mozlz4%3B%20*.json%22%29%3B%0Aif%20%28fp.show%28%29%20%3D%3D%20Components.interfaces.nsIFilePicker.returnOK%29%20%7B%0A%20%20var%20file%20%3D%20fp.file%3B%0A%20%20if%20%28file.exists%28%29%20%26%26%20file.isFile%28%29%20%26%26%20file.isReadable%28%29%29%20%7B%0A%20%20%20%20Components.utils.import%28%22resource%3A//gre/modules/Task.jsm%22%29%3B%0A%20%20%20%20Components.utils.import%28%22resource%3A//gre/modules/osfile.jsm%22%29%3B%0A%20%20%20%20var%20oldFile%20%3D%20fp.file.path%3B%0A%20%20%20%20if%20%28oldFile.endsWith%28%22.json%22%29%29%20%7B%0A%20%20%20%20%20%20var%20newFile%20%3D%20oldFile.replace%28/%28%5C.json%29%24/%2C%20%22.mozlz4%22%29%3B%0A%20%20%20%20%20%20function%20compress%28oFilePath%2CnFilePath%29%7B%0A%20%20%20%20%20%20%20%20return%20Task.spawn%28function*%20%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20jsonString%20%3D%20yield%20OS.File.read%28oFilePath%29%3B%0A%20%20%20%20%20%20%20%20%20%20yield%20OS.File.writeAtomic%28nFilePath%2C%20jsonString%2C%20%7Bcompression%3A%20%22lz4%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20compress%28oldFile%2CnewFile%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20var%20newFile%20%3D%20%28oldFile.replace%28%22.mozlz4%22%2C%20%22.json%22%29%20%7C%7C%20oldFile.replace%28%22.jsonlz4%22%2C%20%22.json%22%29%29%3B%0A%20%20%20%20%20%20function%20decompress%28oFilePath%2CnFilePath%29%7B%0A%20%20%20%20%20%20%20%20return%20Task.spawn%28function*%20%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20jsonString%20%3D%20yield%20OS.File.read%28oFilePath%2C%20%7Bencoding%3A%20%22utf-8%22%2C%20compression%3A%20%22lz4%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20yield%20OS.File.writeAtomic%28nFilePath%2C%20JSON.stringify%28JSON.parse%28jsonString%29%2C%20null%2C%20%27%20%20%27%29%2C%20%7Bencoding%3A%20%22utf-8%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20decompress%28oldFile%2CnewFile%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%3B%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E
Code from this post by dickvl + small changes by me (ability to compress json back to mozilla lz4 file format) and also thanks yup for makes better readability of output json.

Don't forget to make backup of search.json.mozlz4! Output files override existing without confirmation.

Sorry for bad English.
User avatar
Drumbrake
Posts: 1177
Joined: February 14th, 2011, 2:34 am

Re: How to modify installed search plugin.

Post by Drumbrake »

I've noticed that I have both a searchplugins folder and a search.json.mozlz4 file: as far as I can see, adding plugins (even manually) to the searchplugins folder still works - but, is the searchplugins folder now officially deprecated in favor of this search.json.mozlz4 file?

And BTW, I'd be curios to hear their reasons for storing also searchplugins in that not readily accessible file format: I can see (maybe) the rationale for bookmarks backups, but searchplugins? What is to be gained here, other than making the file almost inaccessible to users?
Fanolian
Posts: 940
Joined: February 21st, 2011, 10:14 am

Re: How to modify installed search plugin.

Post by Fanolian »

Drumbrake wrote:I've noticed that I have both a searchplugins folder and a search.json.mozlz4 file: as far as I can see, adding plugins (even manually) to the searchplugins folder still works - but, is the searchplugins folder now officially deprecated in favor of this search.json.mozlz4 file?
As far as I know the searchplugins_folder -> .json.mozlz4 migration occurs only in Firefox 44->45 upgrade. Now (46+) it does not work if you paste the searchplugins folder in your profile.
And BTW, I'd be curios to hear their reasons for storing also searchplugins in that not readily accessible file format: I can see (maybe) the rationale for bookmarks backups, but searchplugins? What is to be gained here, other than making the file almost inaccessible to users?
http://blog.queze.net/post/2015/11/02/W ... -hijacking
thebudman
Posts: 143
Joined: November 26th, 2007, 2:16 am

Re: How to modify installed search plugin.

Post by thebudman »

paltus wrote:Button for Custom Buttons, to decompress search.json.mozlz4 (which now store added search engines) in ff profile folder, to easy editable json file and for compression back:

Code: Select all

custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname%3EMozilla%27s%20Lz4%20files%20format%20Compressor/Decompresser%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAACFQTFRF////AAAAQ0NDRkZGQ0NDREREREREREREQ0NDREREREREAZbyowAAAAp0Uk5TAAEqN0h/gIey1dBJRykAAABJSURBVAhbZcghFYBAFAXRUYgfgQg0IQF2FU1IQIEPclIi3jrcPRdUB0BTngBdXcuYwzlHM01lCP6z+QYHV3CzB49r0NYEgaryAYwJHrhR09lxAAAAAElFTkSuQmCC%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B/*Initialization%20Code*/%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5Bvar%20fp%20%3D%20Components.classes%5B%22@mozilla.org/filepicker%3B1%22%5D.createInstance%28Components.interfaces.nsIFilePicker%29%3B%0Afp.init%28window%2C%20%22Open%20File%22%2C%20Components.interfaces.nsIFilePicker.modeOpen%29%3B%0Afp.appendFilter%28%22Mozilla%27s%20Lz4%20and%20json%20files%20format%22%2C%20%22*.jsonlz4%3B%20*.mozlz4%3B%20*.json%22%29%3B%0Aif%20%28fp.show%28%29%20%3D%3D%20Components.interfaces.nsIFilePicker.returnOK%29%20%7B%0A%20%20var%20file%20%3D%20fp.file%3B%0A%20%20if%20%28file.exists%28%29%20%26%26%20file.isFile%28%29%20%26%26%20file.isReadable%28%29%29%20%7B%0A%20%20%20%20Components.utils.import%28%22resource%3A//gre/modules/Task.jsm%22%29%3B%0A%20%20%20%20Components.utils.import%28%22resource%3A//gre/modules/osfile.jsm%22%29%3B%0A%20%20%20%20var%20oldFile%20%3D%20fp.file.path%3B%0A%20%20%20%20if%20%28oldFile.endsWith%28%22.json%22%29%29%20%7B%0A%20%20%20%20%20%20var%20newFile%20%3D%20oldFile.replace%28/%28%5C.json%29%24/%2C%20%22.mozlz4%22%29%3B%0A%20%20%20%20%20%20function%20compress%28oFilePath%2CnFilePath%29%7B%0A%20%20%20%20%20%20%20%20return%20Task.spawn%28function*%20%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20jsonString%20%3D%20yield%20OS.File.read%28oFilePath%29%3B%0A%20%20%20%20%20%20%20%20%20%20yield%20OS.File.writeAtomic%28nFilePath%2C%20jsonString%2C%20%7Bcompression%3A%20%22lz4%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20compress%28oldFile%2CnewFile%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20var%20newFile%20%3D%20%28oldFile.replace%28%22.mozlz4%22%2C%20%22.json%22%29%20%7C%7C%20oldFile.replace%28%22.jsonlz4%22%2C%20%22.json%22%29%29%3B%0A%20%20%20%20%20%20function%20decompress%28oFilePath%2CnFilePath%29%7B%0A%20%20%20%20%20%20%20%20return%20Task.spawn%28function*%20%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20jsonString%20%3D%20yield%20OS.File.read%28oFilePath%2C%20%7Bencoding%3A%20%22utf-8%22%2C%20compression%3A%20%22lz4%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20yield%20OS.File.writeAtomic%28nFilePath%2C%20JSON.stringify%28JSON.parse%28jsonString%29%2C%20null%2C%20%27%20%20%27%29%2C%20%7Bencoding%3A%20%22utf-8%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20decompress%28oldFile%2CnewFile%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%3B%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E
Code from this post by dickvl + small changes by me (ability to compress json back to mozilla lz4 file format) and also thanks yup for makes better readability of output json.

Don't forget to make backup of search.json.mozlz4! Output files override existing without confirmation.

Sorry for bad English.
Thanks but am i missing something? I posted it in custom buttons under code. Tried with and without the /*CODE*/ Doesn't seem to do anything i even checked my profile folder to see if there was a change i looked around in the nightly program folder to. I am running linux does that make a difference?
thebudman
Posts: 143
Joined: November 26th, 2007, 2:16 am

Re: How to modify installed search plugin.

Post by thebudman »

Fanolian wrote:
Drumbrake wrote:I've noticed that I have both a searchplugins folder and a search.json.mozlz4 file: as far as I can see, adding plugins (even manually) to the searchplugins folder still works - but, is the searchplugins folder now officially deprecated in favor of this search.json.mozlz4 file?
As far as I know the searchplugins_folder -> .json.mozlz4 migration occurs only in Firefox 44->45 upgrade. Now (46+) it does not work if you paste the searchplugins folder in your profile.
And BTW, I'd be curios to hear their reasons for storing also searchplugins in that not readily accessible file format: I can see (maybe) the rationale for bookmarks backups, but searchplugins? What is to be gained here, other than making the file almost inaccessible to users?
http://blog.queze.net/post/2015/11/02/W ... -hijacking
Like i said that does nothing to prevent search jacking. There is 10 million ways to do it and the only thing they did was delay them a week or 2 to figure out how to do it again. If the malware is in your system it can do anything it wants to any files in the system. It will not prevent search jacking and as a matter of fact i see it still happening in infected computers. The problem lies in the OS system and not the browser.

The bigger problem lies in the person who doesn't have a clue on what they are doing or being safe online and have no business even browsing the web. Like most people but i blame it on bad schooling. They don't teach the correct things in school on how to stay protected or how to spot bad links, fakes, phishing sites, malware sites, scams, or anything related to that. They don't know better and they end up downloading malware. I can't even tell you how many people i know don't understand if you go to download music or a video if it is an executable filetype it is a virus and not what your looking for commonly placed along real download buttons and sometimes no real download button. I can look at the real url and almost always tell you if it is a fake link before i even click on one. Looking at the real url of the address is the most important thing to browsing. So you know where and what the link leads to. You just don't click blind. Very stupid. That's why i hate shorturls. They are blind links and very dangerous. Mainly most fakes use an algorithm you can spot with similar looking links or titles. Titled in ways that just spell fake all over it but most don't have a clue. and most people i know and people who get paid to work with computers still don't know almost anything about being safe online. It is very sad to see that someone who is paid to work on a computer for any reason is that ignorant and yet they still had to go to college to get the job. Pore ole jobless me has to fix there computers once they screw em up and i am lucky to get 20 / 30 out of it. But i do it for my friends.
paltus
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Re: How to modify installed search plugin.

Post by paltus »

thebudman
You should copy this code, paste in location bar and press enter to create new button. Not in manually created button. Output files saves to the same directory as selected file. This should work on Linux also. Try add

Code: Select all

LOG("Saved as: " + newFile);
to:
Image
and see path to output file in browser console.
thebudman
Posts: 143
Joined: November 26th, 2007, 2:16 am

Re: How to modify installed search plugin.

Post by thebudman »

paltus wrote:thebudman
You should copy this code, paste in location bar and press enter to create new button. Not in manually created button. Output files saves to the same directory as selected file. This should work on Linux also. Try add

Code: Select all

LOG("Saved as: " + newFile);
to:
Image
and see path to output file in browser console.
Thanks. It worked pasting into the address bar.
fred_gaou
Posts: 25
Joined: April 27th, 2008, 3:55 pm
Location: France

Re: How to modify installed search plugin.

Post by fred_gaou »

paltus wrote:Image
Thanks for the button.

One question about it.

How did you enabled the highlighted syntax in custom button Code tab? It seems to use CodeMirror but mine only use plain text in a fresh profile of FF 48.0.2.

Here is a modified version that will always open the file picker dialog into the profile path where you'll find the search engines json files. Paste it in the location bar:

Code: Select all

custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname%3EMozilla%27s%20Lz4%20files%20format%20Compressor/Decompressor%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAACFQTFRF////AAAAQ0NDRkZGQ0NDREREREREREREQ0NDREREREREAZbyowAAAAp0Uk5TAAEqN0h/gIey1dBJRykAAABJSURBVAhbZcghFYBAFAXRUYgfgQg0IQF2FU1IQIEPclIi3jrcPRdUB0BTngBdXcuYwzlHM01lCP6z+QYHV3CzB49r0NYEgaryAYwJHrhR09lxAAAAAElFTkSuQmCC%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B/*Initialization%20Code*/%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5Bvar%20dir%20%3D%20Components.classes%5B%22@mozilla.org/file/directory_service%3B1%22%5D.getService%28Components.interfaces.nsIProperties%29.get%28%22ProfD%22%2C%20Components.interfaces.nsILocalFile%29%3B%0Avar%20fp%20%3D%20Components.classes%5B%22@mozilla.org/filepicker%3B1%22%5D.createInstance%28Components.interfaces.nsIFilePicker%29%3B%0Afp.displayDirectory%20%3D%20dir%3B%0Afp.init%28window%2C%20%22Open%20%22%2C%20Components.interfaces.nsIFilePicker.modeOpen%29%3B%0Afp.appendFilter%28%22Lz4%20or%20json%20files%22%2C%20%22*.jsonlz4%3B%20*.mozlz4%3B%20*.json%22%29%3B%0Aif%20%28fp.show%28%29%20%3D%3D%20Components.interfaces.nsIFilePicker.returnOK%29%20%7B%0A%20%20var%20file%20%3D%20fp.file%3B%0A%20%20if%20%28file.exists%28%29%20%26%26%20file.isFile%28%29%20%26%26%20file.isReadable%28%29%29%20%7B%0A%20%20%20%20Components.utils.import%28%22resource%3A//gre/modules/Task.jsm%22%29%3B%0A%20%20%20%20Components.utils.import%28%22resource%3A//gre/modules/osfile.jsm%22%29%3B%0A%20%20%20%20var%20oldFile%20%3D%20fp.file.path%3B%0A%20%20%20%20if%20%28oldFile.endsWith%28%22.json%22%29%29%20%7B%0A%20%20%20%20%20%20var%20newFile%20%3D%20oldFile.replace%28/%28%5C.json%29%24/%2C%20%22.mozlz4%22%29%3B%0A%20%20%20%20%20%20function%20compress%28oFilePath%2CnFilePath%29%7B%0A%20%20%20%20%20%20%20%20return%20Task.spawn%28function*%20%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20jsonString%20%3D%20yield%20OS.File.read%28oFilePath%29%3B%0A%20%20%20%20%20%20%20%20%20%20yield%20OS.File.writeAtomic%28nFilePath%2C%20jsonString%2C%20%7Bcompression%3A%20%22lz4%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20compress%28oldFile%2CnewFile%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20var%20newFile%20%3D%20%28oldFile.replace%28%22.mozlz4%22%2C%20%22.json%22%29%20%7C%7C%20oldFile.replace%28%22.jsonlz4%22%2C%20%22.json%22%29%29%3B%0A%20%20%20%20%20%20function%20decompress%28oFilePath%2CnFilePath%29%7B%0A%20%20%20%20%20%20%20%20return%20Task.spawn%28function*%20%28%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20jsonString%20%3D%20yield%20OS.File.read%28oFilePath%2C%20%7Bencoding%3A%20%22utf-8%22%2C%20compression%3A%20%22lz4%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%20%20yield%20OS.File.writeAtomic%28nFilePath%2C%20JSON.stringify%28JSON.parse%28jsonString%29%2C%20null%2C%20%27%20%20%27%29%2C%20%7Bencoding%3A%20%22utf-8%22%7D%29%3B%0A%20%20%20%20%20%20%20%20%7D%29%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20decompress%28oldFile%2CnewFile%29%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%3B%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E
Until the Custom Buttons 0.0.5.8.9 be updated in Mozilla add-ons, please install the official version and then replace its files by the fixed add-on version here.
paltus
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Re: How to modify installed search plugin.

Post by paltus »

How did you enabled the highlighted syntax in custom button Code tab? It seems to use CodeMirror but mine only use plain text in a fresh profile of FF 48.0.2.
CB_Source_Editor
fred_gaou
Posts: 25
Joined: April 27th, 2008, 3:55 pm
Location: France

Re: How to modify installed search plugin.

Post by fred_gaou »

paltus wrote:CB_Source_Editor
Thanks.

Unfortunately with this code, I can grab scrollbars with the mouse.
paltus
Posts: 68
Joined: March 2nd, 2014, 1:36 am

Re: How to modify installed search plugin.

Post by paltus »

This problem exists with other editors, which uses CodeMirror (in Stylish, for example), also.
Can be fixed with style (for Stylish only):

Code: Select all

/*AGENT_SHEET*/
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

@-moz-document url-prefix("chrome://"), url-prefix("data:") {
    scrollbar, scrollbar thumb {
        pointer-events: auto !important;
    }
}
Or put this code in initialization of any CB button:

Code: Select all

(()=> {
    var sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
    var uri = makeURI("data:text/css," + encodeURIComponent(
        [
            '@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");',
            '@namespace html url("http://www.w3.org/1999/xhtml");',
            '',
            '@-moz-document url-prefix("chrome://"), url-prefix("data:") {',
            '    scrollbar, scrollbar thumb {',
            '        pointer-events: auto !important;',
            '    }',
            '}'
        ].join('\n')
    ));
    addDestructor(()=> sss.unregisterSheet(this.uri, 0 || uri, 0));
    this.uri = uri;
})();
fred_gaou
Posts: 25
Joined: April 27th, 2008, 3:55 pm
Location: France

Re: How to modify installed search plugin.

Post by fred_gaou »

paltus wrote:This problem exists with other editors, which uses CodeMirror (in Stylish, for example), also.
Can be fixed with style (for Stylish only):

Code: Select all

/*AGENT_SHEET*/
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

@-moz-document url-prefix("chrome://"), url-prefix("data:") {
    scrollbar, scrollbar thumb {
        pointer-events: auto !important;
    }
}
Well it doesn't work on my setup:
  • Stylish 2.0.7
  • FF 48.0.2 x64
I can not grab the scrollbars in Stylish Editor.

There is a ticket about it.

It only occurs with Dark Theme enabled in DevTool settings.
Last edited by fred_gaou on September 10th, 2016, 8:14 am, edited 1 time in total.
Post Reply