Sorry, I tested my suggestion, It doesn't work. I think you are suck adding styles with GM_addStyle.
However if you wish to save bandwidth, you would need some way to block all CSS files from a particular domain, which sounds like a great plugin but I can't find anything like this. If you simply disable CSS then GM_addStyle may not function. What you really need is a way to change the CSS paths before they download, and Firefox usually tries to retrieve them as soon as it encounters the files in the header, while GM doesn't run until page load (after CSS download). You might be able to pull this off with an extension. I think its possible to solve the problem using some combination of an extension and greasemonkey but not greasemonkey alone. Maybe someone else has insight on how to block particular files from your web browser. There may be some content filtering/parental control extension or feature that will block what needs blocking allowing you to solve it using GM. You might as well just put all of your custom styles into your script with GM_addStyle instead of loading them from a local file though. For some reason your CSS file at pastebin isn't loading for me, one can possibly automate reformatting of this file into GM. On Aug 2, 2:56 am, qufighter <[email protected]> wrote: > var ss = document.createElement("link"); > ss.type = "text/css"; > ss.rel = "stylesheet"; > ss.href = "file://style.css"; > document.getElementsByTagName("head")[0].appendChild(ss); > > On Aug 2, 2:20 am, behnam <[email protected]> wrote: > > > > > I uploaded the codes: > > address of php file (that should test on > > it)http://pastebin.com/pastebin.php?dl=m49bbfbc4 > > --------------------------------------------------------------------------- > > ------- > > I wish change line 15 to address of files on mycomputer > > > --------------------------------------------------------------------------- > > ------- > > & CSS file:http://pastebin.com/pastebin.php?dl=m6e6d05063 > > > +++++++++++++++++++++++++++++++++++++++++ > > +++++++++++++++++++++++++++++++++++++++++ > > +++++++++++++++++++++++++++++++++++++++++ > > +++++++++++++++++++++++++++++++++++++++++ > > +++++++++++++++++++++++++++++++++++++++++ > > +++++++++++++++++++++++++++++++++++++++++ > > > On Aug 2, 12:11 am, Zach Edwards <[email protected]> wrote: > > > > Could you upload the HTML to pastebin.com for easy viewing please? > > > > -Zach > > > > On Sat, Aug 1, 2009 at 1:19 AM, behnam <[email protected]> wrote: > > > > > this is not work > > > > I supposal <link> tags exist in <head> not <body> > > > > please help me > > > > (please test the codes on below file before relese) > > > > > copy below codes in a text editor & save it by .php file type & Brows > > > > by a program like EasyPHP & TEST your script on it. > > > > > ___________________________________________________________ > > > > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > > > *************************************************************************** > > > > ******** > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// > > > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > > > <html> > > > > <head> > > > > <title>Travian com1</title> > > > > <meta name="content-language" content="en" /> > > > > <meta http-equiv="cache-control" content="max-age=0" /> > > > > <meta http-equiv="imagetoolbar" content="no" /> > > > > <meta http-equiv="content-type" content="text/html; > > > > charset=UTF-8" / > > > > > <script src="mt-core.js?66388" > > > > type="text/javascript"></script> > > > > > <script src="mt-more.js?66388" > > > > type="text/javascript"></script> > > > > <script src="unx.js?66388" > > > > type="text/javascript"></script> > > > > <script src="new.js?66388" > > > > type="text/javascript"></script> > > > > <link href="gpack/travian35/gp_compact.css?66388" > > > > rel="stylesheet" type="text/css" /><link href="gpack/travian35/lang/en/ > > > > lang.css?66388" rel="stylesheet" type="text/css" /> </head> > > > > > <body onload="initCounter()"> > > > > > <div id="dynamic_header"> > > > > </div> > > > > > <div id="header"></div> > > > > > <div id="mid"> > > > > <div id="side_navi"> > > > > <a id="logo" > > > > href="http://www.travian.com/"><img > > > > src="img/x.gif" > > > > alt="Travian" /></a> > > > > <p> > > > > <a href="http://www.travian.com/index.php > > > > ">Homepage</a> > > > > <a href="http://www.travian.com/anleitung.php > > > > ">Instructions</a> > > > > > <a href="login.php">Login</a> > > > > <a href="anmelden.php">Register</a> > > > > </p> > > > > <p> > > > > > <a href="http://forum.travian.com/" > > > > target="_blank">Forum</a> > > > > <a href=" > > > >http://www.travian.com/chat.php?chatname=T_guest???" > > > > target="_blank">Chat</a> > > > > </p> > > > > > <p> > > > > <a href="http://www.travian.com/impressum.php > > > > ">Imprint</a> > > > > <a href="support.php">Support</a> > > > > </p> > > > > </div> > > > > > <div id="content" class="login"> > > > > > <h1><img class="img_login" src="img/x.gif" alt="log in the game" /></ > > > > h1> > > > > > <h5><img class="img_u04" src="img/x.gif" alt="login" /></h5> > > > > <p>You must have cookies enabled to be able to log in. If you share > > > > this computer with other people you should log out after each session > > > > for your own safety.</p> > > > > > <form method="post" name="snd" action="dorf1.php"> > > > > <input type="hidden" name="w" value="" /> > > > > <input type="hidden" name="login" value="1249114359" /> > > > > > <table id="login_form"> > > > > <tbody> > > > > <tr class="top"> > > > > <th>name</th> > > > > <td><input class="text" type="text" > > > > name="e784624" > > > > value="" > > > > maxlength="15" /> <span class="error"> </span></td> > > > > > </tr> > > > > <tr class="btm"> > > > > <th>password</th> > > > > <td><input class="text" type="password" > > > > name="e2a1435" value="" > > > > maxlength="20" /> <span class="error"> </span></td> > > > > </tr> > > > > </tbody> > > > > </table> > > > > > <p class="btn"> > > > > <input type="hidden" name="e3e4428" value="" /> > > > > <input type="image" value="login" name="s1" > > > > onclick="xy();" > > > > id="btn_login" class="dynamic_img" src="img/x.gif" alt="login button" > > > > / > > > > > </p> > > > > > </form> > > > > > </div> > > > > > <div id="side_info" class="outgame"> > > > > > <h5><img src="http://www.travian.com//img/en/t2/newsbox1.gif" > > > > alt="newsbox 1"></h5> > > > > > <div class="news">s4.travian.com has been > > > > started on the 10th of > > > > July. > > > > <br><br> > > > > You can find information about all our servers <a href="http:// > > > > forum.travian.com/showthread.php?t=99383">here</a>. > > > > <br><br> > > > > Regards > > > > <br> > > > > Tschena</div> > > > > </div> > > > > > <div class="clear"></div> > > > > > </div> > > > > > <div class="clear"></div> > > > > > <div id="footer"> > > > > <div id="mfoot"> > > > > <a > > > > href="http://www.travian.com/anleitung.php?s=3">FAQ</a> > > > > | > > > > <a > > > > href="http://www.travian.com/screenshots.php">Screenshots</a> > > > > | > > > > <a href="http://www.travian.com/links.php">Links</a> | > > > > <a href="http://www.travian.com/spielregeln.php">Game > > > > rules</a> | > > > > <a > > > > href="http://www.travian.com/spielregeln.php?agb">Terms</a> > > > > | > > > > <a > > > > href="http://www.travian.com/impressum.php">Imprint</a> > > > > > <br /> > > > > <div class="copyright"> 2004 - 2009 Travian Games > > > > GmbH</div> > > > > </div> > > > > <div id="cfoot"></div> > > > > </div> > > > > > <div id="ce"></div> > > > > </body> > > > > </html> > > > > <div id="sysmsg"></div> > > > > > ___________________________________________________________ > > > > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > > > *************************************************************************** > > > > ******** > > > > > & save the below css file &use this for change style & see work of > > > > your script > > > > > ___________________________________________________________ > > > > ++++++++++++++++++++++++++++++++++++++++++++++++++++ > > > > > *************************************************************************** > > > > ******** > > > > > @CHARSET "UTF-8";body{text-align:left;direction:ltr;margin:0;}img > > > > {border:0;}img,a,div{background-repeat:no-repeat;background-position:0 > > > > 0;} > > > > h1,h2,span,form,img,li{margin:0;padding:0;}h1{margin-bottom:8px;}p > > > > {margin:14px 0;padding:0;} > > > > label{white-space:nowrap;}#msfilter{width:1px;height: > > > > 1px;position:absolute;z-index:99;} > > > > .hide{display:none;}div#header{width:100%;min-width:980px;height:67px;} > > > > div#mid{float:left;width:100%;min-width:980px;margin-bottom:15px;} > > > > div#content{float:left;min-height: > > > > 450px;position:relative;overflow:hidden;}div.universal{width: > > > > 502px;padding:0 25px 0 25px;} > > > > div.login{width:502px;padding:0 25px 0 25px;}div.logout{width: > > > > 502px;padding:0 25px 0 25px;} > > > > div.signup{width:502px;padding:0 25px 0 25px;}div.activate{width: > > > > 502px;padding:0 25px 0 25px;} > > > > div.banned_cn{width:502px;padding:0 25px 0 25px;}div.player{width: > > > > 502px;padding:43px 25px 0 25px;} > > > > div.alliance{width:502px;padding:43px 25px 0 25px;}div.forum{width: > > > > 502px;padding:43px 25px 0 25px;} > > > > div.statistics{width:502px;padding:43px 25px 0 25px;}div.reports{width: > > > > 502px;padding:43px 25px 0 25px;} > > > > div.messages{width:502px;padding:43px 25px 0 25px;}div.a2b{width: > > > > 502px;padding:43px 25px 0 25px;} > > > > div.village3{width:502px;padding:43px 25px 0 25px;}div.plus{width: > > > > 502px;padding:43px 25px 0 25px;} > > > > div.warsim{width:502px;padding:43px 25px 0 25px;}div.map{width: > > > > 552px;padding:43px 0 0 0;} > > > > div.support{width:502px;padding:15px 25px 0 25px;}div.village1{width: > > > > 552px;padding:43px 0 0 0;} > > > > div.village2{width:540px;padding:43px 6px 0 6px;}div.build{width: > > > > 552px;}div#build{width:502px;padding:43px 25px 0 25px;} > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en -~----------~----~----~----~------~----~------~--~---
