Comments (4)
if the file name has no patterns to it (other than having a .js at the end) then yeah the best you can do is something like:
https://somesite.com/js/*.js
which would obv overwrite everything that ends in js. However! you can also have overrides go to the original location like this:
https://somesite.com/js/main.js
-> https://somesite.com/js/main.js
Seems pointless right? Well, if you put this rule above the rule with the * in it, then main.js wont get overridden.
But yeah if all js files have random names and you only want to override one of them, then I'm not sure what to do.
Maybe block all scripts and then copy paste and inject each script.
from resourceoverride.
Hi Kyle!
Many thanks for your answer. But there is a way: (not The Mandalorian one but it could 😉)
Do you have a way to read the file name of the source that will be override and give your file the same name?
We can divide the feature in two:
- If the source folder only have one file it will be pretty straightforward.
- If the folder contains more than a file, the system must identify which file to override based on a couple of rules. For instance: the number of lines of code inside each and match with the desired file based on it. Or if it finds a specific string inside it. Or simply put (but maybe hardly done): the user could decide in runtime whitch file should match to override.
What do you think? It's doable?
Kind regards,
João Cavaleiro
from resourceoverride.
Hi Kyle,
I am willing to develop the above suggested features. Is it okay for you to fork the code and go ahead?
Kind regards,
João Cavaleiro
from resourceoverride.
I am no longer accepting PRs for this repo unless for critical basic functionality bug fixes. This project has been in maintenance mode ( https://github.com/kylepaulsen/ResourceOverride/blob/master/maintenance_notice.md ) for a while now.
You are free to do whatever you like with the code, so long as you follow the included license. https://github.com/kylepaulsen/ResourceOverride/blob/master/LICENSE
from resourceoverride.
Related Issues (20)
- Don't work with script tags with hash at the end HOT 1
- [BUG] onOff Switch disappeared HOT 2
- Add support for async / await syntax on the javascript editor
- Ubuntu 20.04 | Chromiums | Dev Tools slowly eats up memory when open
- Resource Override doesn't work on Chrome 84 (workaround: Source > Filesystem) HOT 4
- Feature request: add script/stylesheet from URL
- Not working on Edges v89.0.774.77, but adding extension like Adblock Plus, it will work, I don't know why.
- ResourceOverride not working on firefox HOT 2
- How do I embed an MP3 file in raw text?
- Improvements that can be added - RegexReplacer + cloud sync (Forked and fully working version is available with all code)
- Refused to load the script because it violates the following Content Security Policy directive HOT 3
- Ability to add URL -> File rule from local file directory HOT 1
- Header rules can not be handled in the second or later tab groups HOT 1
- Using Resource Override to override a JavaScript file that is loaded as a SharedWorker doesn't work
- Dark theme (again)
- Configuration disappear HOT 1
- Excuse me HOT 3
- Add new rule: Add JS/CSS file From URL HOT 1
- Bug: URL -> File does not work HOT 2
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 resourceoverride.