Code Monkey home page Code Monkey logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
Hi, this is because the HTML replacement is done on the body node instead of 
the html
node. This was done in purpose to keep the head intact, but now I see that it 
may be
a limitation as in your example. I will try to fix it for next version.

Original comment by [email protected] on 10 Nov 2009 at 7:48

  • Changed state: Accepted

from foxreplace.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
I helped my self by extending the code. I changed the "foxreplace.js" so that 
the style sheet links in the "head" get replaced too. I attached the modified 
"foxreplace.jar" for those ones which are interested.
You find this file in :

\Profiles\{windows user name}\Application 
Data\Mozilla\Firefox\Profiles\{default.profile}\extensions\[email protected]\foxrep
lace\chrome\foxreplace.jar

Modification:
foxreplace.jar\content\foxreplace.js

approx. line 322:
    ...
    if (this.prefs.replaceUrls) {
      valueNodesXpath += "|/html/body//a/@href"
              + "|/html/head//link/@href"     // added
              + "|/html/head//script/@src"    // added
                      + "|/html/body//img/@src";
    }
    ...

regards
Mark










Original comment by [email protected] on 10 Jan 2011 at 7:56

Attachments:

from foxreplace.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 11, 2024
Assuming the problem was on HTML substitutions, as I understand from my 
comment, then it was fixed on r168. If instead it was asking for replace URLs 
to include stylesheets and scripts, as the last comment suggests (I don't know 
if it's the same original poster, because it has a similar signature), then I 
think it's out of the intended scope of non-HTML substitutions, which is to 
change text on the body and the title (the scope could change, but currently 
it's still this one).

For now, I will close the issue as fixed in r168.

Original comment by [email protected] on 3 Aug 2013 at 4:53

  • Changed state: Fixed
  • Added labels: Component-Logic

from foxreplace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.