xiaoxiaoflood / firefox-scripts

userChromeJS / autoconfig.js and extensions
Mozilla Public License 2.0
1.04k stars 87 forks source link

[QUESTION] Any way to add a background-image to masterPasswordPlus.uc.js? #39

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi,

masterPasswordPlus.uc.js includes this line: style: 'position: fixed; display: none; width: 100%; height: 100%; top: 0; background-color: #2C50D1; z-index: 2147483647; cursor: pointer;'

I'm referring to this line because it seems to me it's there or nowhere else that I could add a background-image. Problem is I tried to but unsuccessfully. background-color of course is easy, but i'd like to add a background-image because a simple little password input in the middle of a 23"" screen is aesthetically odd!

Thanks! Your userChromeJS scripts are fantastic.

xiaoxiaoflood commented 4 years ago

Hi, I'm not very skilled in CSS, but tried adding background-image: url("http://pudim.com.br/pudim.jpg"); in that line and it worked.

ghost commented 4 years ago

Hi @xiaoxiaoflood and thanks for that quick help which works indeed:

background-image: url("http://pudim.com.br/pudim.jpg");
background-image: url("http://localhost/masterPasswordPlus.jpg");

Both work fine, but what I had tried unsuccessfully and still don't understand why it doesn't work is this: background-image:url("masterPasswordPlus.jpg"); the image together with masterPasswordPlus.uc.js in my profile's chrome folder doesn't make it.

Anyway, it's OK now, looks nicer ("to be or not to be" is the question, "to look nice or not" is a subsidiary question!). Thanks.

xiaoxiaoflood commented 4 years ago

If the image is in chrome folder, try background-image:url("resource://userchromejs/masterPasswordPlus.jpg");, this works here.

ghost commented 4 years ago

background-image:url("resource://userchromejs/masterPasswordPlus.jpg"); works here as well, great!

I prefer this way of proceeding because folders, paths may change. I wouldn't have figured your solution myself, no need to say not being a coder (I hardly touch CSS for cosmetics) explains it all. Many thanks and, as they say in the news networks in the States "We appreciate it" (can't imagine this wording on French news, lol).

OK, back to childhood blended with ego : masterPasswordPlus.uc.js with (my!) masterPasswordPlus.jpg, the French touch, lol: masterPasswordPlus

xiaoxiaoflood commented 4 years ago

This is beautiful!