Comments (20)
Import/Export I would anticipate most. :)
Sync is nice too, but not as important as Import/Export
Thank you
from requestcontrol.
@ldgbc @Atavic By the way the wiki is public if you want to create some page for sharing rules there. And if you wish to include some of your rules as default rules in RC, open a new issue for that.
from requestcontrol.
@crssi you can do that by selecting a single rule in the rules view.
from requestcontrol.
Download API for exporting and file input for importing:
http://stackoverflow.com/a/38838572
from requestcontrol.
Hi @tumpio, do you have any ETA for this implemntation?
Anyway... very very good job and thank you for sharing this extension.
from requestcontrol.
Hi @crssi I can't give any ETA other than 🔜 I'm working on it :)
If you want to cheer me up buy me a cup of coffee!
from requestcontrol.
@crssi also which one do you anticipate most, rules import/export or the sync support?
from requestcontrol.
@tumpio Promised coffee on the way. But crap, had to use Internet Explorer. Even fresh installation of FF v53 and FF v54 did not work,.
from requestcontrol.
Been thinking
Maybe you can make export as a download config file generated on the request?
Or the way gorhill implemented this for uBlock Origin and uMatrix.
It would be some real enhancement if there would be an option to export/import single filter... maybe a text box with filter config data in some sort of XML or JSON format.
from requestcontrol.
I found a workaround to transfer extension data that should work for all WebExtensions.
Ex. For Request Control which has an ID of {1b1e6108-2d88-4f0f-a338-01f9dbcccd6f}
- Go into your profile and then
browser-extension-data/{1b1e6108-2d88-4f0f-a338-01f9dbcccd6f}
- Copy the
storage.js
file - Transfer that file into another profile
- 😉
But, it'll probably be better to have export/import in the extension itself.
Here's some sample code of how I did it
from requestcontrol.
@mrdokenny @crssi
can you try new beta version with export and import:
https://addons.mozilla.org/addon/requestcontrol/versions/1.7.0beta1
@mrdokenny nice to know about this :)
from requestcontrol.
function exportObject(name, object) {
let mimeType = "application/json",
data = JSON.stringify(object, null, 2),
blob = new Blob([data], {type: mimeType});
return browser.downloads.download({
url: URL.createObjectURL(blob),
filename: name,
conflictAction: "overwrite",
saveAs: true
}).then(revokeObjectUrl);
}
I didn't use the download API because I didn't want to request another permission just for that, but it nice to know that it doesn't have this one problem, which just uses regular JS.
As for the beta version, importing the rules seem to not take into account duplicates.
STR:
- Export rules
- Import them again
- See duplicates for the default rules
Another thing is the file upload button can be stylized
from requestcontrol.
Using a downloads API for creating a download seemed quite applicable for the job! :)
Duplicates handling is quite excessive, I think.
Another thing is the file upload button can be stylized
I'm using bootstrap which doesn't include styling for it.
from requestcontrol.
Duplicates handling is quite excessive, I think.
It depends on how you consider one rule to be the same from another one.
Ex. You could make it so if the path, types, action are the same, append the hosts into one rule.
I'm using bootstrap which doesn't include styling for it.
You can overlay the input in a label and use the bootstrap button css on it.
Sample code:
<label class="file-upload">
<input id="importURLS" type="file"/>
<div id="importURLSText">Upload File</div>
</label>
.file-upload {
display: inline-block;
height: 38px;
padding: 0 30px;
color: #555;
text-align: center;
font-size: 11px;
font-weight: 600;
line-height: 38px;
letter-spacing: .1rem;
text-transform: uppercase;
text-decoration: none;
white-space: nowrap;
background-color: transparent;
border-radius: 4px;
border: 1px solid #bbb;
cursor: pointer;
box-sizing: border-box;
}
input[type="file"] {
display: none;
}
from requestcontrol.
I'll leave it here myself. If you want to work on it feel free. I'll consider adding sync support once the android options issue is fixed.
from requestcontrol.
Cool. There is export and import system now. Anyone want to share some of their rules?
I attached two of mine that I currently use (didn't add many since it wasn't working before with e10s or my browser setting).
Thank you @tumpio good to see it being supported still. Also it seem to be being developed with the new add-on function. Hopefully it Mozilla don't fail it and it kill all good XUL addons with a possibility of replacement but now there is one for Cleaning Links (yours).
request-control-rules-sharing.zip
from requestcontrol.
@ldgbc nice sharing idea, but what do your rules do?
from requestcontrol.
It would also be nice to be able to export single rule only. This way it would be easier to share rules between users. ;)
from requestcontrol.
Haven't seen that... it awesome, ;)
from requestcontrol.
I'm afraid sync support has to wait. Android support is lacking for it.
from requestcontrol.
Related Issues (20)
- add option for individual rule to enable/disable counter
- [Feature request] Changes in the rules TLD field
- [Feature request] Default rule set after installation HOT 2
- Question: how do I subscribe to [these rules](https://github.com/tumpio/requestcontrol/tree/master/rules)?? HOT 7
- Destructive actions should be behind a prompt
- "Top-level domains" field isn't displayed automatically
- Filter URLs by method
- scheme filed should be extended with ws:// and wss://
- [question] Is there a way to match a question-mark literally without using regexp? HOT 2
- https to http CORS failed
- Make a new official release? HOT 3
- privacy-images-1 break some images on https://booknode.com/ HOT 1
- Internal links (single page navigation) not being processed on YouTube HOT 1
- "No change" when testing uncreated rules
- Idea: random redirect HOT 1
- redirecting based on ip:port?
- Redirector does not works properly with CORS-Stricted website HOT 1
- Possible to prepend about:reader?url= to URL so it always opens in Firefox Reader View? HOT 1
- Is this project dead? HOT 1
- Suggestion: toggable expantion of performed actions in popup.
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 requestcontrol.