Giter Site home page Giter Site logo

Comments (6)

luciopaiva avatar luciopaiva commented on May 30, 2024 1

Hi Hannah,

That's a very interesting use case. For JavaScript, it's easy checking if you're in subpage before executing some specific logic, but that's not possible with CSS, so I totally get it.

I will think of some way to add that functionality to Witchcraft. One possibility would be to look for a directory named mydomain.com and check if it has a subpage.css file. Witchcraft currently doesn't look into directories, but I think that can be done with little effort.

I'll let you know when I have something.

from witchcraft.

luciopaiva avatar luciopaiva commented on May 30, 2024 1

Glad to know that it helped to make your work less painful :-) That's an excellent use case for Witchcraft indeed.
Thanks for sharing!

from witchcraft.

luciopaiva avatar luciopaiva commented on May 30, 2024

Hey Hannah,

Good news, I got it working. I have just submitted version 2.5.0 to the Chrome store, but it may take a while until they review it.

You can get a zip file and load it manually if you want to give it a try. The zip file is here:
https://github.com/luciopaiva/witchcraft/releases/tag/v2.5.0

This blog post has detailed instructions on how to load extensions manually, in case you need help with that:
https://webkul.com/blog/how-to-install-the-unpacked-extension-in-chrome/

Also check the section "Path segments" here to understand how the new feature works.

Hope that helps!

from witchcraft.

hcmcfarlane avatar hcmcfarlane commented on May 30, 2024

Hey Lucio! Great! Thanks so much! Does this also work for pages that end in .html, .aspx etc? (didn't seem to for me, but maybe I did something wrong)

from witchcraft.

luciopaiva avatar luciopaiva commented on May 30, 2024

Yes, it's supposed to work no matter the extension (or lack thereof).

Check if you are:

  • using the most recent version (v2.5.0)
  • missing a www in the host name (Chrome hides www, so it may be there and you can't see it)
  • got the correct path to the page. For example, if the page is www.foo.com/bar/index.html, the script needs to be called index.html.css and be under the folder www.foo.com/bar.

from witchcraft.

hcmcfarlane avatar hcmcfarlane commented on May 30, 2024

Hi Lucio, (and sorry for slightly delayed reply).
Thank you, I've now got it working great. I didn't have the folders nested correctly, but all sorted now!

If you're interested, I work daily with a web app that has utterly terrible design. I wrote some user-friendly upgrades and have been inserting my style sheets every time I load up the app. That's obviously a bit of a pain, and one sheet isn't really able to cover every possible pathway (of course the underlying code for the website is also terribly designed making it super difficult to target individual elements). Now I can style and re-style elements depending on where I am in the app, without having to manually inject a different stylesheet all the time :)

Witchcraft and your efforts mean that using this shitty interface has gone from an utterly horrific nightmare to a much more manageable annoyance. So thanks very very very much.

from witchcraft.

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.