HTTPS URL Background color
Posted by: Zero3K
Date: January 18, 2014 06:28AM

How do I disable the colors that are used to show how secure a HTTPS page is?

Re: HTTPS URL Background color
Posted by: Zero3K
Date: January 18, 2014 08:43PM

Anyone?

Re: HTTPS URL Background color
Posted by: siria
Date: January 18, 2014 10:35PM
Re: HTTPS URL Background color
Posted by: Zero3K
Date: January 19, 2014 01:32AM

It doesn't work in the newest beta of K-Meleon 74.



Edited 1 time(s). Last edit at 01/19/2014 01:32AM by Zero3K.

Re: HTTPS URL Background color
Posted by: Zero3K
Date: January 24, 2014 01:11AM

Does anyone have any other ideas regarding what I'm wanting to have done?

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 24, 2014 03:29AM

Do you suppose that one of these names have changed in the recent code?

#urlbar[level="high"]> .autocomplete-textbox-container,
#urlbar[level="low"]> .autocomplete-textbox-container

Mozilla article noted in an earlier post indicated the color was defined in the css code. There are a lot of different css files to check. On what word/phrase would be best to run a search in the css files?

Re: HTTPS URL Background color
Posted by: Zero3K
Date: January 24, 2014 04:03AM

I don't know. How about searching through all of them using a text finding program?

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 25, 2014 12:46AM

I searched all of browser\chrome (all folders) for the following strings.

urlbar[level="low"]
autocomplete-textbox-container

There were zero occurrences.

Re: HTTPS URL Background color
Posted by: Zero3K
Date: January 25, 2014 01:22AM

Its being set in K-Meleon.exe. So, its source has to be modified in order to remove it.

Re: HTTPS URL Background color
Posted by: Dorian
Date: January 26, 2014 07:52AM

browser.urlbar.highlight.secure
browser.urlbar.highlight.broken

set them to 16777215 for white.

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 26, 2014 01:59PM

Quote
Dorian
browser.urlbar.highlight.secure
browser.urlbar.highlight.broken

set them to 16777215 for white.

Thank you Dorian. That works just fine.

Can someone explain the numbering system to me? I thought numbers for red, blue, and green but there is only eight digits instead of nine. I tried 247129243 which was supposed to be pink but got light green instead.

Does anyone know of a "broken" https site, that I can use for testing?

Re: HTTPS URL Background color
Posted by: JohnHell
Date: January 26, 2014 04:21PM

Looks like is the product of each color, but is just a guess.

16777216 = 2^24 = 256*256*256 ; (24 = 8*3) (3 = RGcool smiley

As a full color, then, white, looks like full number.

Your number, actually, looks outside the range. For pink, or kind of pink could be:

256*1*256 (actually blue is 0, but, also full of a color is not 256 but 255).

So pink should be 65536, but can't be that easy.

I haven't tested, as I have not problem with the current color scheme, but should be as I said or most probably not.

EDIT: Or maybe if we pass it to binary:

1111 1111 0000 0001 1111 1111 = 16712191

A broken site... I can't recall now on any site.

My problem with numbers in Gecko browsers is the date and cookies. I can't catch how the hell is calculated to be converted to decimal value. Maybe someone can clear it to me.



Edited 3 time(s). Last edit at 01/26/2014 04:41PM by JohnHell.

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 26, 2014 04:46PM

Either I don't under the formula or that is not the method. I tried the value of 65536 and the result was still light green. The I tried the formula on 247*129*243 = 7742709, but I still got light green.

Re: HTTPS URL Background color
Posted by: JohnHell
Date: January 26, 2014 05:01PM

Weird, even that number converted to binary and taking the eight binary digits to make each color, doesn't match with light green moody smiley

I don't know how the calculate either confused smiley



Edited 1 time(s). Last edit at 01/26/2014 05:01PM by JohnHell.

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 26, 2014 05:05PM

I am sorry! I left out a step in testing. The formula by John Hell does work. A pink, not necessarily the pink you want, is 247*129*243 or 7742709.

Another update: Maybe that 7742709 is just a coincidence. Another value did not work. I will have to do a lot more testing.



Edited 1 time(s). Last edit at 01/26/2014 05:19PM by JamesD.

Re: HTTPS URL Background color
Posted by: siria
Date: January 27, 2014 10:15AM

Weird... but multiplication or addition don't make sense: how would the browser know what is red, what green, what blue?

My first thought was that perhaps it's with transparency, because that's usually 8 digits, 4x2 in hex format (either ARGB or RGBA)
Hex format means 0-9 is extended to 0 1 2 3 4 5 6 7 8 9 A B C D E F
So the range for each double number is: 00...ff, with the first being 16x 'heavier' than the second, similar to decimal system.
Then again: he posted *only* numbers, and those definitely wouldn't result in white. In that system 16-777215 would be a dark yellow and 167772-15 a dark cyan if I'm not mistaken.

Remains weird...



Edited 1 time(s). Last edit at 01/27/2014 10:23AM by siria.

Re: HTTPS URL Background color
Posted by: duffy98
Date: January 27, 2014 11:09AM

JamesD ... just a quick question since you posted here, how could I change the colors of the secure url bar in your version of K-Meleon? Never been crazy about the yellow color ... I would like a different color that stands out so I will notice when I am on a secure page.

From the above posts, I didn't see this in about:config ...

browser.urlbar.highlight.secure

browser.urlbar.highlight.broken

I tried adding "browser.urlbar.highlight.secure" with the color I want but it didn't work.

Dorian's browser is good but I am still going to keep your browser also just to have available and if you have any newer versions down the road.

thanks ...

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 27, 2014 12:44PM

Quote
duffy98
JamesD ... just a quick question since you posted here, how could I change the colors of the secure url bar in your version of K-Meleon? Never been crazy about the yellow color ... I would like a different color that stands out so I will notice when I am on a secure page.

This question did not occur to me when I put together the beta 2.6 version. The engines that drive that version and the new KM 74 are very different. I will try to find an answer.

I am still working on a system for KM 74 Beta.

Re: HTTPS URL Background color
Posted by: JohnHell
Date: January 27, 2014 02:08PM

Quote
siria
Weird... but multiplication or addition don't make sense: how would the browser know what is red, what green, what blue?

My first thought was that perhaps it's with transparency, because that's usually 8 digits, 4x2 in hex format (either ARGB or RGBA)
Hex format means 0-9 is extended to 0 1 2 3 4 5 6 7 8 9 A B C D E F
So the range for each double number is: 00...ff, with the first being 16x 'heavier' than the second, similar to decimal system.
Then again: he posted *only* numbers, and those definitely wouldn't result in white. In that system 16-777215 would be a dark yellow and 167772-15 a dark cyan if I'm not mistaken.

Remains weird...

How it knows?, because it is in order. And, by the way, I don't think alpha channel are used for this kind of features. But wouldn't be a problem.

Let's say we want a dark grey with decimal values up 255 for each color, Red 1, Green 1, Blue 1.

In binary would be 000000010000000100000001.

Even if you provide as 10000000100000001 because left 0's don't count, it's easy to calculate what are the missing 0's as the in binary we read from right to left and we already have 2 complete bytes of Green and Blue, the remaining is Red.

If we add alpha channel, it's the same. You only need to know if the alpha channel is at the beginning or at the end, this is, ARGB or RGBA (if it is as HTML coding, will be this one).

Continuing with the example above, we will have that 000000010000000100000001 equals 65793 which should match dark grey.

And, what happens when there is a 0 value? It's the same. Let's say a dark pink color as Red 1, Green 0, Blue 1.

That equals to 000000010000000000000001 or 10000000000000001 that equals to 65537

And if Red and Green are both 0, the same but will be a lower value. Calculate 8 binary digit for each color is not a problem for the browser.

Also, in Hex or decimal with alpha channel wouldn't be 16777215 but 4294967295 for a full transparent white or 4294967040 for white opaque as RGBA or 16777215 for ARGB. There will be not 3 bytes, but 4.

As I can't test in 1.6 I can't confirm, but should be this way.

If Dorian doesn't come and tell us grinning smiley

EDIT: duffy98, it works, the prefs works on 1.6, I thought they didn't but they work.
EDIT2: It works but is not RGB, but BGR, Blue, Green, Red.



Edited 3 time(s). Last edit at 01/27/2014 02:22PM by JohnHell.

Re: HTTPS URL Background color
Posted by: duffy98
Date: January 27, 2014 03:37PM

Thanks JamesD and JohnHell for the feedback to my question. The colors I am interested in would be pink, lime green or magenta. I just want to experiment with those colors on the KM browser secure urlbar ... it would stand out for sure.

This is what I currently have for colors: Colorminder website

http://coloreminder.com/00ff00


Magenta - #FF00FF / #696969

Deep Pink - #FF1493 / #696969

Lime - #00FF00 / #969696

I don't understand JohnD how to or where to put them into JamesD's KM version ... I was looking into "about:config" to find something like this (from above post)

browser.urlbar.highlight.secure
browser.urlbar.highlight.broken

I don't see anything like that in JamesD's version and he did say he will research it. I don't know any other way to change the color.

The answer is close I'm sure ... Dorian, Rodocop, JamesD, you or someone else.

I just don't have enough knowledge about the inner workings of any K-Meleon version .



Edited 2 time(s). Last edit at 01/27/2014 03:40PM by duffy98.

Re: HTTPS URL Background color
Posted by: JohnHell
Date: January 27, 2014 03:49PM

They are not default prefs that is why they aren't shown.

In about:config, right click in the prefs area en select New>Integer. That will create the new pref. Type in the name browser.urlbar.highlight.secure or browser.urlbar.highlight.broken and enter the integer value.

Use the windows calculator (in scientific mode or full mode) to change those Hex numbers to a decimal value. But remember to change de order from RGB to BGR. For example, Deep pink will be 9314FF instead FF1493.

Note: the text color can't be changed or I don't know how. That's another mystery. What I know is that it takes from system colors.

Re: HTTPS URL Background color
Posted by: duffy98
Date: January 27, 2014 04:32PM

Thanks so much JohnHell for the help ... it works just fine. I could have never figured all that out without help. I found this guide "How to Convert a Hex Number to a Decimal Number" and I reversed the number or used the number in your post.

How to Convert a Hex Number to a Decimal Number

http://scripts.sil.org/cms/scripts/page.php?item_id=HextoDecConversion

I just did the pink URL bar and now will try the lime green one. Definitely notice that it's a "secure" URL.

Thanks again kind sir ...



Edited 1 time(s). Last edit at 01/27/2014 04:33PM by duffy98.

Re: HTTPS URL Background color
Posted by: siria
Date: January 27, 2014 06:12PM

Quote
JohnHell
256*1*256 (actually blue is 0, but, also full of a color is not 256 but 255).
So pink should be 65536

Quote
siria
Weird... but multiplication or addition don't make sense: how would the browser know what is red, what green, what blue?

Quote
JohnHell
How it knows?, because it is in order.

But where is the order in a multiplication or addition result? How would the browser know if
65536
= 256*1*256 OR
= 1*256*256 OR
= 256*256*1 or something in between?

Re: HTTPS URL Background color
Posted by: JohnHell
Date: January 27, 2014 06:49PM

Quote
siria
But where is the order in a multiplication or addition result? How would the browser know if
65536
= 256*1*256 OR
= 1*256*256 OR
= 256*256*1 or something in between?

Forget about multiplication. It was the first thought I got.

What it is, is the concatenation of binary values of given decimal values ranging from 0 to 255 for each color.

Also you must understand that the computer doesn't read from left to right but from right to left so it's easy to make 8 binary digits grouping.

Understood that, your example will be:
B:255 G:1 R:255 = 11111111 00000001 11111111 = 16712191
B:1 G:255 B:255 = 00000001 11111111 11111111 = 131071
B:255 G:255 R:1 = 11111111 11111111 11111111 = 16777215

As you can see they are not the same.

Also, in memory they are treated as Hex values of 32 bits (in a 32 bits system I guess), this is 0xAABBGGRR (alpha if exists, Blue, Green, Red)

I read a little this afternoon about how RGB and BRG are treated and I think I didn't left anything now (sure something as I'm not a programmer).



Edited 1 time(s). Last edit at 01/27/2014 06:51PM by JohnHell.

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 27, 2014 07:38PM

Sorry that I am late and I do not have a method to compute the number. This macro will allow you to change color to one of the three that I stumbled across by accident. The code works in 1.6.0 beta 2.6 as well as KM 74.

UrlBarHiC.kmm

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# File name: UrlBarHiC.kmm
#
# ---------- Set Urlbar highlight colors for HTTPS sites -------------------------------
#
# Dependencies		: main.kmm 
# Resources			: 
# Preferences		: "browser.urlbar.highlight.secure" and "browser.urlbar.highlight.broken"
# Version			: 0.6 2014-01-27  
# Author			: JamesD 
# -----------------------------------------------------------------------------------------------

_UrlBarHiC_Secure {
macroinfo = _("Set urlbar highlight color for secure HTTPS sites"); 
$_UrlBarHiC_securechoice = prompt( _("0 = default, 1 = white, 2 = pink, 3 = green" ) , _("Color choice for secure HTTPS -Enter single digit numeric." ) );
0 == $_UrlBarHiC_securechoice ? macros("_UrlBarHiC_Secure_default") :  macros("_UrlBarHiC_Secure_pick") ;
}

_UrlBarHiC_Secure_default {
delpref("browser.urlbar.highlight.secure");
macros("_UrlBarHiC_restartrequired");
}

_UrlBarHiC_Secure_pick {
1 == $_UrlBarHiC_securechoice ? $_UrlBarHiC_securepicked = 16777215 :0;    
2 == $_UrlBarHiC_securechoice ? $_UrlBarHiC_securepicked = 7742709 :0;
3 == $_UrlBarHiC_securechoice ? $_UrlBarHiC_securepicked = 247129243 :0;  
setpref( INT, "browser.urlbar.highlight.secure", $_UrlBarHiC_securepicked);
macros("_UrlBarHiC_restartrequired");
}

_UrlBarHiC_restartrequired {
alert(_("Restart of browser required for \ncolor change to take effect."));
}

_UrlBarHiC_Broken {
##setpref( INT, "browser.urlbar.highlight.broken", 16777215);
macroinfo = _("Set urlbar highlight color for broken HTTPS sites"); 
$_UrlBarHiC_brokenchoice = prompt( _("0 = default, 1 = white, 2 = pink, 3 = green" ) , _("Color choice for broken HTTPS -Enter single digit numeric." ) );
0 == $_UrlBarHiC_brokenchoice ? macros("_UrlBarHiC_broken_default") :  macros("_UrlBarHiC_broken_pick") ;
}

_UrlBarHiC_broken_default {
delpref("browser.urlbar.highlight.broken");
macros("_UrlBarHiC_restartrequired");
}

_UrlBarHiC_broken_pick {
1 == $_UrlBarHiC_brokenchoice ? $_UrlBarHiC_brokenpicked = 16777215 :0;    
2 == $_UrlBarHiC_brokenchoice ? $_UrlBarHiC_brokenpicked = 7742709 :0;
3 == $_UrlBarHiC_brokenchoice ? $_UrlBarHiC_brokenpicked = 247129243 :0;  
setpref( INT, "browser.urlbar.highlight.broken", $_UrlBarHiC_brokenpicked);
macros("_UrlBarHiC_restartrequired");
}

_UrlBarHiC_BuildMenu {
$_UrlBarHiC_Popm = _("Manage URL bar colors");
	setmenu("&Edit", popup, $_UrlBarHiC_Popm, -1);
	setmenu($_UrlBarHiC_Popm, macro, _("secure color"), _UrlBarHiC_Secure, 0);
	setmenu($_UrlBarHiC_Popm, macro, _("broken color"), _UrlBarHiC_Broken, 1);
}
#-----------------------------------------------------------------------------------
$OnInit=$OnInit . "_UrlBarHiC_BuildMenu;";
$macroModules = $macroModules . "UrlBarHiC;";


Re: HTTPS URL Background color
Posted by: duffy98
Date: January 27, 2014 08:28PM

Thanks JohnD for the code ... JohnHell was able to help me (5 posts up) to get the color URL change working in "about:config" ... but I want to also try your code that you just posted. As I had to ask JohnHell for help, I also have to ask you as to how and where do I place your code into K-Meleon.

I want to really try it out. I have decided on Green or Lime green as the color I like for the secure URL. I notice it more.

thanks



Edited 1 time(s). Last edit at 01/27/2014 08:28PM by duffy98.

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 27, 2014 10:44PM

Duffy98

What I posted is a macro file. You can use it by copying the code from the post to an editor like Notepad. The code begins with the line which has "# K-Meleon Macros...." and goes to the end of the post. Once you have the code copied to your editor, you should save the file using the name in bold above the code. Since you are supplying an extension for this file, you should use the dropdown in "Save as type" and select "all files". If you don't do this Notepad will attempt to add .txt as the extension.

As for where to save the file, there are two places within KM. One is the root\macros folder. The second would be a folder named "macros" in your profile directory. In KM 74 you may have to create that folder. If you use multiple profiles then you should use root\macros.

The menu item appears under the "Edit" menu. If you are sill using the compact menu in 74 I don't know how to see the menus there.

If you like the lime green that you found then you can edit the macro and replace the decimal number that I used with the one you found.

Re: HTTPS URL Background color
Posted by: siria
Date: January 28, 2014 01:04AM

Nice smiling smiley
Just a little suggestion which allows users to directly input and test new numbers, if you like:

_UrlBarHiC_Secure_pick {
setpref( INT, "browser.urlbar.highlight.secure", $_UrlBarHiC_securechoice);
1 == $_UrlBarHiC_securechoice ? $_UrlBarHiC_securepicked = 16777215 :0;
2 == $_UrlBarHiC_securechoice ? $_UrlBarHiC_securepicked = 7742709 :0;
3 == $_UrlBarHiC_securechoice ? $_UrlBarHiC_securepicked = 247129243 :0;
setpref( INT, "browser.urlbar.highlight.secure", $_UrlBarHiC_securepicked);
macros("_UrlBarHiC_restartrequired");
}

Similar of course for the broken one, and the input prompt would need a bit more description.

Ah, can't resist, but personally I'd simplify the code to:
_UrlBarHiC_Secure_pick {
1 == $_col ? $_col = 16777215 :0;
2 == $_col ? $_col = 7742709 :0;
setpref( INT, "browser.urlbar.highlight.secure", $_col);
etc.
(After all it's just simple macrolanguage, needs not really complicated javascript-like nestings smiling smiley)

Edit:
Uhm, that said, have no idea what happens if an invalid number is given :cool:



Edited 4 time(s). Last edit at 01/28/2014 01:54AM by siria.

Re: HTTPS URL Background color
Posted by: JohnHell
Date: January 28, 2014 01:18AM

LOL, nice one Siria grinning smiley
And, actually, the last number shouldn't be valid. Anything above 16777215 will have unexpected results.

Re: HTTPS URL Background color
Posted by: JamesD
Date: January 28, 2014 06:47PM

I have some holiday coming and will not be available. Make any changes/upgrades you wish to my macro.

K-Meleon forum is powered by Phorum.