Comments (6)
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.
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.
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.
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.
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 hideswww
, 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 calledindex.html.css
and be under the folderwww.foo.com/bar
.
from witchcraft.
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)
- Quick item... code example on your homepage HOT 1
- Cannot assign variables to the window or document scope? HOT 1
- Google analytics is causing couples of issues HOT 11
- The js and css modification is not being picked up by the extension without reloading the page HOT 2
- Quick question: Is it possible to match chrome extensions (i.e. options pages or the LastPass vault)? HOT 2
- question: how can I include resourse, for example: image HOT 3
- Background being unloaded by Chrome due to inactivity
- Question: Disable / unload scripts from running -- str.replace HTML before page is loaded ? HOT 2
- Cannot remove once added script even after deleting file HOT 2
- Support for glob matching HOT 3
- Wildcard support? HOT 3
- File path resolution? HOT 8
- add locally stored custom css/js HOT 1
- Files are still being cached HOT 2
- The script list has not been loaded HOT 5
- How to get a reference to the page level global scope? HOT 1
- Chrome doesnt remember the host url
- Very Basic Question
- Chrome Web Server Alternatives HOT 4
- check if scripts exist (v3 branch)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from witchcraft.