Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Submit My Third-Party Rules #979

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Submit My Third-Party Rules #979

wants to merge 2 commits into from

Conversation

Riajyuu
Copy link

@Riajyuu Riajyuu commented Mar 21, 2018

I'm sorry that the title is a bit confusing.
If there is any requirement for this to be accepted, I will try to fix that asap.

Plus, I promise to keep it alive in a predictable future as those rules target websites worldwide.

@zippy5
Copy link

zippy5 commented Mar 22, 2018

@Rictusempra, would you consider adding/converting these as recipes as well? I think they would be a great addition to that :)

More info:

https://github.com/gorhill/uMatrix/wiki/Contributing-ruleset-recipes

https://github.com/gorhill/uMatrix/releases

@Riajyuu
Copy link
Author

Riajyuu commented Mar 23, 2018

@zippy5

would you consider adding/converting these as recipes as well?

What did you suppose to mean exactly? If you are talking about samples in uMatrix wiki, there isn't too much I can do.

@zippy5
Copy link

zippy5 commented Mar 23, 2018

Hi @Rictusempra, it's a fairly new feature that's been added to uMatrix. From the release page:

[Status: experimental] A new button ("puzzle" piece icon) is available in the popup panel: uMatrix will offer you the ability to import community-contributed ruleset recipes which are relevant to the current page (see #30). Hopefully there will be many contributions to populate ruleset recipes ready to be used to unbreak sites.

Instead of being added as a filter list, they're "recipes" that you can toggle on from the puzzle piece icon within the uM popup. They are added as temporary rules, so each user can use it to quickly unbreak a site, but they can also be quickly modified via the UI and then made permanent or erased via the eraser/lock buttons.

Here's the current recipes available:

https://github.com/uBlockOrigin/uAssets/blob/master/recipes/recipes_en.txt

@Riajyuu
Copy link
Author

Riajyuu commented Mar 23, 2018

Instead of being added as a filter list, they're"recipes" that you can toggle on from the puzzle piece icon within the uM popup.

Well, isn't that what this PR doing exactly?

image

You can also confirm that via the given supportURL

My bad. There was a strange mistake. Sorry for that. CC @gorhill

@zippy5
Copy link

zippy5 commented Mar 23, 2018

I could be mistaken, but...

to me it looks like you're trying to import them as "recipes," but the content found at

https://raw.githubusercontent.com/uMatrix-Rules/uMatrix-Rules-Domain/master/rules.txt

are in the format of filters, not the syntax for recipes.

@Riajyuu
Copy link
Author

Riajyuu commented Mar 23, 2018

hmmmmmmm, that is, frankly, an insanely huge amount of work.

But I will try that.

@gorhill I need your words here. If you wish to see those rules converted into recipes, I will try that. If not, perhaps leave them like that as rules.

@gorhill
Copy link
Owner

gorhill commented Mar 23, 2018

If you want to submit recipes for inclusion in official built-in recipes, please submit them one by one, such that each can be inspected/validated by everyone. Also, I see you have Chinese sites in there, these should be in their own file -- this means a new CHN recipes resource would need to be created.

I still need to add documentation about how recipes should be crafted, I didn't have the time yet.

@Riajyuu
Copy link
Author

Riajyuu commented Mar 23, 2018

@gorhill thanks for the reply. I will try whatever I can do.
I still have two questions:

  1. how to allow resources globally, specifically some CDN scripts library? You can find that in my rules files.
  2. how to fit scope level? You can see the two repositories for the corresponding two scope levels of umatrix.

@gorhill
Copy link
Owner

gorhill commented Mar 23, 2018

I am going to write some documentation and come back when done.

@gorhill
Copy link
Owner

gorhill commented Mar 23, 2018

This is what I have now: https://github.com/gorhill/uMatrix/wiki/Ruleset-recipes. Consider this a first draft, I will edit according to feedback.

Something I forgot to mention, there is a yet-to-be-documented advanced setting to make it easy to road-test recipes: set contributorMode to true in the More pane, this will add a widget in the Assets pane which purpose is to add inline recipes -- "My recipes".

@Riajyuu
Copy link
Author

Riajyuu commented Mar 23, 2018

Consider this a first draft, I will edit according to feedback.

Great, gratefully thx for your time, @gorhill . I will try to craft something.

Plus, as a solution for scope-level fitting, here is what I suggested:

"umatrix-rules": {
  "content":"recipes",
  "title": "uMatrix Rules (Third-Party Contributed)",
  "scopeLevel": "domain",
  "contentURL": "https://raw.githubusercontent.com/uMatrix-Rules/uMatrix-Rules-Domain/master/rules.txt",
  "supportURL": "https://umatrix-rules.github.io"
}

If not specific, occurs at every level for subscription.
If specific, occurs (& effective) only when uMatrix is set to the the targeted scope level.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants