General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
InjectCSS: bad character in macro name? (solved)
Posted by: JohnHell
Date: April 23, 2010 03:31PM

Have I wasted my time this afternoon? For the first time I use this macro, what a surprise!!
The worst is that after read this topic created (a year ago) by disrupted, desga confirmed that on 1.1.6, which I'm still using, it works, the macro injectCSS.

http://kmeleonbrowser.org/forum/read.php?1,90592


My problem is not the described by disrupted, it's worst, the macro name is not recognized... :s

No matter how I write (capitalize), it doesn't work:
injectCSS(readfile("mypathtothecssfile.css"));

The problem is not with readfile, the problem is with the macro name injectCSS because I tested with the injectCSS macro empty too...

Maybe with the GRE updates I lost something in the way? Have I deleted something? I don't think so as it's the only (pre-defined) macro not working :-?

My macros.dll file (1.1.6, remember) it's "16 May 2007, 20:47:18" and 86.016 bytes



Edited 2 time(s). Last edit at 04/23/2010 04:28PM by JohnHell.

Options: ReplyQuote
Re: InjectCSS: bad character in macro name?
Posted by: siria
Date: April 23, 2010 04:09PM

Is that css in your KM root folder...?
The macro names don't matter at all, but can you post the whole thing? Not the css, but the kmm file? And how do you call it (menu, shortcut)?



Edited 1 time(s). Last edit at 04/23/2010 04:11PM by siria.

Options: ReplyQuote
Re: InjectCSS: bad character in macro name?
Posted by: JohnHell
Date: April 23, 2010 04:12PM

Siria, read what I wrote, is not the path, If I just set the macro as

injectCSS();

it's the same.

And you use 1.5.x if I'm not wrong, so you couldn't help me. Thanks anyway.

Options: ReplyQuote
Re: InjectCSS: bad character in macro name?
Posted by: siria
Date: April 23, 2010 04:23PM

If you think so :cool:
Just one thing is sure, the problem is not how you write "injectCSS", that is okay. And that's not a macro name either.

Options: ReplyQuote
Re: InjectCSS: bad character in macro name?
Posted by: JohnHell
Date: April 23, 2010 04:28PM

Yep, now I figured out now, but anyway, if you pretended to know, oh, look, he is failing here!, why did you ask for paths?

Or you just want to create nosense replies.

Just asking.

Options: ReplyQuote
Re: InjectCSS: bad character in macro name?
Posted by: JamesD
Date: April 23, 2010 06:28PM

I have a copy of 1.1.6 running on XP-SP3. I got the injectCSS() to work for me.

I have a line of code in a file named "mytest.css" in the root folder. The code is as follows:
table { border: 2px solid; }

The following lines of code are in my macro.
$_S_mypath = getfolder(RootFolder)."\\mytest.css";
injectCSS(readfile($_S_mypath));

When I run the macro I do see the border on tables change. Hope this helps.

Options: ReplyQuote
Re: InjectCSS: bad character in macro name?
Posted by: JohnHell
Date: April 24, 2010 07:00PM

Thanks JamesD, late, but thanks smiling smiley

Anyway it didn't work.

I planed to inject a class via injectCSS and then load with a script via injectJS, but looks impossible. I can apply css directly with javascript objects calls, but not to apply classes and/or injected CSS :/

Options: ReplyQuote


K-Meleon forum is powered by Phorum.