change Firefox 2 background!

User Help for Mozilla Firefox
Old Bozz
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Bozz »

The path is correct. I use the same image and path for my options window but in userChrome.css.

Code: Select all

@-moz-document url("about:blank") { * {
    background: url("bg\\window.png");
    margin: 0px;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}}
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

bozz:
Do you have a security error in the Error Console like I have (see my post on the previous page)?
Do you see the image rule in the DOM Inspector (CSS Style Rules)?
Old Bozz
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old Bozz »

Yes to both questions.
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

Hmm, I'm curious why it works for RaiseMachine if we both see the same error.
User avatar
RaiseMachine
Posts: 1764
Joined: December 6th, 2004, 6:05 pm
Location: England

Post by RaiseMachine »

.
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

My problem is not the path: if I put the path I see in the Error Console in the url bar then the image displays fine.
It is a security (CAPS) problem as I wrote:
Security Error: Content at about:blank may not load or link to ...

Do you have a CAPS setting in user.js?
pile0nades
Posts: 756
Joined: May 15th, 2005, 2:31 am

Post by pile0nades »

Try uploading the image to <a href="http://software.hixie.ch/utilities/cgi/data/data">this page</a> and use the code it gives you, instead of the path to the image.
Linkify bug numbers - test: bug 258287
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

It is a background image meant for the browser window and thus can be quite large and converting it to base64 makes it even larger.
Isn't it possible to put a pref (capability.policy) in user.js to allow access to that image?
User avatar
RaiseMachine
Posts: 1764
Joined: December 6th, 2004, 6:05 pm
Location: England

Post by RaiseMachine »

Using FF's default (ie built in) security policy.

Code: Select all

user_pref("capability.policy.default.checkloaduri.enabled", "allAccess");

The reason I have my code working, without the above pref set, is that I use NoScript which has a "Allow Local Links" option. The CAPS pref above works on my Minefield build which doesn't have NoScript installed.

[edit] Check out my post below for a better set of prefs
Last edited by RaiseMachine on March 26th, 2007, 2:47 am, edited 2 times in total.
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
Guest
Guest

Post by Guest »

Your first pref is allowing all sites to load local content. Your second pref isn't doing anything. The sites preference value needs URLs of the sites allowed to access local content, not the content itself. Also, default policies do not use sites preference:
The Default Security Policy

The syntax is exactly the same as if you were using one of your own named policies, except it doesn't need a "capability.policy.default.sites" preference.
http://kb.mozillazine.org/Security_Poli ... ity_Policy
Maniac11919
Guest

Post by Maniac11919 »

you could simply download a theme that's already skinned as I have and edit the bitmaps with that. if you're really interested, look at its coding and see how it does it. i, myself, don't believe i've ever honestly coded anything, but i can edit photo's with the best of them.

you can find the Werder Bremen theme here:
http://firefoxpro.net/2006/12/21/werder ... 4x768-202/

if you open the jar with winzip, you can extract the global file and edit the background images located within as I have (but you probably already knew that...)

here's a screenie of my skin i made doing just that:
Image
good luck!
User avatar
RaiseMachine
Posts: 1764
Joined: December 6th, 2004, 6:05 pm
Location: England

Post by RaiseMachine »

^Not what the OP is asking for. This relates to changing the background for blank (about:blank) pages.

Anonymous wrote:Your first pref is allowing all sites to load local content. Your second pref isn't doing anything. The sites preference value needs URLs of the sites allowed to access local content, not the content itself. Also, default policies do not use sites preference:
The Default Security Policy

The syntax is exactly the same as if you were using one of your own named policies, except it doesn't need a "capability.policy.default.sites" preference.
http://kb.mozillazine.org/Security_Poli ... ity_Policy

Done a bit more testing. You're right in that you just need the first pref. I have edited my previous post accordingly.

Although you can specify actual content if you use your own policies. http://kb.mozillazine.org/Links_to_loca ... ath_Syntax

Code: Select all

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
user_pref("capability.policy.localfilelinks.sites", "file:///C:/Images/SomeImage.png");

These prefs above are what I suggest people use.
"Doesn't the idea of making nature against the law seem to you a bit... unnatural ?" - Bill Hicks
"Money is the Schrodinger's Cat of economics." - Robert Anton Wilson
"It's not a bug, it's two features having a fight in the pub car-park." - Me
User avatar
dickvl
Posts: 54164
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

Thanks RaiseMachine, that works.
Guest
Guest

Post by Guest »

You people better check whether you still have this pref in prefs.js/user.js:

Code: Select all

user_pref("capability.policy.default.checkloaduri.enabled", "allAccess");
If you do, it needs to be removed and the last code tested again.
Guest
Guest

Post by Guest »

Code: Select all

// Disable checkloadURI by default
user_pref("capability.policy.default.checkloaduri.enabled", "noAccess");

//Allow individual sites access to local files
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
user_pref("capability.policy.localfilelinks.sites", "about:blank");


You could try this in userChrome.css:

Code: Select all

browser {
  background: transparent url("file:///path/to/image.png") center no-repeat !important;
}
Locked